After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749076 - [Wayland] Screen doesn't light up on lid open
[Wayland] Screen doesn't light up on lid open
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 709069 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-05-07 14:58 UTC by Juraj Fiala
Modified: 2015-05-27 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Output of `/usr/lib/gnome-settings-daemon/gnome-settings-daemon --replace --debug 2>&1 | grep -i power` (2.26 KB, text/plain)
2015-05-09 17:14 UTC, Juraj Fiala
  Details
backend-native: Remove unused variable (782 bytes, patch)
2015-05-20 15:14 UTC, Rui Matos
committed Details | Review
backend-native: Reset idle time on lid open events (2.11 KB, patch)
2015-05-20 15:14 UTC, Rui Matos
committed Details | Review

Description Juraj Fiala 2015-05-07 14:58:32 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.
Comment 1 Rui Matos 2015-05-08 16:49:56 UTC
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
Comment 2 Juraj Fiala 2015-05-09 17:13:08 UTC
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.
Comment 3 Juraj Fiala 2015-05-09 17:14:41 UTC
Created attachment 303153 [details]
Output of `/usr/lib/gnome-settings-daemon/gnome-settings-daemon --replace --debug 2>&1 | grep -i power`
Comment 4 Rui Matos 2015-05-20 15:14:08 UTC
Created attachment 303673 [details] [review]
backend-native: Remove unused variable
Comment 5 Rui Matos 2015-05-20 15:14:19 UTC
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.
Comment 6 Jasper St. Pierre (not reading bugmail) 2015-05-20 15:52:28 UTC
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?
Comment 7 Jasper St. Pierre (not reading bugmail) 2015-05-20 15:53:05 UTC
Review of attachment 303674 [details] [review]:

hm, what normally does this on x11? code looks fine.
Comment 8 Juraj Fiala 2015-05-20 16:03:39 UTC
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.
Comment 9 Rui Matos 2015-05-20 16:08:52 UTC
(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.
Comment 10 Rui Matos 2015-05-20 16:10:29 UTC
(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.
Comment 11 Jasper St. Pierre (not reading bugmail) 2015-05-20 16:30:43 UTC
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
Comment 12 Rui Matos 2015-05-22 15:48:01 UTC
(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
Comment 13 Rui Matos 2015-05-27 14:16:56 UTC
*** Bug 709069 has been marked as a duplicate of this bug. ***