[Pm-utils] [Patch] TuxOnIce pm/functions patch draft.

Nigel Cunningham nigel at nigel.suspend2.net
Thu Jan 31 15:15:27 PST 2008


Hi.

Till Maas wrote:
> On Mon January 28 2008, Nigel Cunningham wrote:
> 
>> Here is a draft patch for adding TuxOnIce support to the pm/defaults and
>> pm/functions files. I'm calling it a draft because I want your feedback
>> on whether it's the right sort of approach. I'm not really keen on
>> adding a variable per sysfs entry, and so have only added the most
>> frequently used ones in this iteration.
> 
> How about we use a function that is called when TuxOnIce is used to change the 
> config? E.g. /etc/config.d/tuxonice.conf would contain something like:
> 
> tuxonice_config() {
> # enable userui
> echo "1" > /sys/power/tuxonice/userui_interface/enabled
> 
> # compression algorithm, possible values are foo, bar...
> echo "lzf" > /sys/power/tuxonice/compression/algorithm
> }
> 
> And whenever TuxOnIce should be used to suspend, then it first calls 
> tuxonice_config. This way you do not need all the variables and it is 
> possible to configure everything pretty easy and maybe it is even possible to 
> easily keep the TuxOnIce config in sync with this, because it is basically an 
> example config only with a function header.

Sorry for the slow reply. New laptop. Lets of setting up to do.

This looks like a good, simple and straightforward idea, and sort-of 
matches with Richard's "Can we reuse something in config.d?" question. 
It also makes things nice and simple if we add new entries (eg when I 
get around to finishing cluster support).

It does raise one question for me though - I'm dreaming of some day 
getting around to making a nice gui for configuring all these power 
management options (not just tuxonice). It probably wouldn't simplify 
that task much... perhaps we could think of a way to help there? ... in 
the hibernate script, we would have

procsetting compression/algorithm lzf
procsetting user_interface/program "/usr/sbin/tuxoniceui_fbsplash"

Perhaps something like that would be easy to implement and easiest to 
parse? (Yeah, it's sysfs now - procsetting is just historical).

Nigel


More information about the Pm-utils mailing list