[Pm-utils] [RFC] Writing "${HIBERNATE_MODE}" unconditionally to /sys/power/disk

Stefan Seyfried seife at suse.de
Mon Apr 28 07:13:46 PDT 2008

Michael Biebl wrote:
> Hi,
> please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=450515
> for the background.
> Apparently, writing "platform" unconditionally to /sys/power/disk can
> lead to suspend failures, if this method is not supported.

Well, this needs to be fixed in the kernel.

> If I read the kernel documentation correctly [1], "firmware" or
> "platform" can be not supported on certain platforms. The way to
> detect that, is probably to grep for it in /sys/power/disk. The
> documentation is not clear about that.

I do not believe that "firmware" still exists (this was the old s4bios code
that never worked on more than one machine)

> So the question: Should we generally check for HIBERNATE_MODE first:

I don't think so. The kernel should just fall back to a sane default of
"shutdown" if platform is not supported.
And indeed, i get a "write error: invalid argument" if i try to echo platform
into /sys/power/disk in qemu-kvm (where platform is not supported).
Stefan Seyfried
R&D Team Mobile Devices            |              "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."

This footer brought to you by insane German lawmakers:
SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

More information about the Pm-utils mailing list