hibernation fails to power off and reboots because "platform" is inconditionally used instead of "shutdown"

Bug #226069 reported by Tormod Volden on 2008-05-03
62
This bug affects 8 people
Affects Status Importance Assigned to Milestone
pm-utils (Debian)
Fix Released
Unknown
pm-utils (Ubuntu)
Undecided
Unassigned
Nominated for Hardy by Tormod Volden
uswsusp (Debian)
Fix Released
Unknown

Bug Description

This worked well in Gutsy. I am now running linux-image-generic 2.6.24.17.19. The laptop is an Acer TravelMate 8101WLMi.

The hibernation seems to go well, it's just that it reboots instead of powering off. The resume goes well.

There is something similar in bug #190095 (another Acer).

dmesg clearly shows that "platform" is being used, and this is hardcoded in /usr/lib/pm-utils/functions:
[ 387.636579] PM: suspend-to-disk mode set to 'platform'

However, my laptop needs "shutdown". This is the default in /etc/default/acpi-support, but this file is not consulted.

As can be seen in a duplicate report, this makes some laptops hang completely.

WORKAROUND:
Edit /usr/lib/pm-utils/functions and replace "platform" with "shutdown".

Tormod Volden (tormodvolden) wrote :
Tormod Volden (tormodvolden) wrote :

BTW, the only anomaly I can see during hibernation is this message on the console after it has switched from X:
[ 388.356085] drm_sysfs_suspend

Tormod Volden (tormodvolden) wrote :
Charlotte Curtis (c-f-curtis) wrote :

Have you had any luck with this bug yet? It does seem to be the same as bug #190095. My laptop is a Sharp TN10W (not Acer) but I have the same problem. This is new in Hardy - Gutsy did not have this issue.

Tormod Volden (tormodvolden) wrote :

No, I will try with HIBERNATE_MODE=platform in /etc/default/acpi-support and let you know. Normal shutdown goes fine by the way.

Charlotte Curtis (c-f-curtis) wrote :

I've gone through most of the values in /etc/default/acpi-support but I can't seem to get anything to work on my computer.

I noticed that in your dmesg (as well as in mine) it has "PM: suspend-to-disk mode set to 'platform'" - however, in my /etc/default/acpi-support it definitely says HIBERNATE_MODE=shutdown. Seems as though it's forcing "platform" even if we specify shutdown. I'm not sure if this means anything, but it seems a little odd.

Tormod Volden (tormodvolden) wrote :

Charlotte, that's a very interesting observation! I looked at it, and it seems like the old acpi scripts are not used any longer. Instead, pm-hibernate is used, which in turn reads /usr/lib/pm-utils/functions. Here "platform" is hard coded. Our /etc/default/acpi-support is not read, and there's no way to change this other than editing the hardcoding in the script. BTW, I never edited /etc/default/acpi-support and I guess the default setting there was "shutdown" for a reason. I wonder how many laptops have broken hibernation now...

After replacing "platform" with "shutdown" in /usr/lib/pm-utils/functions my laptop shut downs correctly on hibernation (and resumes/thaws as it should).

The other bug #190095 talks about kernel versions, although that might be wrongly attributed. In any case, my issue is pure user land.

Tormod Volden (tormodvolden) wrote :

I reassign this to pm-utils. Unless the kernel is supposed to make it work with "platform" on all laptops, I believe it is the fault of pm-utils of not offering the "shutdown" option.

Changed in linux:
status: New → Confirmed
description: updated
description: updated
description: updated

This seems to have been fixed in Debian's pm-utils 1.1.0-1, at least there's a possibility to configure it, and it checks for valid values.

Charlotte Curtis (c-f-curtis) wrote :

Tormod, that fixed it, thank you so much! I had no idea /etc/default/acpi-support wasn't doing anything. The only remaining hibernation "issue" I have is the fan revving up to full speed for a few seconds, but I can live with that (and it happened in Gutsy too, so I'm used to it). I wonder if this was an oversight, or if that config file is deprecated?

Tormod Volden (tormodvolden) wrote :

This is fixed in the Intrepid version 1.1.0-1ubuntu1, where you can add a file in /etc/pm/config.d/ which contains:
HIBERNATE_MODE="shutdown"

Changed in pm-utils:
status: Confirmed → Fix Released
Tormod Volden (tormodvolden) wrote :

Well, in my case it's not really fixed in Intrepid, in the sense that this worked out of the box in Gutsy (because "shutdown" was default in acpi-support) and no longer in Intrepid, since the default is to use the kernel's default, which is wrongly "platform" on my laptop. And definitely broken in Hardy. But maybe the fault has shifted to the kernel.

After a reboot (no resume), "cat /sys/power/disk" gives:
[platform] test testproc shutdown reboot
which shows "platform" is default (in brackets) but that should have been "shutdown" for it to work.

Tormod Volden (tormodvolden) wrote :

I filed kernel bug #237458 for the issue that the kernel selects "platform" as default on my laptop.

linovski (avelinorego) wrote :

At Hardy, recent updates rewrite /usr/lib/pm-utils/functions file

Have to fix the problem again.

Please, Hardy developers say something about...

Götz Christ (g-christ) wrote :

I have the same problem in a Desktop since Hardy, in an updated Kubuntu Intrepid 8.10. When I put the system to hibernate it shutsdown and after ~1 second it starts again.

"cat /sys/power/disk" shows

[platform] test testproc shutdown reboot

Tormod Volden (tormodvolden) wrote :

I'd suggest you file a new bug specifically for your hardware, like I did in bug #237458. This bug report has been closed so your issues can not be tracked here.

maximi89 (maximi89) wrote :

Sorry, but the bug with pm-utils was fixed, the problem are with uswsusp 0.8-1.1+b1

maximi89 (maximi89) wrote :

maximi89@Maximiliano:~$ cat /sys/power/disk
[platform] test testproc shutdown reboot

maximi89@Maximiliano:~$ cat /etc/uswsusp.conf
# /etc/uswsusp.conf(8) -- Configuration file for s2disk/s2both
resume device = /dev/sda6
compress = y
early writeout = y
image size = 427135303
RSA key file = /etc/uswsusp.key
shutdown method = platform <------ bad setted shutdown

that need to say:
shutdown method = shutdown

Changed in pm-utils (Debian):
status: Unknown → New
Changed in uswsusp (Debian):
status: Unknown → New
maximi89 (maximi89) wrote :

Suspend don't works, hibernate works great with pm-utils.

maximi89 (maximi89) wrote :

Suspend works but i need to edit the file of pm-utils
 /usr/lib/pm-utils/defaults

SUSPEND_MODULES="nvidia ehci_hcd ohci_hcd uhci_hcd iwl3945"
SLEEP_MODULE="uswsusp"
HIBERNATE_MODE="shutdown"

Works Fine now.

Peter Schwenke (bluetoad) wrote :

I vote for this to be fixed in Hardy since it is LTS. So it is not Fix Release for Hardy.

Changed in pm-utils (Debian):
status: New → Fix Released
Changed in uswsusp (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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