Laptop-mode (on battery) causes very slow hibernation.

Bug #40034 reported by Nikolaus Rath
24
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

With the Flight 6 LiveCD, my Dell Latitude D810 hibernates perfectly as long as there is AC power. If power is unplugged, any hibernation attempt leads to high hard-drive activity but nothing else. Running dmesg | tail after the attempt doesn't seems not to give any related information.

Revision history for this message
Luka Renko (lure) wrote :

Did you wait long enough? It seems that hibernation is sloooow when laptop-mode is active.

Revision history for this message
Nikolaus Rath (nikratio) wrote :

I waited about 60 seconds, then I pressed Ctrl-Alt-F1 to get a console (as the screen was black). Does keyboard activity interrupt the hibernation? Otherwise, no hibernation took place in the next 5 minutes as well.

Changed in acpi-support:
status: Needs Info → Unconfirmed
Revision history for this message
Nikolaus Rath (nikratio) wrote :

I tried it again, but this time disabling laptop-mode before the hibernation. It still doesn't work. However, the behaviour is somehow different:

1) First, there's a lot of activity and the screen gets black.
2) Then the harddrive switches off (judging from the noise).
3a) If there is AC power, the harddrive turns on again for a few seconds and the system finally shuts down.
3b) On battery, the harddisk also powers on again, but then system keeps running and doesn't respond to any input. The HD led is activated permanently. I did a hard reset after having waited for 5 minutes.

Paul Sladen (sladen)
Changed in acpi-support:
status: Unconfirmed → Confirmed
Revision history for this message
Nikolaus Rath (nikratio) wrote :

Why was the bug title changed? The problem is apparently not related to laptop-mode *and* the hibernation is not slow but doesn't work at all.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Hibernation ought to work if you leave it half an hour or so, and it seems highly likely that it's linked to one aspect of laptop-mode's behaviour. I'm working on it.

Revision history for this message
Hezekiah Carty (hez) wrote :

I can confirm this on my Sony Vaio VGN-S260 -- suspend-to-ram works without trouble, but hibernate/suspend-to-disk takes 10-20 minutes to complete. I am able to resume from hibernation without any trouble once the system finally shuts down, though it seems to take longer to resume from hibernation than it does in Breezy.

Revision history for this message
Geoff Hoff (gahoff) wrote :

The problem is easier to see if you edit /etc/default/acpi-support and set USE_DPMS=false
. Instead of writing memory pages to swap quickly, it takes an extremely long time if running on battery.

I tried killing acpid while my laptop was still plugged in. I then unpluged my laptop and it exibited the same slow hibernate (Fujitsu P7010).

This problem started when I upgraded to Dapper Beta.

Revision history for this message
Geoff Hoff (gahoff) wrote :

If I disable laptop-mode in/etc/default/acpi-support as is the default, the problem goes away.

Revision history for this message
Angelo Lisco (angystardust-gmail) wrote :

Matt Zimmerman has just uploaded a new version of 'acpi-support' package...

acpi-support (0.72) dapper; urgency=low
 .
   * Re-disable laptop-mode by default, to work around LP#12483
     - Has the pleasant side effect of making the comment match the code

Revision history for this message
Hezekiah Carty (hez) wrote :

I'm using acpi-support 0.73 and just had the slow-hibernate problem again. It was working ok for a while, but last night when I set my laptop to hibernate (it's battery was low, ~6%) it took 10-20 minutes before the system actually finished the process. That said, it did resume properly this morning when I turned the computer back on.

Revision history for this message
Nikolaus Rath (nikratio) wrote :

Strangely enough, it seems to work if laptop mode is disabled in /etc/default/acpi-support. However, just running /etc/init.d/laptop-mode stop before hibernation does not help at all. Would it be possible to disable laptop-mode only immerdiately before hibernation and enable it again after resume?

(Tested with Dapper Beta.).

Revision history for this message
Geoff Hoff (gahoff) wrote :

Edit /etc/laptop-mode/laptop-mode.conf and change CONTROL_HD_WRITECACHE=1 to CONTROL_HD_WRITECACHE=0.

That fixed it for me.

Revision history for this message
Nikolaus Rath (nikratio) wrote :

I can confirm this for a Dell Latitude D810, CONTROL_HD_WRITECACHE=0 works around the bug and is IMO much better than disabling laptop mode completely. I'd rather do without hibernation than sacrifice battery life for it...

Revision history for this message
reh4c (gene-hoffler) wrote :

"CONTROL_HD_WRITECACHE=0" change from Geoff works on my Fujitsu LOOX T86A. Thanks! The subnotebook entered hibernation in 15-20 seconds vice 5, 10, 15, etc. minutes. Please incorporate fix into Dapper final if possible. Does anyone know of any negative repercussions of changing the default setting?

Revision history for this message
Martin Bergner (martin-bergner) wrote :

There was an update so is the problem solveld?

Revision history for this message
reh4c (gene-hoffler) wrote :

That update seems to have worked. My laptop now consistently hibernates in 12-15 seconds. Also, I had another problem until the last update...X would not restore properly. I had to hit Ctrl-Alt-F2 to login through the command line. I hibernated twice this morning within 15 seconds, and the laptop came out of hibernation successfully. I'll keep "testing" and report back any problems. Thanks.

Revision history for this message
Martin Bergner (martin-bergner) wrote :

I will then mark this bug fixed, if the problem reoccurs please reopen the bug.

Changed in acpi-support:
status: Confirmed → Fix Released
Revision history for this message
Nikolaus Rath (nikratio) wrote :

I don't think that disabling HD writecache control in laptop_mode_tools is a real fix. A proper solution would be to save and restore the HD writecache status in the ACPI hibernation script. After all, why shouldn't I want laptop mode to manage the write cache? And what if want to tune the settings myself?

Please consider reopening this bug. I can also provide the neccessary patch if you accept my solution.

Revision history for this message
Nikolaus Rath (nikratio) wrote :

CONTROL_HD_WRITECACHE=0 is now the default in laptop-mode, so is there any reason not to active laptop mode by default in acpi-support.conf? The hibernation issues should be fixed by the change in laptop mode.

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.