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

Stefan Seyfried seife at suse.de
Mon Apr 28 07:53:32 PDT 2008


Michael Biebl wrote:
> 2008/4/28 Stefan Seyfried <seife at suse.de>:
>> 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.
> 
> Unless the kernel is fixed, we have to workaround this somehow.

>>  > 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).
> 
> Ok, so we should notify the kernel hackers about this (who is the
> right contact for this, Rafael?)

yes, but it seems already fixed (the write error means the kernel did not
accept platform and still uses shutdown). I had no problem suspending afterwards.

> As long as we don't have such support in the kernel, checking for
> HIBERNATE_METHOD seems to be the best compromise to me.

But it probably belongs into a hook that is shipped with the broken kernel
package and should not slow down everyone's suspend.
I mean - there is a considerable amount of bloat already in pm-utils, and i'd
avoid adding additional stuff that just slows things down even more.
-- 
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