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 691702 - power: Switch off backlight before suspend
power: Switch off backlight before suspend
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other All
: Normal normal
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-14 10:12 UTC by Bastien Nocera
Modified: 2013-01-14 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Switch off backlight before suspend (3.01 KB, patch)
2013-01-14 10:12 UTC, Bastien Nocera
none Details | Review
power: Switch off backlight before suspend (3.16 KB, patch)
2013-01-14 10:15 UTC, Bastien Nocera
needs-work Details | Review
power: Don't turn DPMS off when closing the lid (1.66 KB, patch)
2013-01-14 11:13 UTC, Bastien Nocera
accepted-commit_now Details | Review
power: Switch off backlight before suspend (2.99 KB, patch)
2013-01-14 11:25 UTC, Bastien Nocera
committed Details | Review
power: Don't turn DPMS off when closing the lid (2.02 KB, patch)
2013-01-14 12:00 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2013-01-14 10:12:34 UTC
.
Comment 1 Bastien Nocera 2013-01-14 10:12:35 UTC
Created attachment 233428 [details] [review]
power: Switch off backlight before suspend

When suspending, switch off the backlight and turn it back on when
resuming.

Note that we need to capture the current backlight before DPMS Off,
otherwise xbacklight will return zero.

FIXME: suspending without closing the lid should do the same...
Comment 2 Bastien Nocera 2013-01-14 10:15:31 UTC
Created attachment 233429 [details] [review]
power: Switch off backlight before suspend

When suspending, switch off the backlight and turn it back on when
resuming.

Note that we need to capture the current backlight before DPMS Off,
otherwise xbacklight will return zero.
Comment 3 Bastien Nocera 2013-01-14 11:04:41 UTC
Review of attachment 233429 [details] [review]:

We shouldn't actually set DPMS on in the lid closed handler, as that wouldn't take external monitors into account. Furthermore, the xrandr plugin already takes care of switching off the output when the lid closes.
Comment 4 Bastien Nocera 2013-01-14 11:13:47 UTC
Created attachment 233435 [details] [review]
power: Don't turn DPMS off when closing the lid

That doesn't take external monitors into account, and would just switch
them off[1]:. Furthermore, the xrandr plugin already takes care of switching
off the laptop output when the lid closes.

https://bugzilla.gnome.org/show_bug.cgi?id=691702

[1]: Though the effect isn't too critical as we can move the mouse to revive
the main monitor.
Comment 5 Richard Hughes 2013-01-14 11:15:14 UTC
Review of attachment 233435 [details] [review]:

Looks good, thanks.
Comment 6 Bastien Nocera 2013-01-14 11:25:48 UTC
Created attachment 233436 [details] [review]
power: Switch off backlight before suspend

When suspending, switch off the backlight and turn it back on when
resuming.

Note that we need to capture the current backlight before DPMS Off,
otherwise xbacklight will return zero.
Comment 7 Richard Hughes 2013-01-14 11:50:31 UTC
Comment on attachment 233436 [details] [review]
power: Switch off backlight before suspend

It's probably worth noting in the commit message that this only works on MBP hardware, and that it's relying on a quirk in the intel KMS driver.
Comment 8 Bastien Nocera 2013-01-14 12:00:24 UTC
Created attachment 233438 [details] [review]
power: Don't turn DPMS off when closing the lid

That doesn't take external monitors into account, and would just switch
them off[1]:. Furthermore, the xrandr plugin already takes care of switching
off the laptop output when the lid closes.

https://bugzilla.gnome.org/show_bug.cgi?id=691702

[1]: Though the effect isn't too critical as we can move the mouse to revive
the main monitor.
Comment 9 Bastien Nocera 2013-01-14 12:04:53 UTC
Attachment 233436 [details] pushed as 168d3ee - power: Switch off backlight before suspend
Attachment 233438 [details] pushed as df29c45 - power: Don't turn DPMS off when closing the lid