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 748849 - power: Save last requested idle mode while temporarily unidle
power: Save last requested idle mode while temporarily unidle
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-05-03 17:44 UTC by Rui Matos
Modified: 2015-05-04 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Save last requested idle mode while temporarily unidle (1.28 KB, patch)
2015-05-03 17:44 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2015-05-03 17:44:20 UTC
This prevents the following bug:

1. Laptop enters sleep
2. Lid open, wake up, idle time gets reset, we enter NORMAL state
3. There's a notification so gnome-shell asks us to go temporarily
   unidle while we're in NORMAL state
4. The 15s inactivity watch is triggered and we switch to BLANK
5. The unidle timer is triggered and we switch back to NORMAL since
   that's the state we were in when it started

Result is that the screen is left turned ON indefinitely after waking
from sleep if there's a notification when we wake up.
Comment 1 Rui Matos 2015-05-03 17:44:26 UTC
Created attachment 302816 [details] [review]
power: Save last requested idle mode while temporarily unidle

If one of our idle watches triggers while we're temporarily unidle we
should save and switch to it when that period ends otherwise we would
ignore any idle request transitions in that period and always go back
to the state where we were when becoming temporarily unidle.
Comment 2 Bastien Nocera 2015-05-04 05:13:35 UTC
Review of attachment 302816 [details] [review]:

Looks good though I would include the reproducer in the commit message. Should also look into whether a test suite addition is possible.
Comment 3 Rui Matos 2015-05-04 13:34:15 UTC
7f31d00..82e66ef  gnome-3-14 -> gnome-3-14
   9ac05a2..b98655a  master -> master

Attachment 302816 [details] pushed as b98655a - power: Save last requested idle mode while temporarily unidle
Comment 4 Rui Matos 2015-05-04 13:37:06 UTC
(In reply to Bastien Nocera from comment #2)
> Looks good though I would include the reproducer in the commit message.

Done.

> Should also look into whether a test suite addition is possible.

Filed bug 748890 for that.