[Pm-utils] [Patch] Add TuxOnIce support to pm-utils/functions
Nigel Cunningham
nigel at nigel.suspend2.net
Sat Jan 26 19:24:01 PST 2008
Hi Till.
Till Maas wrote:
> I sent this mail directly to Nigel, but I wanted to reply to the mailinglist.
> Therefore Nigel, you get this now twice, to make it easier for you to reply
> to this mail.
>
> On Sat January 26 2008, Nigel Cunningham wrote:
>
>> Here's another patch for adding TuxOnIce support. I've put the TuxOnIce
>> tests at the start on the assumption that if someone goes to the trouble
>> of patching their kernel with support for it, they probably want to use
>> it. Perhaps it would be good to have a config option that could be used
>> to force the use of a particular implementation?
>
> Your patch cannot be applied easily against pm-utils, because it assumes that
> some other patches are applied, too. E.g. there is no s2disk or
> suspend_hybrid support in the official pm-utils. Pm-utils is currently kind of
> reanimated, therefore it may take some time to get this into pm-utils. Maybe
> you should first send these patches to the maintainers in your used
> distribution. Then the users of it can already benefit from them.
Sorry. I prepared the patches against the version of pm-utils I have
installed on my desktop machine (Gutsy, slowly migrating to Hardy). I've
received the email from Richard pointing to the git tree and will
prepare patches against that.
>> The other area I'd like to add support for is setting the various
>> configuration options for TuxOnIce. Any suggestions in this area?
>
> It would help if you describe which options are there and how they are passed
> to TuxOnIce.
Okay. All of the options are configured by simply doing echo >
/sys/power/tuxonice/whatever. A complete listing follows, with brief
descriptions appended. The short answer is that the options allow you to
enable/disable/tune features according to what's optimal for your
computer, your usage preferences and/or for debugging. I can provide
full descriptions for all of the options (I'm in the process of updating
the Documentation/power/tuxonce* files, which contain descriptions of
these options anyway, so that can do double duty).
Regards,
Nigel
nigel at desktop:~$ find /sys/power/tuxonice/
/sys/power/tuxonice/
/sys/power/tuxonice/do_hibernate -> Initiate a cycle
/sys/power/tuxonice/do_resume -> Initiate a resume (initrd/ramfs)
/sys/power/tuxonice/extra_pages_allowance -> RAM kept free for drivers
/sys/power/tuxonice/image_exists -> R: Does image exist? W: Remove image
/sys/power/tuxonice/resume -> resume= value (W: modify w/out rebooting)
/sys/power/tuxonice/alt_resume_param -> Resume another image after
hibernating (imagine lab - hibernate user sessions, resume login screen)
/sys/power/tuxonice/debug_info -> Debugging info :)
/sys/power/tuxonice/ignore_rootfs -> Warn user before resuming if rootfs
mounted rw?)
/sys/power/tuxonice/image_size_limit -> Soft upper limit on image size
/sys/power/tuxonice/last_result -> Bit flag - if last hibernate failed, why?
/sys/power/tuxonice/no_multithreaded_io -> Disable multithreaded I/O
(enabled by default)
/sys/power/tuxonice/full_pageset2 -> Full image (enabled by default)
/sys/power/tuxonice/reboot -> Reboot instead of powering down?
(Overrides powerdown method)
/sys/power/tuxonice/replace_swsusp -> echo disk > /sys/power/disk
triggers TuxOnIce?
/sys/power/tuxonice/resume_commandline -> Commandline used when resuming
(writable so sensitive contents can be cleared)
/sys/power/tuxonice/version -> Version # of TuxOnIce
/sys/power/tuxonice/no_load_direct -> Load pages direct to dest at
resume time if original locn unused? (Default yes)
/sys/power/tuxonice/freezer_test -> Just test freezer & image prep,
don't write image?
/sys/power/tuxonice/test_bio -> Just test speed of writing image, abort
instead of powering off.
/sys/power/tuxonice/test_filter_speed -> Just test speed of compression,
don't write anything.
/sys/power/tuxonice/slow ->
/sys/power/tuxonice/no_pageset2 -> Don't save image in 2 parts (= swsusp)
/sys/power/tuxonice/late_cpu_hotplug -> Do cpu hotplugging before &
after atomic copy (default)
/sys/power/tuxonice/pre_hibernate_command -> Optional command to run
before hibernating (wait for completion, abort if !0 exit code)
/sys/power/tuxonice/post_hibernate_command -> Optional command to run
post-resume (result ignored)
/sys/power/tuxonice/alloc
/sys/power/tuxonice/alloc/failure_test -> Simple allocation failure
testing i/face.
/sys/power/tuxonice/alloc/find_max_mem_allocated -> Find max memory usage.
/sys/power/tuxonice/storage_manager -> Support for userspace helper for
enabling/disabling access to (eg) networked storage
/sys/power/tuxonice/storage_manager/simulate_atomic_copy -> Testing
interface
/sys/power/tuxonice/storage_manager/enabled
/sys/power/tuxonice/storage_manager/program
/sys/power/tuxonice/storage_manager/activate_storage
/sys/power/tuxonice/user_interface -> Support for userspace user interface
/sys/power/tuxonice/user_interface/default_console_level -> Amount of
detail shown
/sys/power/tuxonice/user_interface/debug_sections -> Debugging info
area(s) shown
/sys/power/tuxonice/user_interface/log_everything -> klog debugging
messages?
/sys/power/tuxonice/user_interface/pm_prepare_console -> Call
pm_prepare_console? (Some people found it problematic in the past)
/sys/power/tuxonice/user_interface/enable_escape -> Let use press escape
to cancel hibernating or resuming?
/sys/power/tuxonice/user_interface/pause_between_steps -> Pause between
steps in the process (useful for debugging)
/sys/power/tuxonice/user_interface/enabled
/sys/power/tuxonice/user_interface/progress_granularity -> # of steps in
progress bar
/sys/power/tuxonice/user_interface/program -> Userui program path
/sys/power/tuxonice/lid_file -> Use /proc/acpi/button/$lid_file to
determine if lid open when we wake
/sys/power/tuxonice/wake_delay -> Set RTC alarm to $wake_delay seconds
after we power off
/sys/power/tuxonice/wake_alarm_dir -> Which wake alarm to use
/sys/power/tuxonice/post_wake_state -> What to do when wake due to RTC
alarm (eg write image, suspend to ram, sleep 15 minutes then power off
fully)
/sys/power/tuxonice/powerdown_method -> How to power off when finished
writing the image (Non ACPI power off / S3 / S4 / S5)
/sys/power/tuxonice/compression
/sys/power/tuxonice/compression/expected_compression -> Expected
compression ratio - used to not eat memory unnecessarily when storage
size < memory used
/sys/power/tuxonice/compression/enabled
/sys/power/tuxonice/compression/algorithm - LZF by default (we provide
an LZF cryptoapi module).
/sys/power/tuxonice/block_io
/sys/power/tuxonice/block_io/target_outstanding_io - Amount of I/O to
seek to have on the fly at once. Will do more if more memory is available.
/sys/power/tuxonice/block_io/queue_trigger - How many pages to fill
before submitting the bios.
/sys/power/tuxonice/swap
/sys/power/tuxonice/swap/swapfilename - Swapspace to automatically
swapon @ start of cycle & swapoff at end
/sys/power/tuxonice/swap/headerlocations - Read to get resume= values
for swapfiles
/sys/power/tuxonice/swap/enabled
/sys/power/tuxonice/file
/sys/power/tuxonice/file/target - Location of file (nonswap) to write
image to. When written, resume= is set to matching dev/block that should
be put into resume= on kernel command line.
/sys/power/tuxonice/file/enabled
More information about the Pm-utils
mailing list