Hi.

On Fri, 2006-09-15 at 16:08 +0200, Michael Biebl wrote:
> Stefan Seyfried wrote:
> > Hi,
> > 
> > just to let everybody know :-)
> > I checked in a small change into SVN trunk that will make powersaved use
> > the userspace suspend (from http://suspend.sf.net) per default.
> > To use it, you need to have s2disk and resume installed in /usr/sbin and
> > configured correctly. This usually involves changing your initrd and
> > configuring it via /etc/suspend.conf.
> > 
> > If you do not want to use userspace suspend but the old and slow in-kernel
> > swsusp, just set SUSPEND2DISK_METHOD="kernel" in /etc/powersave/sleep.
> > 
> > Have fun and good luck :-)
> 
> It works fine here with uswsusp. I have some objections though because
> the current approach breaks the setup for all users still running the in
> kernel swsusp (either because the don't have a initrd, a kernel < 2.6.17
> or simply not the uswsusp package installed). This is not good imho.
> Why not do the following:
> 
> If SUSPEND2DISK_METHOD is not explictly set, first try uswsusp, then
> fallback to swsusp. Only fail if both methods are not successful.
> If SUSPEND2DISK_METHOD is set, only try this method.
> This way people using swsusp don't have to change their configuration.
> 
> I would even prefer if suspend2 was added to this list and not run via a
> separate hook (EVENT_GLOBAL_SUSPEND2DISK_OTHER) because it needs to have
> the hibernate scripts package installed, which basically duplicate all
> the functionality of the powersaved scripts (unloading modules,
> unmounting partitions, stopping services etc) and needs to be configured
> separately.
> So basically simply call the equivalent of
> "echo disk > /sys/power/state" for suspend2 in do_acpi_sleep.
> But then again, I don't know if it's that easy for suspend2 or if you
> need more configuration to get it running.

The next stable release of Suspend2 will have support for being a
drop-in replacement for swsusp. As part of preparing for that, I've made
it so that the most common configuration (lzf compression, no
encryption) works 'out of the box', and still works if LZF wasn't
compiled in. As a result, it will be that easy. This might also make
things easier for Stefan - the echo disk > /sys/power/state will start
Suspend2 as well, if the user has configured it that way. The old method
of activating suspend2 (echo > /sys/power/suspend2/do_suspend) will
still work, regardless of whether replacing swsusp is enabled or not.

> Ideally powersaved would then (if SUSPEND2DISK_METHOD is not set), first
> try uswsusp, then fallback to suspend2 and finally to swsusp. We could
> argue if it would be better to try suspend2 before uswsusp.

We could. Wouldn't it be better, though, to let the user choose what
order they want things to happen in?

Nigel

_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to