GNOME Bugzilla – Bug 703001
Blue background drawn when switching output using hardware keys
Last modified: 2013-11-15 15:44:35 UTC
My laptop features a hardware key to switch between clone/multimonitor/external/internal outputs. What happens when pressing that key is that the X server sends a shit load of Xrandr events (and possibly some root window Configure events). So the shell ends up seeing 11/12 events triggering recreation of the background actor/content. The Shell also features a component to load the background picture asynchronously and tries to limit the number of loads for a same picture (typical use case for the multimonitor setup). The problem is that the shell gather all the requests under the same meta_background_load_file_async call using one GCancellable (the first one to come). So when the shell receives 12 events, it creates 12 new background managers which end up trying to load the 12 times the same background picture. All of these requests are batched into the same meta_background_load_file_async using the first GCancellable received on the first request. Unfortunately, when the first request is cancelled by the following event indicating a new monitor setup, all of the background picture requests are dropped on the floor, and nothing is loaded (hence the blue screen background). Attached a patch to fix that problem.
Created attachment 247666 [details] [review] background: fix asynchronous management of background loading operations
Review of attachment 247666 [details] [review]: Patch looks ok, but I cannot reproduce it here so didn't test. ::: js/ui/background.js @@ +186,3 @@ } + let needCopy = false; needsCopy
Created attachment 248294 [details] [review] background: fix asynchronous management of background loading operations
Review of attachment 248294 [details] [review]: OK to push assuming it works (can't reproduce the bug here).
Thanks, pushed to 3.8 and master.
*** Bug 703773 has been marked as a duplicate of this bug. ***
I assume this doesn't need to be open anymore.
For some reason it doesn't apply for me
Created attachment 249120 [details] [review] 0013-background-async.patch
Created attachment 249121 [details] 0013-background-async.patch.out
And the same on a fresh 3.8.3 untarred package: $ patch -p1 <../gnome-shell-3.8.3-patches/0013-background-async.patch patching file js/ui/background.js Hunk #1 FAILED at 142. Hunk #2 FAILED at 178. 2 out of 3 hunks FAILED -- saving rejects to file js/ui/background.js.rej
Created attachment 249122 [details] background.js.rej
they were wrongly downloaded :S, sorry for the noise As a side note, looks like this causes some "hangs" in my setup: https://bugzilla.gnome.org/show_bug.cgi?id=704646
reopening because of the problems this patch has uncovered.
I still see this with gnome-shell-3.8.4-1.fc19.x86_64. Sometimes I have a blue background on one of my displays. It happens erratically. Tell me if you need me to debug it more.
(In reply to comment #15) > I still see this with gnome-shell-3.8.4-1.fc19.x86_64. Sometimes I have a blue > background on one of my displays. It happens erratically. Tell me if you need > me to debug it more. "yum update gnome-shell" is all you need (gnome-shell-3.8.4-2.fc19.x86_64 has the fix). This bug is a different issue (something with xrandr event spam when pressing the hw keys).
I don't think this is an issue anymore...