GNOME Bugzilla – Bug 749076
[Wayland] Screen doesn't light up on lid open
Last modified: 2015-05-27 14:16:56 UTC
In GNOME under X, opening the lid makes it light up, letting me see the notifications without having to press a key. Since my laptop takes the lid as opened when it's higher than half a centimetre over the keyboard it makes it look like it was waiting for me, which is really cool. However, this doesn't work under Wayland for some reason. The screen just stays black, so I have to wiggle the mouse or press something to make it light up. Arch Linux, full updated, GNOME 3.16.1. Thanks.
1) Does your laptop suspend when you close the lid? 2) Run the following command in a terminal and attach the generated file here after reproducing the bug: $ /usr/libexec/gnome-settings-daemon --replace --debug 2>&1 | grep -i power > /tmp/power.log
1) No. I turned that off. 2) I have no /usr/libexec/gnome-settings-daemon, so instead I did /usr/lib/gnome-settings-daemon/gnome-settings-daemon --replace --debug 2>&1 | grep -i power I had to copy the contents of it because using > tmp/power.log resulted in an empty file. Also, I found out that this doesn't happen when closing the lid and opening it shortly after. It either happens when you close the lid and wait for 5 minutes or whatever time you have set your screen to blank after, or when locking the screen with the lock key (Fn+f6 on my keyboard) and closing the lid. I'll attach the output.
Created attachment 303153 [details] Output of `/usr/lib/gnome-settings-daemon/gnome-settings-daemon --replace --debug 2>&1 | grep -i power`
Created attachment 303673 [details] [review] backend-native: Remove unused variable
Created attachment 303674 [details] [review] backend-native: Reset idle time on lid open events This makes gnome-settings-daemon turn on the backlight and gnome-shell's screen shield animate.
Review of attachment 303673 [details] [review]: ::: src/backends/native/meta-backend-native.c @@ +43,2 @@ MetaBarrierManagerNative *barrier_manager; remove the whitespace while you're at it?
Review of attachment 303674 [details] [review]: hm, what normally does this on x11? code looks fine.
Also, on X the screen only lights up on lid open. The shield doesn't slide. Sliding the shield would defeat the shield's meaning.
(In reply to Jasper St. Pierre from comment #7) > Review of attachment 303674 [details] [review] [review]: > > hm, what normally does this on x11? code looks fine. The X server doesn't do it itself so we have had this hack on g-s-d since forever: https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/power/gpm-common.c#n800 which is called on the exact same property notify from upower.
(In reply to Juraj Fiala from comment #8) > Also, on X the screen only lights up on lid open. The shield doesn't slide. > Sliding the shield would defeat the shield's meaning. The shield won't slide with this patch. The animation I mentioned is the arrows animation on the shield which only animate for a while after the last user activity.
Review of attachment 303674 [details] [review]: ah, that's right. then this is fine. i do wonder if we should do the same thing on all backends, and remove the hack from g-s-d
(In reply to Jasper St. Pierre from comment #11) > ah, that's right. then this is fine. i do wonder if we should do the > same thing on all backends, and remove the hack from g-s-d Since there's no reason other than keeping both backends symmetrical I'll leave that in g-s-d. Pushed with the empty lines removed. Attachment 303673 [details] pushed as f9d869a - backend-native: Remove unused variable Attachment 303674 [details] pushed as 83ce71c - backend-native: Reset idle time on lid open events
*** Bug 709069 has been marked as a duplicate of this bug. ***