[regression] Some EGL clients don't get bypassed any more in fullscreen

Bug #1480755 reported by Daniel van Vugt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Daniel van Vugt
mesa (Ubuntu)
Confirmed
Medium
Unassigned
unity8 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

[regression] Fullscreen GL apps don't get bypassed any more.

As you can see in compositor report from any of our demo servers:
[1438572052.621854] compositor: Display 0x7faea4306fa0 averaged 60.537 FPS, 0.506 ms/frame, latency 15.669 ms, 61 frames over 1.007 sec, 0% bypassed
[1438572053.622668] compositor: Display 0x7faea4306fa0 averaged 59.950 FPS, 0.551 ms/frame, latency 15.814 ms, 60 frames over 1.000 sec, 0% bypassed
[1438572054.623370] compositor: Display 0x7faea4306fa0 averaged 59.958 FPS, 0.613 ms/frame, latency 15.721 ms, 60 frames over 1.000 sec, 0% bypassed

I think this is only "medium" though, because it's a transparent optimization so its absence is very hard to notice in most cases.

Related branches

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [regression] Some Mir EGL demos don't get bypassed any more in fullscreen

Dropped severity again. Although elgtriangle and eglplasma don't bypass any more, eglsquare does get bypassed.

summary: - [regression] Fullscreen GL apps don't get bypassed any more
+ [regression] Some Mir EGL demos don't get bypassed any more in
+ fullscreen
Changed in mir:
importance: Medium → Low
importance: Low → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually medium. We still need to find out what's not working ASAP so the problem doesn't get worse.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bisected. The regression came in r2771:

------------------------------------------------------------
revno: 2771 [merge]
author: Daniel van Vugt <email address hidden>
committer: Tarmac
branch nick: development-branch
timestamp: Thu 2015-07-23 06:36:32 +0000
message:
  Add a new client function: mir_connection_get_egl_pixel_format
  that solves the ambiguity in matching an EGLConfig with the correct
  MirPixelFormat.

  Although we've got by with guessing until now, that only works with
  a very small number of pixel formats and is not reliable as we add
  more formats and more platforms.

  It turns out Android already solved this with its standard extension
  "EGL_KHR_platform_android", so we use that. As for mesa-kms, it turns
  out GBM really only supports two pixel formats correctly so is easy
  to match those up. Fixes: https://bugs.launchpad.net/bugs/1460149.

  Approved by Daniel van Vugt, PS Jenkins bot, Kevin DuBois, Chris Halse Rogers, Robert Carr, Alberto Aguirre.
------------------------------------------------------------

Since then, the affected demo clients are choosing mir_pixel_format_argb_8888 (previously they chose mir_pixel_format_xrgb_8888), and our bypass logic obviously checks for an alpha channel (which is technically the correct thing to do).

Changed in mir:
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The problem is (annoyingly) that Mesa 10.5.9 on wily (Intel Haswell) returns 7 compatible EGLConfigs for EGL_ALPHA_SIZE=0 but all of them have EGL_ALPHA_SIZE == 8 set.

:(

Changed in mir:
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Added a Mesa task. RAOF has suggested we should just fix Mesa. When asking for RGBA of 8880 it should provide at least one EGLConfig that is 8880 instead of always 8888.

Revision history for this message
Chris Halse Rogers (raof) wrote :

This should be possible. It's not entirely clear why we're not getting XRGB visuals currently, but it's fixable.

tags: added: mir-mesa
tags: added: egl-platform-mir
removed: mir-mesa
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.16.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
milestone: 0.16.0 → 0.15.0
Changed in mir:
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Adding a Unity8 task as I suspect this bug will cause Unity8 to never get bypassed on desktop.

We wouldn't really notice as both bypass and OpenGL compositing and relatively fast. But it would be nice to ensure it's bypassed for the best performance (and one frame lower latency).

While giving unity-system-compositor environment MIR_SERVER_COMPOSITOR_REPORT=log would answer this question, that doesn't work because lightdm clobbers the environment and never lets you modify it.

summary: - [regression] Some Mir EGL demos don't get bypassed any more in
- fullscreen
+ [regression] Some EGL clients don't get bypassed any more in fullscreen
tags: added: performance
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Got it. Unity8 is bypassed just fine on desktop. The trick is to create a file:

/etc/lightdm/lightdm.conf.d/mir-compositor-report.conf:
[Seat:*]
unity-compositor-command=/usr/bin/env MIR_SERVER_COMPOSITOR_REPORT=log /usr/sbin/unity-system-compositor

and then:

tail -f /var/log/lightdm/unity-system-compositor.log

Changed in unity8 (Ubuntu):
status: New → Invalid
Changed in mesa (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mesa (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.