How to Install Tuxonice in Ubuntu
Sponsored Link
Tuxonice is an alternative way to hibernate your machine than the standard ubuntu power manager way. It generally claims to be more configurable and flexible than the standard method, with faster hibernate and resume times.
Original article:http://lists.tuxonice.net/lurker/message/20090409.181125.d20e0bbe.en.html
Add the following PPA to your sources list
deb http://ppa.launchpad.net/tuxonice/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/tuxonice/ppa/ubuntu jaunty main
This repository is signed with 1024R/DEC8FAAC OpenPGP key
Open a terminal and enter the following:
gpg --
keyserver keyserver.ubuntu.com –recv DEC8FAAC
gpg --
export --
armor DEC8FAAC | sudo apt-key add -- && sudo apt-get update
—————————————————————————————————-
Relevant files for Ubuntu Jaunty
https://launchpad.net/~tuxonice/+archive/ppa/+files/linux-headers-2.6.28-13-generic_2.6.28-13.43+tuxonice2_amd64.deb
https://launchpad.net/~tuxonice/+archive/ppa/+files/linux-headers-2.6.28-13-
generic_2.6.28-13.43+tuxonice2_i386.deb
https://launchpad.net/~tuxonice/+archive/ppa/+files/linux-image-2.6.28-13-generic_2.6.28-
13.43+tuxonice2_amd64.deb
https://launchpad.net/~tuxonice/+archive/ppa/+files/linux-image-2.6.28-13-generic_2.6.28-
13.43+tuxonice2_i386.deb
https://launchpad.net/~tuxonice/+archive/ppa/+files/tuxonice-userui_1.0-
1~ppa2~jaunty1_amd64.deb
https://launchpad.net/~tuxonice/+archive/ppa/+files/tuxonice-userui_1.0-
1~ppa2~jaunty1_i386.deb
http://www.tuxonice.net/downloads/all/hibernate-script-2.0.tar.gz
files for intrepid can be found here: https://launchpad.net/~tuxonice/+archive/ppa
—————————————————————————————————-
Install the relevant files for your architecture (choose either the i386 or amd64 files only).
Reboot once the new kernel has been installed.
Extract hibernate-script-2.0.tar.gz somewhere
open a terminal in the directory created and run ./install.sh
sudo -i to switch to root.
apt-get install sysfsutils
gedit /etc/sysfs.conf
Copy and past the text below into the file, then save and close.
—————————————————————————————————-
# /etc/sysfs.conf -- Configuration file for setting sysfs attributes.
#
# The sysfs mount directory is automatically prepended to the attribute paths.
#
# Syntax:
# attribute = value
# mode attribute = 0600 # (any valid argument for chmod)
# owner attribute = root:wheel # (any valid argument for chown)
#
# Examples:
#
# Always use the powersave CPU frequency governor
# devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave
#
# Use userspace CPU frequency governor and set initial speed
# devices/system/cpu/cpu0/cpufreq/scaling_governor = userspace
# devices/system/cpu/cpu0/cpufreq/scaling_setspeed = 600000
#
# Set permissions of suspend control file
# mode power/state = 0660
# owner power/state = root:power
power/tuxonice/user_interface/program = /usr/lib/tuxoniceuserui/tuxoniceui_usplash
—————————————————————————————————-
gedit /usr/share/initramfs-tools/hooks/tuxonice_userui
Copy and past the text below into the file, then save and close.
—————————————————————————————————-
#!/bin/sh
# -*- shell-script -*-
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
TUXONICE_ENABLED=/sys/power/tuxonice/user_interface/enabled
# Don't do anything if the kernel does not support tuxonice_userui,
# nor the module is there
if [ -f ${TUXONICE_ENABLED} ]; then
if [ `cat ${TUXONICE_ENABLED}` = 0 ]; then
echo "TuxOnIce user interface is disabled, skipping..."
exit 0
fi
elif [ ! -f ${MODULESDIR}/kernel/power/tuxonice_userui.ko ]; then
echo "This kernel does not seem to support TuxOnIce user interface, skipping..."
exit 0
fi
# Add the module and its dependencies and load it automatically if it
# exists
force_load tuxonice_userui
TUXONICEDIR=/usr/lib/tuxonice-userui
mkdir -p ${DESTDIR}${TUXONICEDIR}
copy_exec ${TUXONICEDIR}/tuxoniceui_text ${TUXONICEDIR}
copy_exec ${TUXONICEDIR}/tuxoniceui_fbsplash ${TUXONICEDIR}
# The following file does not exist on ia64 as usplash is not
# available on this architecture
if [ -x ${TUXONICEDIR}/tuxoniceui_usplash ]; then
copy_exec ${TUXONICEDIR}/tuxoniceui_usplash ${TUXONICEDIR}
fi
—————————————————————————————————-
gedit /usr/share/initramfs-tools/modules.d/lzo
Copy and past the text below into the file, then save and close.
—————————————————————————————————-
lzo
—————————————————————————————————-
gedit /usr/share/initramfs-tools/scripts/local-premount/tuxonice_do_resume
Copy and past the text below into the file, then save and close.
—————————————————————————————————-
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
if [ -d /sys/power/tuxonice ]; then
echo > /sys/power/tuxonice/do_resume
fi
—————————————————————————————————-
chmod 644 /etc/sysfs.conf
chmod 755 /usr/share/initramfs-tools/hooks/tuxonice_userui
chmod 644 /usr/share/initramfs-tools/modules.d/lzo
chmod 755 /usr/share/initramfs-tools/scripts/local-premount/tuxonice_do_resume
update-initramfs -c -k 2.6.28-13-generic
gedit /etc/hibernate/tuxonice.conf
find the line that says “Compressor lzf” and change to “Compressor lzo”
if there is no SuspendDevice option, create one as below, changing the device to your own swap drive location (on mine it is sda7).
## useful for initrd usage:
SuspendDevice swap:/dev/sda7
You can also use the filewriter option described below, however I have not been able to get this working on my system yet so can't provide more detailed instructions.
“For the file allocator, you should first prepare your hibernation file – this can be done by configuring your hibernate.conf file with the “FilewriterLocation” option, and running hibernate --
no-suspend. Then take a look in /sys/power/tuxonice/resume for what to pass to your kernel. You should see something like file:/dev/hda7:0x10011f, in which case you should append “resume=file:/dev/hda7:0x10011f” as a kernel parameterin your lilo.conf file or GRUB’s menu.lst.” – http://www.tuxonice.net/HOWTO-2.html”
If the line below is not there put it in.
ProcSetting userui_program /usr/lib/tuxonice-userui/tuxoniceui_usplash
gedit /boot/grub/menu.lst
add resume=swap:/dev/sda7 to the end of the new kernel line. (changing the device to your swap drive, or hibernation file)
add resume=swap:/dev/sda7 noresume to the recovery option below the above entry.This is useful in case something goes wrong, you can use the recovery option to bypass resuming.
reboot. hibernate. resume.
If all went well your system should resume to the same state you were in before hibernation.
pretty cool; i can get it to hibernate but not to restore— ie after it shows the tuxonice splash and shuts down I reboot to find a normal boot.
Can’t find anything indicative in the logs…
Also, there was no tuxonice.conf file, just some similar looking suspend2.conf file which i renamed to no avail…
Anyone have any ideas? I am sure that I’ve specified my swap file as the location to save to, in the conf and in grub.
Sorry I forgot to include the hibernate script from tuxonice.net:
http://www.tuxonice.net/downloads/all/hibernate-script-2.0.tar.gz
run ./install.sh in the directory where you have extracted the files. this will add files to /etc/hibernate and you can then edit tuxonice.conf
your system should resume properly once this is installed
I extracted the tarball and installed the script; then edited the tuxonice.conf file as necessary— still no-can-do.
Am I supposed to follow just your walkthrough, or both? Because they say to update initramfs,
Like this:
“. add a “do_resume” hook to the initramfs. I don’t know why this is needed as REPLACE_SWSUSP is enabled, but my system doesn’t resume without it.”
What from their guide should we be doing?
One note: In your example you say that the grub entry should be like this:
resume=swap:/dev/sda6 (my swap partition)
but shouldn’t it be:
resume=/dev/sda6
Neither seems to have any effect on the restore, though.
thanks
just follow my walkthrough, I posted their walkthrough mainly as a reference.
the tarball adds the hook to iniramfs, all you need to do is extract it and copy paste the extracted directories onto the root filesystem.
If you are still having problems, check your dmesg for the first few lines after startup to see if their are any error messages. It took me a while to get the resume working, using the tarball provided did the job for me in the end.
The line added to grub should be resume=swap:/ or resume=file:/
Check to make sure you are specifiying the right dev for your swap drive.
dmesg gives this output:
Using IPI No-Shortcut mode
[ 2.033647] TuxOnIce 3.0.1 (http://tuxonice.net)
[ 2.033705] TuxOnIce: Ignoring late initcall, as requested.
[ 2.033708] PM: Resume from partition swap:/dev/sda6
[ 2.033710] PM: Checking hibernation image.
[ 2.033718] PM: Error -6 checking image file
[ 2.033720] PM: Resume from disk failed.
[ 2.033732] registered taskstats version 1
[ 2.033844] Magic number: 13:874:156
you need to change sda6 to the location of your own swap drive.
if you don’t have gparted installed use:
sudo apt-get install gparted
system->admin->partition editor
look and see which of your partitions is labelled ‘swap’ and change the tuxonice grub and conf entries accordingly
yeah i used fdisk from the beginning; i know which my swap-file is. gparted has a tendency to do funky things when you use it to do anything besides view your partitions. anyways i know that my swap file is correctly noted as i can hibernate—if i change the dev node it is attached to it doesn’t hibernate at all.
as a note, everytime i hibernate, and resume, and i do swapon -s, it shows no swap file. so if i do swapoff -a, it fixes it after a reboot.
sorry, forgot my swap was sda7 and assumed you had just copy pasted it.
what happens when you run sudo hibernate -n ?
this will test the hibernation and display any errors without actually hibernating.
Here is what I got:
ibernate: Scriptlet acpi_sleep exists in both /usr/share/hibernate/scriptlets.d/acpi_sleep and /usr/local/share/hibernate/scriptlets.d/acpi_sleep
hibernate: Cowardly refusing to load acpi_sleep a second time.
hibernate: Scriptlet backlight exists in both /usr/share/hibernate/scriptlets.d/backlight and /usr/local/share/hibernate/scriptlets.d/backlight
hibernate: Cowardly refusing to load backlight a second time.
hibernate: Scriptlet bootsplash exists in both /usr/share/hibernate/scriptlets.d/bootsplash and /usr/local/share/hibernate/scriptlets.d/bootsplash
hibernate: Cowardly refusing to load bootsplash a second time.
hibernate: Scriptlet clock exists in both /usr/share/hibernate/scriptlets.d/clock and /usr/local/share/hibernate/scriptlets.d/clock
hibernate: Cowardly refusing to load clock a second time.
hibernate: Scriptlet devices exists in both /usr/share/hibernate/scriptlets.d/devices and /usr/local/share/hibernate/scriptlets.d/devices
hibernate: Cowardly refusing to load devices a second time.
hibernate: Scriptlet diskcache exists in both /usr/share/hibernate/scriptlets.d/diskcache and /usr/local/share/hibernate/scriptlets.d/diskcache
hibernate: Cowardly refusing to load diskcache a second time.
hibernate: Scriptlet fbsplash exists in both /usr/share/hibernate/scriptlets.d/fbsplash and /usr/local/share/hibernate/scriptlets.d/fbsplash
hibernate: Cowardly refusing to load fbsplash a second time.
hibernate: Scriptlet filesystems exists in both /usr/share/hibernate/scriptlets.d/filesystems and /usr/local/share/hibernate/scriptlets.d/filesystems
hibernate: Cowardly refusing to load filesystems a second time.
hibernate: Scriptlet gaim exists in both /usr/share/hibernate/scriptlets.d/gaim and /usr/local/share/hibernate/scriptlets.d/gaim
hibernate: Cowardly refusing to load gaim a second time.
hibernate: Scriptlet galeon exists in both /usr/share/hibernate/scriptlets.d/galeon and /usr/local/share/hibernate/scriptlets.d/galeon
hibernate: Cowardly refusing to load galeon a second time.
hibernate: Scriptlet gfx_brightness exists in both /usr/share/hibernate/scriptlets.d/gfx_brightness and /usr/local/share/hibernate/scriptlets.d/gfx_brightness
hibernate: Cowardly refusing to load gfx_brightness a second time.
hibernate: Scriptlet grub exists in both /usr/share/hibernate/scriptlets.d/grub and /usr/local/share/hibernate/scriptlets.d/grub
hibernate: Cowardly refusing to load grub a second time.
hibernate: Scriptlet hardware_tweaks exists in both /usr/share/hibernate/scriptlets.d/hardware_tweaks and /usr/local/share/hibernate/scriptlets.d/hardware_tweaks
hibernate: Cowardly refusing to load hardware_tweaks a second time.
hibernate: Scriptlet lilo exists in both /usr/share/hibernate/scriptlets.d/lilo and /usr/local/share/hibernate/scriptlets.d/lilo
hibernate: Cowardly refusing to load lilo a second time.
hibernate: Scriptlet lock exists in both /usr/share/hibernate/scriptlets.d/lock and /usr/local/share/hibernate/scriptlets.d/lock
hibernate: Cowardly refusing to load lock a second time.
hibernate: Scriptlet lockfile exists in both /usr/share/hibernate/scriptlets.d/lockfile and /usr/local/share/hibernate/scriptlets.d/lockfile
hibernate: Cowardly refusing to load lockfile a second time.
hibernate: Scriptlet misclaunch exists in both /usr/share/hibernate/scriptlets.d/misclaunch and /usr/local/share/hibernate/scriptlets.d/misclaunch
hibernate: Cowardly refusing to load misclaunch a second time.
hibernate: Scriptlet modules exists in both /usr/share/hibernate/scriptlets.d/modules and /usr/local/share/hibernate/scriptlets.d/modules
hibernate: Cowardly refusing to load modules a second time.
hibernate: Scriptlet modules_gentoo exists in both /usr/share/hibernate/scriptlets.d/modules_gentoo and /usr/local/share/hibernate/scriptlets.d/modules_gentoo
hibernate: Cowardly refusing to load modules_gentoo a second time.
hibernate: Scriptlet network exists in both /usr/share/hibernate/scriptlets.d/network and /usr/local/share/hibernate/scriptlets.d/network
hibernate: Cowardly refusing to load network a second time.
hibernate: Scriptlet networkmanager exists in both /usr/share/hibernate/scriptlets.d/networkmanager and /usr/local/share/hibernate/scriptlets.d/networkmanager
hibernate: Cowardly refusing to load networkmanager a second time.
hibernate: Scriptlet newkernel exists in both /usr/share/hibernate/scriptlets.d/newkernel and /usr/local/share/hibernate/scriptlets.d/newkernel
hibernate: Cowardly refusing to load newkernel a second time.
hibernate: Scriptlet pause_audio exists in both /usr/share/hibernate/scriptlets.d/pause_audio and /usr/local/share/hibernate/scriptlets.d/pause_audio
hibernate: Cowardly refusing to load pause_audio a second time.
hibernate: Scriptlet pcmcia exists in both /usr/share/hibernate/scriptlets.d/pcmcia and /usr/local/share/hibernate/scriptlets.d/pcmcia
hibernate: Cowardly refusing to load pcmcia a second time.
hibernate: Scriptlet programs exists in both /usr/share/hibernate/scriptlets.d/programs and /usr/local/share/hibernate/scriptlets.d/programs
hibernate: Cowardly refusing to load programs a second time.
hibernate: Scriptlet remount_xfsboot exists in both /usr/share/hibernate/scriptlets.d/remount_xfsboot and /usr/local/share/hibernate/scriptlets.d/remount_xfsboot
hibernate: Cowardly refusing to load remount_xfsboot a second time.
hibernate: Scriptlet services exists in both /usr/share/hibernate/scriptlets.d/services and /usr/local/share/hibernate/scriptlets.d/services
hibernate: Cowardly refusing to load services a second time.
hibernate: Scriptlet swsusp2_15 exists in both /usr/share/hibernate/scriptlets.d/swsusp2_15 and /usr/local/share/hibernate/scriptlets.d/swsusp2_15
hibernate: Cowardly refusing to load swsusp2_15 a second time.
hibernate: Scriptlet sylpheed_claws exists in both /usr/share/hibernate/scriptlets.d/sylpheed_claws and /usr/local/share/hibernate/scriptlets.d/sylpheed_claws
hibernate: Cowardly refusing to load sylpheed_claws a second time.
hibernate: Scriptlet sysfs_power_state exists in both /usr/share/hibernate/scriptlets.d/sysfs_power_state and /usr/local/share/hibernate/scriptlets.d/sysfs_power_state
hibernate: Cowardly refusing to load sysfs_power_state a second time.
hibernate: Scriptlet ususpend exists in both /usr/share/hibernate/scriptlets.d/ususpend and /usr/local/share/hibernate/scriptlets.d/ususpend
hibernate: Cowardly refusing to load ususpend a second time.
hibernate: Scriptlet vbetool exists in both /usr/share/hibernate/scriptlets.d/vbetool and /usr/local/share/hibernate/scriptlets.d/vbetool
hibernate: Cowardly refusing to load vbetool a second time.
hibernate: Scriptlet videodump exists in both /usr/share/hibernate/scriptlets.d/videodump and /usr/local/share/hibernate/scriptlets.d/videodump
hibernate: Cowardly refusing to load videodump a second time.
hibernate: Scriptlet xhacks exists in both /usr/share/hibernate/scriptlets.d/xhacks and /usr/local/share/hibernate/scriptlets.d/xhacks
hibernate: Cowardly refusing to load xhacks a second time.
hibernate: Scriptlet xstatus exists in both /usr/share/hibernate/scriptlets.d/xstatus and /usr/local/share/hibernate/scriptlets.d/xstatus
hibernate: Cowardly refusing to load xstatus a second time.
yochai@yochai-laptop:~$ sudo swapon -s
Filename Type Size Used Priority
/dev/sda6 partition 1975952 0 -1
yochai@yochai-laptop:~$ sudo hibernate -n
hibernate: Scriptlet acpi_sleep exists in both /usr/share/hibernate/scriptlets.d/acpi_sleep and /usr/local/share/hibernate/scriptlets.d/acpi_sleep
hibernate: Cowardly refusing to load acpi_sleep a second time.
hibernate: Scriptlet backlight exists in both /usr/share/hibernate/scriptlets.d/backlight and /usr/local/share/hibernate/scriptlets.d/backlight
hibernate: Cowardly refusing to load backlight a second time.
hibernate: Scriptlet bootsplash exists in both /usr/share/hibernate/scriptlets.d/bootsplash and /usr/local/share/hibernate/scriptlets.d/bootsplash
hibernate: Cowardly refusing to load bootsplash a second time.
hibernate: Scriptlet clock exists in both /usr/share/hibernate/scriptlets.d/clock and /usr/local/share/hibernate/scriptlets.d/clock
hibernate: Cowardly refusing to load clock a second time.
hibernate: Scriptlet devices exists in both /usr/share/hibernate/scriptlets.d/devices and /usr/local/share/hibernate/scriptlets.d/devices
hibernate: Cowardly refusing to load devices a second time.
hibernate: Scriptlet diskcache exists in both /usr/share/hibernate/scriptlets.d/diskcache and /usr/local/share/hibernate/scriptlets.d/diskcache
hibernate: Cowardly refusing to load diskcache a second time.
hibernate: Scriptlet fbsplash exists in both /usr/share/hibernate/scriptlets.d/fbsplash and /usr/local/share/hibernate/scriptlets.d/fbsplash
hibernate: Cowardly refusing to load fbsplash a second time.
hibernate: Scriptlet filesystems exists in both /usr/share/hibernate/scriptlets.d/filesystems and /usr/local/share/hibernate/scriptlets.d/filesystems
hibernate: Cowardly refusing to load filesystems a second time.
hibernate: Scriptlet gaim exists in both /usr/share/hibernate/scriptlets.d/gaim and /usr/local/share/hibernate/scriptlets.d/gaim
hibernate: Cowardly refusing to load gaim a second time.
hibernate: Scriptlet galeon exists in both /usr/share/hibernate/scriptlets.d/galeon and /usr/local/share/hibernate/scriptlets.d/galeon
hibernate: Cowardly refusing to load galeon a second time.
hibernate: Scriptlet gfx_brightness exists in both /usr/share/hibernate/scriptlets.d/gfx_brightness and /usr/local/share/hibernate/scriptlets.d/gfx_brightness
hibernate: Cowardly refusing to load gfx_brightness a second time.
hibernate: Scriptlet grub exists in both /usr/share/hibernate/scriptlets.d/grub and /usr/local/share/hibernate/scriptlets.d/grub
hibernate: Cowardly refusing to load grub a second time.
hibernate: Scriptlet hardware_tweaks exists in both /usr/share/hibernate/scriptlets.d/hardware_tweaks and /usr/local/share/hibernate/scriptlets.d/hardware_tweaks
hibernate: Cowardly refusing to load hardware_tweaks a second time.
hibernate: Scriptlet lilo exists in both /usr/share/hibernate/scriptlets.d/lilo and /usr/local/share/hibernate/scriptlets.d/lilo
hibernate: Cowardly refusing to load lilo a second time.
hibernate: Scriptlet lock exists in both /usr/share/hibernate/scriptlets.d/lock and /usr/local/share/hibernate/scriptlets.d/lock
hibernate: Cowardly refusing to load lock a second time.
hibernate: Scriptlet lockfile exists in both /usr/share/hibernate/scriptlets.d/lockfile and /usr/local/share/hibernate/scriptlets.d/lockfile
hibernate: Cowardly refusing to load lockfile a second time.
hibernate: Scriptlet misclaunch exists in both /usr/share/hibernate/scriptlets.d/misclaunch and /usr/local/share/hibernate/scriptlets.d/misclaunch
hibernate: Cowardly refusing to load misclaunch a second time.
hibernate: Scriptlet modules exists in both /usr/share/hibernate/scriptlets.d/modules and /usr/local/share/hibernate/scriptlets.d/modules
hibernate: Cowardly refusing to load modules a second time.
hibernate: Scriptlet modules_gentoo exists in both /usr/share/hibernate/scriptlets.d/modules_gentoo and /usr/local/share/hibernate/scriptlets.d/modules_gentoo
hibernate: Cowardly refusing to load modules_gentoo a second time.
hibernate: Scriptlet network exists in both /usr/share/hibernate/scriptlets.d/network and /usr/local/share/hibernate/scriptlets.d/network
hibernate: Cowardly refusing to load network a second time.
hibernate: Scriptlet networkmanager exists in both /usr/share/hibernate/scriptlets.d/networkmanager and /usr/local/share/hibernate/scriptlets.d/networkmanager
hibernate: Cowardly refusing to load networkmanager a second time.
hibernate: Scriptlet newkernel exists in both /usr/share/hibernate/scriptlets.d/newkernel and /usr/local/share/hibernate/scriptlets.d/newkernel
hibernate: Cowardly refusing to load newkernel a second time.
hibernate: Scriptlet pause_audio exists in both /usr/share/hibernate/scriptlets.d/pause_audio and /usr/local/share/hibernate/scriptlets.d/pause_audio
hibernate: Cowardly refusing to load pause_audio a second time.
hibernate: Scriptlet pcmcia exists in both /usr/share/hibernate/scriptlets.d/pcmcia and /usr/local/share/hibernate/scriptlets.d/pcmcia
hibernate: Cowardly refusing to load pcmcia a second time.
hibernate: Scriptlet programs exists in both /usr/share/hibernate/scriptlets.d/programs and /usr/local/share/hibernate/scriptlets.d/programs
hibernate: Cowardly refusing to load programs a second time.
hibernate: Scriptlet remount_xfsboot exists in both /usr/share/hibernate/scriptlets.d/remount_xfsboot and /usr/local/share/hibernate/scriptlets.d/remount_xfsboot
hibernate: Cowardly refusing to load remount_xfsboot a second time.
hibernate: Scriptlet services exists in both /usr/share/hibernate/scriptlets.d/services and /usr/local/share/hibernate/scriptlets.d/services
hibernate: Cowardly refusing to load services a second time.
hibernate: Scriptlet swsusp2_15 exists in both /usr/share/hibernate/scriptlets.d/swsusp2_15 and /usr/local/share/hibernate/scriptlets.d/swsusp2_15
hibernate: Cowardly refusing to load swsusp2_15 a second time.
hibernate: Scriptlet sylpheed_claws exists in both /usr/share/hibernate/scriptlets.d/sylpheed_claws and /usr/local/share/hibernate/scriptlets.d/sylpheed_claws
hibernate: Cowardly refusing to load sylpheed_claws a second time.
hibernate: Scriptlet sysfs_power_state exists in both /usr/share/hibernate/scriptlets.d/sysfs_power_state and /usr/local/share/hibernate/scriptlets.d/sysfs_power_state
hibernate: Cowardly refusing to load sysfs_power_state a second time.
hibernate: Scriptlet ususpend exists in both /usr/share/hibernate/scriptlets.d/ususpend and /usr/local/share/hibernate/scriptlets.d/ususpend
hibernate: Cowardly refusing to load ususpend a second time.
hibernate: Scriptlet vbetool exists in both /usr/share/hibernate/scriptlets.d/vbetool and /usr/local/share/hibernate/scriptlets.d/vbetool
hibernate: Cowardly refusing to load vbetool a second time.
hibernate: Scriptlet videodump exists in both /usr/share/hibernate/scriptlets.d/videodump and /usr/local/share/hibernate/scriptlets.d/videodump
hibernate: Cowardly refusing to load videodump a second time.
hibernate: Scriptlet xhacks exists in both /usr/share/hibernate/scriptlets.d/xhacks and /usr/local/share/hibernate/scriptlets.d/xhacks
hibernate: Cowardly refusing to load xhacks a second time.
hibernate: Scriptlet xstatus exists in both /usr/share/hibernate/scriptlets.d/xstatus and /usr/local/share/hibernate/scriptlets.d/xstatus
hibernate: Cowardly refusing to load xstatus a second time.
ibernate: Scriptlet acpi_sleep exists in both /usr/share/hibernate/scriptlets.d/acpi_sleep and /usr/local/share/hibernate/scriptlets.d/acpi_sleep
hibernate: Cowardly refusing to load acpi_sleep a second time.
hibernate: Scriptlet backlight exists in both /usr/share/hibernate/scriptlets.d/backlight and /usr/local/share/hibernate/scriptlets.d/backlight
hibernate: Cowardly refusing to load backlight a second time.
hibernate: Scriptlet bootsplash exists in both /usr/share/hibernate/scriptlets.d/bootsplash and /usr/local/share/hibernate/scriptlets.d/bootsplash
hibernate: Cowardly refusing to load bootsplash a second time.
hibernate: Scriptlet clock exists in both /usr/share/hibernate/scriptlets.d/clock and /usr/local/share/hibernate/scriptlets.d/clock
and it pretty much says stuff like that all the way till end.
I looked at the man page and it showed me how to increase debug verbosity. The additional info it printed was:
Saved /proc/sys/kernel/modprobe is /sbin/modprobe
hibernate: [91] Executing ModulesUnloadBlacklist …
Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules
Module version for ipw2100 is 2
Module version for ipw2200 is 2
Module version for snd_bt_sco is
Module version for ndiswrapper is 0
hibernate: [95] Executing XHacksSuspendHook2 …
xhacks: changing console from 7 to 15
hibernate: [97] Executing ChangeToTuxOnIceVT …
hibernate: [98] Executing CheckRunlevel …
hibernate: [98] Executing FullSpeedCPUSuspend …
Switched to performance, with min freq at 1867000
hibernate: [98] Executing TuxOnIceConfigSet …
hibernate: [99] Executing DoTuxOnIce …
hibernate: Not actually hibernating (–no-suspend given)
hibernate: [98] Executing FullSpeedCPUResume …
hibernate: [97] Executing ChangeFromTuxOnIceVT …
hibernate: [90] Executing ModulesLoad …
hibernate: [89] Executing RestoreKernelModprobe …
hibernate: [85] Executing XHacksResumeHook2 …
xhacks: changing console back to 7
hibernate: [70] Executing ClockRestore …
hibernate: [59] Executing RemountXFSBootRW …
hibernate: [11] Executing XHacksResumeHook1 …
hibernate: [01] Executing NoteLastResume …
hibernate: [01] Executing LockFilePut …
hibernate: [00] Executing RemoveTuxOnIceProcCruft …
I actually think this isn’t an issue with the hibernate script but perhaps with grub or something else. sorry to use up so many comments but it has a limit to how much i can type. thanks for you help, btw.
Not sure if this matters but after hibernate (which seems to work) and I resume (doesn’t work), sudo less /var/log/messages shows this towards the top:
Inspecting /boot/System.map-2.6.28-13-generic
Jun 13 18:42:55 yochai-laptop kernel: Cannot find map file.
it seems that those messages after running hibernate are just warnings because of the duplicate files. I don’t have /usr/share/hibernate on my system, so this may something specific to yours.
Are you seeing the ubuntu boot splash when you run hibernate -n ?
Are you using an encrypted swap drive ?
Try using the filewriter option. Uncomment the filewriter options in tuxonice.conf, comment out the SuspendDevice line. then execute sud hibernate -n. It should tell you that it is creating the hibernate image. After it finishes it should spit out an abort error, saying resume is not set up properly. It will give you the entry to add to grub. run cat /sys/power/tuxonice/resume to be sure.
When I do hibernate -n (with SuspendDevice uncommented) I don’t get any splash screen. When I comment out the line like you suggested, it does pretty much the same thing, and gives no abort error. In fact the output is identical.
cat /sys/power/tuxonice/resume gives:
file:/dev/sda6
I am not using an encrypted swap. I have also reformatted and prepared my swap drive to see if that helped. it didn’t.
I should mention that when I run hibernate from the command line it shows the ubuntu splash screen (with added verbosity) as it hibernates, then when it resumes it does the same thing as before.
If I hibernate from the gnome panel it shows the tuxonice logo and pretty much does the same thing.
it seems to me that it is ignoring the tuxonice.conf file. Did it create a suspend_file when you changed to the filewriter option ?
Try reverting the changes (ie, comment out filewriter and re-enable the swap drive option, with the entry in grub as well)
sudo update-initramfs -c -k 2.6.28-13-generic
check if there is any output and let me know if there is.
try hibernating now
A bit confused about the filewriter option, when I initially tried to add the option to the .conf, it kept spitting out problems with the location I was adding — and after checking the /sys/power/tuxonice/resume file, I saw that it was spitting out the right swap partition. Should I have been using a swap file instead? I ended up removing the option from the hibernate.conf file.
I added the swap partition to GRUB like this:
swap:/dev/sda6
NOT the way described in the italics above.
Am I missing something?
the entries for the filewriter option which I’ve used are
#FilewriterLocation /suspend_file 2000
#SuspendDevice file:/dev/sda6:0x20008
it should create a file on the root filesystem
according to tuxonice.net:
“You must set the resume= kernel option to the swap partition or file location you want to use for hibernating. For swap storage, if your swap partition is, for instance, the third primary one on first ide disk (/dev/hda3) you have to append “resume=swap:/dev/hda3″ as a kernel parameter in your lilo.conf file or GRUB’s menu.lst.”
I think the problem is with initrd.
take a look in /usr/share/initramfs-tools/scripts/local-premount and check that tuxonice_do_resume has 755 permissions. do the same for /usr/share/initramfs-tools/hooks/tuxonice_userui
you can also call
sudo chmod 644 /usr/share/initramfs-tools/scripts/local-premount/resume
this will exclude the old resume script from the initrd image, which may be causing a conflict.
then run
sudo update-initramfs -c -k 2.6.28-13-generic
also check your /etc/initramfs-tools and tell me what it looks like. Mine only has 3 config files in the base directory and a bunch of empty directories. I’m looking for anything that my be conflicting with the resume call in the initrd image.
Also post your grub entry.
I get this:
root=UUID=59e82a2d-6460-42c0-8b35-6d3e12cc0af7 resume=file:/dev/sda1:0x85c000 ro quiet splash
which is the kernel options I specified in GRUB. As root, I can see that I have no /usr/share/initframs-tools/scripts/local-premount/tuxonice_userui OR tuxonice_do_resume —
I have only these three files:
ntfs-3g
resume
uswsusp
I have only these files/folders in my /etc/initramfs-tools directory:
conf.d hooks initramfs.conf modules scripts update-initramfs.conf
My grub entry is like this:
title Ubuntu 9.04, kernel 2.6.28-13-generic
uuid 59e82a2d-6460-42c0-8b35-6d3e12cc0af7
kernel /boot/vmlinuz-2.6.28-13-generic root=UUID=59e82a2d-6460-42c0-8b35-6d3e12cc0af7 resume=file:/dev/sda1:0x85c000 ro quiet splash
initrd /boot/initrd.img-2.6.28-13-generic
quiet
ok, the reason it doesn’t resume is because the do_resume script is missing. Did you extract the tarball from this link ? – http://lists.tuxonice.net/lurker/attach/[email protected]
you should extract it and copy the 2 directories inside the tuxonice directory to your root fs. (that was what the mv … commands were for in the howto)
once that is done, update initramfs and you should be sorted. reboot and then try hibernating.
you may still need to chmod the old resume script to 644 as I mentioned previously.
Yes of course I followed the howto… i moved those files AND ran the script as root… i think perhaps there is a permissions issue. i’ll run a diff and see what’s missing.
Right I did do that. brb.
Yeah I re-moved the necessary files. I checked all permissions. Updated initramfs.
One thing I find interesting, whenever I try a hibernate (which it does successfully) it at first complains about the /suspend-file I previously created. I have to delete it. Then it recreates it when i run the hibernate script. Then it fails to hibernate as it can’t map a swap file. so I do swapoff -a, then swapon /dev/sda6 (swapon -s shows nothing). then it says “invalid argument” at which point I do “mkswap /dev/sda6” then repeat the swapon command. It finally hibernates.
It now shows the ubuntu logo while hibernating, although is a bit more verbose. Initially it showed the tuxonice one.
I will reinstall the packages now.
Ok so I reinstalled the packages and updated initramfs, but now on reboot the filesystem segfaults. I can boot into a previous kernel version. When I run update-initramfs (with different arguments each time) it always spits out…
This kernel does not seem to support TuxOnIce user interface, skipping…
And I’m stuck now, unable to boot with the newest kernel.
hope you can help me. thanks for the help, so far! i’m learning.
I know how frustrating this can be.
Have you tried taking out the resume line in the grub entry for the newest kernel ? You could try changing the initrd line in grub to a previous version as well, or maybe even omitting it (untested)
In truth I haven’t managed to get the suspend_file working on mine either so I just use my swap drive. When I try to hibernate with a suspend_file it outputs an abort message.
If the above fails, try going back to the state you were in before starting this. ie. boot to the previous kernel. Uninstall the latest kernel, make sure all the files are removed from /boot/ and remove the grub entries. Delete the files from the tuxonice tarball and reset any permissions you changed.
Then start from scratch, install the latest kernel …..
“If the above fails, try going back to the state you were in before starting this. ie. boot to the previous kernel. Uninstall the latest kernel, make sure all the files are removed from /boot/ and remove the grub entries. Delete the files from the tuxonice tarball and reset any permissions you changed.
Then start from scratch, install the latest kernel …..”
Yeah i need to uninstall this big time cause i did something wrong and my nvidia driver failed and now it is starting X into 2 dif consoles.
Could you explain how to delete the newest kernel and then post a link to how to install a newer one please i owuld be much obliged for it.
uninstall it using synaptic. You may need to manually remove the grub entries.
unless you uninstalled all previous versions of the kernel. In which case you may need to use a live cd. backup your /boot directory and copy paste the /boot directory from the livecd onto your root fs (I haven’t tested this so have no idea what will happen!)