Idle/inactive action/autosuspend results in a suspend AND a hibernate

Bug #136871 reported by Sitsofe Wheeler
8
Affects Status Importance Assigned to Milestone
gnome-power
Invalid
Unknown
gnome-power-manager (Ubuntu)
Triaged
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-power-manager

Description of the problem:
When setting gnome-screensaver to timeout after 1 minute and gnome-power-manager to sleep when inactive after 2 minutes the computer will go on to suspend then hibernate if on AC power, or hibernate then suspend if on battery power.

Steps to reproduce:
1. Start
gnome-screensaver-preferences .
2. Set "Regard the computer as idle after:" to 1 minute. Click Close.
3. Start
gnome-power-preferences .
4. In the "On AC Power tab" set "Put computer to sleep when inactive for:" to 2 minutes.
5. In the "On Battery Power" tab set "Put computer to sleep when inactive for:" to 2 minutes.
6. Wait for 2 minutes.

Expected result:
After 1 minute the screen to dim to black and after 2 the computer to suspend itself regardless of whether it is on AC or battery.

Actual result:
Laptop will suspend (then have to be woken) then hibernate if on AC power, or hibernate (then have to be woken) then suspend if on battery power.

How reproducible is the problem?
It is reproducible every time.

Version information:
Ubuntu Gutsy
gnome-power-manager 2.19.6-0ubuntu4

Revision history for this message
Erik Meitner (e.meitner) wrote :

I also have the same problem.
The system would suspend when it was idle for 20 minutes, as the settings instruct it. Upon waking it would immediately go into hibernation. GPM was never set to hibernate in any situation.
Manually suspending works as expected.

Running up-to-date Gutsy.

May be related:
bug# 128852

Will attach an piece of the syslog and /etc/defaults/acpi-support

Revision history for this message
Erik Meitner (e.meitner) wrote :

Attaching /etc/defaults/acpi-support as it may prove helpfull.
This is the laptop:
https://wiki.ubuntu.com/LaptopTestingTeam/ThinkpadT60-5BU

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

The laptop I was using was a Lenovo Thinkpad T60 too.

Revision history for this message
Roman Kreisel (roman-kreisel+launchpad) wrote :

i can confirm this bug. I'm using a Thinkpad R51.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

See bug 149665, likely to be a duplicate.

Changed in gnome-power:
status: Unknown → New
Revision history for this message
Russell Cloran (russell) wrote :

I have this problem on two machines - IBM T41 laptop and desktop based on Intel D945GTP.

Revision history for this message
electricalen (electricalen) wrote :

I also have this problem, running the latest Gutsy on my desktop machine.

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Hi There
Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you?, Can you please try with the live environment of the Desktop CD of the development release - Hardy Heron?

Thanks in advance.

Changed in gnome-power-manager:
assignee: nobody → sourcercito
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
nynexman4464 (alex-alexrock) wrote :

When I booted from the live cd there was no hibernate option, so I'm not sure how accurate this is, but performing the same steps above, the laptop (an IBM T23) wouldn't suspend on battery, but would on AC.

A very quick web search makes it look like hibernate may not be supported from a live cd? If that's the case I can try installing the development version later on when I get the chance.

Revision history for this message
nynexman4464 (alex-alexrock) wrote :

I forgot to mention that the suspend option in the quit menu worked regardless of battery status.

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Hi there
You're absolutely right, sorry about that, i meant to ask the test in the development version of Ubuntu, Hardy Heron, not the live cd environment.

I can't reproduce this using suspend due the fact I've issues with my BIOS and ACPI, but hibernate works fine for me while on AC or battery. You can take a look at https://wiki.ubuntu.com/DebuggingGNOMEPowerManager to see what information could be of help and how to collect it so we can track down this issue.

Thanks again and sorry about the previous mistake.

Revision history for this message
nynexman4464 (alex-alexrock) wrote :

Yes, this particular problem has been resolved in hardy (mostly). On AC power the laptop goes to sleep and wakes properly after two minutes. On battery it does nothing. However, it seems that in gconf the key /apps/gnome-power-manager/actions/sleep_type_battery is set to 'disabled' instead of 'suspend'. Changing it to 'suspend' allows it to sleep and wake properly after two minutes. So I suspect this is a new bug unrelated to this problem, possibly #188639.

Changed in gnome-power-manager:
assignee: sourcercito → desktop-bugs
status: Incomplete → Triaged
Revision history for this message
Matt Zimmerman (mdz) wrote :

I see something similar to this on 8.04. I set my preferences to suspend after 1 hour of idle time when on AC. Most of the time (though not always) when it suspends from being idle, when I wake it up, it immediately hibernates.

I think that in this case, it is related to how much time passes after the suspend. If it is left overnight, then it always hibernates when awakened, but if I wake it up shortly after the suspend, it seems to resume OK.

The only case I have set to 'hibernate' is 'when battery power is critically low'. I see nothing in syslog which indicates why hibernation is being activated.

I don't seem to have this problem on battery power, though my settings for idle and lid close are identical.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Matt: please tell this upstream, I've said a few weeks ago that this was fixed.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I ran gnome-power-manager with --verbose, and the log seems to provide some hints as to the nature of the problem. I see the following sequence of events:

[system_timer] gpm-idle.c:171 (23:38:29): System idle timeout
[gpm_idle_set_mode] gpm-idle.c:98 (23:38:34): Doing a state transition: 3
[idle_changed_cb] gpm-manager.c:876 (23:38:34): Idle state changed: SYSTEM
[gpm_inhibit_has_inhibit] gpm-inhibit.c:336 (23:38:34): Valid as no inhibitors
Saving to syslog: Suspending computer. Reason: System idle.[gpm_info_event_log] gpm-info.c:594 (23:38:34): Adding 5 to the event log
[gpm_control_get_lock_policy] gpm-control.c:389 (23:38:34): Using custom locking settings (1)
[gpm_screensaver_lock] gpm-screensaver.c:250 (23:38:34): doing gnome-screensaver lock
[gpm_control_suspend] gpm-control.c:439 (23:38:34): emitting sleep

** (gnome-power-manager:28309): WARNING **: Method failed
(An unknown error occured)
[gpm_control_suspend] gpm-control.c:447 (09:37:37): emitting resume
[...]
[gpm_control_suspend] gpm-control.c:451 (09:37:37): emitting sleep-failure
[...]
[idle_do_sleep] gpm-manager.c:813 (09:37:37): cannot suspend (error: General failure: An unknown error occured), so trying hibernate

This shows:

1. The system being idle for the specified period of time, and gpm deciding to sleep
2. The system resuming some 10 hours later
3. gpm detecting a failure to suspend, though in fact it was suspended for 10 hours
4. gpm trying hibernation instead, still trying to satisfy the original request to suspend

I see that others have seen the opposite, so it may fall back from hibernate to suspend as well. I'm attaching the complete log.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I've passed the above analysis and log file to the upstream bug as well.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Sounds similar to Bug #35154 ...

Revision history for this message
Matt Zimmerman (mdz) wrote :

I think that's a distinct problem, as the one I've described here (which I think matches the original report) appears to be specific to gnome-power-manager.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This may be caused by a D-Bus method call being made across the suspend, and the reply being lost by the bus internal timeout (or that of the method call itself).

There are other similar issues with GNOME Power Manager caused by this problem.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Scott:
Hmm. That would mean that the underlying cause of similar bugs like Bug #32143 would be the same as this and what I really would be asking for is dbus to support discontinuous time (i.e. note when the system time had jumped and account for it).

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Scott:
Actually now I think about it, why would the order of hibernate/suspend change depending on whether you are on AC or battery if it's due to lost timeouts?

Changed in gnome-power:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.