GNOME Bugzilla – Bug 791879
Visible screen flashing when opening lid
Last modified: 2021-07-05 13:47:36 UTC
For convenience, I have suspend on lid close disabled on this 2-in-1 laptop, so closing the lid is just meant to blank the screen. However on Wayland the screen visibly turns on, shows the desktop briefly, goes black, and then shows the desktop again. It seems applying the monitor config again on lid open is the culprit of this flashing. I think that makes sense when there's external outputs as we can end up shuffling the shell, but probably doesn't make as much sense when there's a single output, I'm attaching a patch that avoids reconfiguring the output in that case.
Created attachment 365886 [details] [review] backends: Avoid reconfiguring outputs on lid open if there is only one On wayland it causes visible flashing to black as the output is first turned on, and then reconfigured.
Review of attachment 365886 [details] [review]: I think that we should rather move "is_assignments_changed()" out of meta-monitor-manager-xrandr.c, so that all configuration changes that doesn't actually change the CRTC assignment wont blink, including scale and position changes.
Oh, so the xrandr paths have code to compare configurations :). Yes, that sounds preferable to my special casing, I'll have a look.
Created attachment 367179 [details] [review] backends: Compare gpu/crtc/output configurations before applying Move the configuration checks from the X11 backend into generic code, so both backends may check the configuration did actually change before reapplying. This spares us from visible screen flashing when reapplying monitor configuration eg. after lid open.
Care to turn this into a MR?
I precisely went back to this patch during the weekend :). https://gitlab.gnome.org/GNOME/mutter/merge_requests/72
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.