On Fri, Sep 15, 2006 at 04:08:34PM +0200, Michael Biebl wrote: > Stefan Seyfried wrote:
> > 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. The problem i have with this automatic fallback is, that it makes it harder to debug. People often have trouble telling me how they initiated the suspend, so it could be even worse for them to get them to find out, which of the three methods was used when it fails. This is why i put the "METHOD != kernel, but no s2disk installed" case prominently into the logfile and even pop up a message telling the user to look there. _If_ he changes it to "kernel" by himself, he will probably be able to report this :-) Another thing is, that this SVN trunk branch is not really for public consumption right now anyway. It is usable by experienced users of course, but i'd expect those to select a method. Soon, when the more drastic changes will go in there, you'll need a pretty recent HAL to use it anyway - which means you'll also need a pretty recent kernel. And with a pretty recent kernel, you'll better use uswsusp than in-kernel IMO :-). Yes, there will probably for a long time still be support for in-kernel- suspend in powersave, but i'm not too sure if an automatic fallback is the correct way to handle this. If someone really wants to use the "obsolete" method, he probably should choose by himself. > 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. -ENOPATCH :-) > 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. Seriously, i always wanted to look at suspend2, but never got around to doing it. I am not a big kernel hacker, but i need to use recent kernels often, and i need to report bugs against "our" (SUSE) latest kernels. And since suspend is not going near any official kernel in the near future, i just could not afford the time messing around with it. The other problem is, that the hibernate script is apparently so damned good that we really need to implement every feature that is in there in powersave to make suspend2 work as well with powersaved as it works with hibernate. In fact we considered throwing away much of powersave's script-foo and just using the hibernate package instead (which also works with in-kernel suspend and probably today even with userspace suspend). However, again, we never got to implementing this. Now we are moving towards using HAL and moving stuff there (which was not an easy decision, but since we felt that having one unified power management interface for all applications, be it kpowersave, gnome-power-manager or the new kubuntu powermanagement application would be the best thing and since many people actually think that everything should be put into HAL, we bite the bullet), we probably will go that route. If somebody wants support for suspend2, he will simply submit it to the HAL project and it will work with kpowersave, gnome-power-manager and kubuntu. We even have to temporarily accept that some features that were already there will take some time until they reappear, but we figured that in the long run, competing power management solutions will not be a sensible thing to have. > 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. I think the distribution packager should just set a default that is correct for his distribution's kernel. If a user really compiles the source code and installs it by himself, figuring out the configuration of the suspend method should be the smallest problem. Maybe we can improve on the documentation, though. -- Stefan Seyfried \ "I didn't want to write for pay. I QA / R&D Team Mobile Devices \ wanted to be paid for what I write." SUSE LINUX Products GmbH, Nürnberg \ -- Leonard Cohen _______________________________________________ powersave-devel mailing list powersave-devel@forge.novell.com http://forge.novell.com/mailman/listinfo/powersave-devel