|
TuxOnIce development has been sponsored by:
|
Software Suspend - Userspace User InterfaceThe user interface for Suspend2, Suspend2-UserUI, is now a separate program that runs in userspace - it no longer exists in the kernel. This allows for greater flexibility in the user interface, and less potential for fatal issues to arise in kernel-space. Suspend2-UserUI is an optional component of Suspend2, however, it can make your suspending experience much more enjoyable. Having Suspend2-UserUI allows you to interact with the suspend process as it happens. This mean you can press Escape to cancel a suspend, press R to toggle rebooting at the end of suspending, change the verbosity level to see what's going on, etc. There currently exists two user interfaces for Suspend2:
Obtaining itBoth UIs are available in the same UserUI package from the Downloads page. This is a source package - distributed binaries may be available for your distribution. Building itDownload the userui sources (get the latest one from the download page), ~ $ wget http://tuxonice.net/downloads/all/suspend2-userui-0.5.1.tar.gz extract them, ~ $ tar xzf suspend2-userui-0.5.1.tar.gz compile them, ~ $ cd suspend2-userui-0.5.1 and install them ~/suspend2-userui-0.5.1 $ suThis will install suspend2ui_text and suspend2ui_fbsplash into "/usr/local/sbin" by default. Using itIn your hibernate script, put the path to the suspend2ui_text or suspend2ui_fbsplash binary into /proc/suspend2/userui_program. For example, in the hibernate script use a line like ProcSetting userui_program /usr/local/sbin/userui_text If you have your own custom script, use echo /usr/local/sbin/userui_text > /proc/suspend2/userui_program The UI program is started automatically by the kernel, and lives for the duration of the suspend and resume process. It is saved into the image, however upon resume it will not automatically be available for the first part of resuming: Resuming is split into two portions - the first portion will read in the core kernel image and the userui, the second portion reads other userspace application data and file caches, etc. This means that after the first portion of the image is read on resume, the original UI process from suspend time will continue running. If you wish to have a UI prior to that point (for the first portion of resume), you will need to incorporate your UI program inside an initrd or initramfs, (along with your theme if you are using the fbsplash UI). By default, the kernel will look in the same location for the UI as when suspending (as determined by the userui_program proc entry at suspend time). However, you may have it in a different location in your initrd, and simply echo the appropriate path into /proc/suspend2/userui_program prior to resuming. As initrd/initramfs creation is very diverse and distribution specific, the specifics will not be covered here. suspend2ui_fbsplash specificsThe fbsplash UI will use the suspend2 theme found in /etc/splash/suspend2/. The easiest way to manage your themes is to simply create a symlink /etc/splash/suspend2 that points to the directory containing your preferred theme. Last updated: Thu, 05 Jun 2008 10:45:57 +0800 Frozen penguins image by darkmetal and adapted by Nigel Cunningham "Tuxsicle" artwork by Pierre-Philippe Coupard Copyright © 2003-2005 Bernard B |