Page 1 of 1
X31 Hibernate in Ubuntu Gutsy
Posted: Sun Mar 02, 2008 4:31 pm
by bobbarker
I've tried a few different 'solutions' I've seen, some specific for the X31 and some not. From the general lack of recent information my guess is it works for most people. If you've got working hibernate on an X31 please post up your /etc/default/acpi-support and /etc/acpi/hibernate.sh files so I can try them out.
Posted: Thu Mar 06, 2008 8:23 pm
by aaa
Tried it and oddly enough it doesn't work with me in Ubuntu 7.10 either. It writes out the data to disk, but when it comes to loading it up again, it acts like the data isn't there, and also disables swap. Is that the same that happens with you?
On the bright side, it worked perfectly with 8.04 alpha.
Posted: Thu Mar 06, 2008 9:37 pm
by bobbarker
Back in 7.04 it would do that for me, now it starts to write data (the screen goes away) and the terminal flashes up momentarily then returns straight to the desktop. Hopefully 8.04 will fix it.

Posted: Thu Mar 06, 2008 11:00 pm
by aaa
The screen-flash-without-turnoff usually means the swap is disabled. I had to reformat the swap every time I made a hibernation attempt, otherwise it wouldn't even get to the turning off part. But then you have update /etc/fstab since the uuid identifier of the swap changes when you format it.
Posted: Fri Mar 07, 2008 1:50 pm
by bobbarker
The bad swap might be the problem since I deactivated (and recently removed) my swap partition. I never get above 500MB of ram use, anyway, why bother with swap...well I guess I should repartition my drives again and add swap back.
/etc/default/acpi-support
Posted: Fri Mar 07, 2008 4:46 pm
by smugiri
# Comment the next line to disable ACPI suspend to RAM
ACPI_SLEEP=true
# Comment the next line to disable suspend to disk
ACPI_HIBERNATE=true
# Change the following to "standby" to use ACPI S1 sleep, rather than S3.
# This will save less power, but may work on more machines
ACPI_SLEEP_MODE=mem
# Add modules to this list to have them removed before suspend and reloaded
# on resume. An example would be MODULES="em8300 yenta_socket"
#
# Note that network cards and USB controllers will automatically be unloaded
# unless they're listed in MODULES_WHITELIST
MODULES=""
# Add modules to this list to leave them in the kernel over suspend/resume
MODULES_WHITELIST=""
# Should we save and restore state using the VESA BIOS Extensions?
SAVE_VBE_STATE=true
# The file that we use to save the vbestate
VBESTATE=/var/lib/acpi-support/vbestate
# Should we attempt to warm-boot the video hardware on resume?
POST_VIDEO=true
# Save and restore video state?
# SAVE_VIDEO_PCI_STATE=true
# Should we switch the screen off with DPMS on suspend?
USE_DPMS=true
# Use Radeontool to switch the screen off? Seems to be needed on some machines
# RADEON_LIGHT=true
# Uncomment the next line to switch away from X and back again after resume.
# This is needed for some hardware, but should be unnecessary on most.
# DOUBLE_CONSOLE_SWITCH=true
# Set the following to "platform" if you want to use ACPI to shut down
# your machine on hibernation
HIBERNATE_MODE=shutdown
# Comment this out to disable screen locking on resume
LOCK_SCREEN=true
# Uncomment this line to have DMA disabled before suspend and reenabled
# afterwards
# DISABLE_DMA=true
# Uncomment this line to attempt to reset the drive on resume. This seems
# to be needed for some Sonys
# RESET_DRIVE=true
# Add services to this list to stop them before suspend and restart them in
# the resume process.
STOP_SERVICES=""
# Restart Infra Red services on resume - off by default as it crashes some
# machines
RESTART_IRDA=false
# Switch to laptop-mode on battery power - off by default as it causes odd
# hangs on some machines
ENABLE_LAPTOP_MODE=false
# Spindown time on battery
SPINDOWN_TIME=12
/etc/acpi/hibernate.sh
Posted: Fri Mar 07, 2008 4:47 pm
by smugiri
#!/bin/bash
. /etc/default/acpi-support
. /usr/share/acpi-support/power-funcs
. /usr/share/acpi-support/policy-funcs
if [ x$ACPI_HIBERNATE != xtrue ] && [ x$1 != xforce ]; then
exit;
fi
# Unset video posting - it's not needed for suspend to disk
unset POST_VIDEO
unset USE_DPMS
. /etc/acpi/prepare.sh
#if [ x$LOCK_SCREEN = xtrue ]; then
# for x in /tmp/.X11-unix/*; do
# displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
# getXuser;
# if [ x"$XAUTHORITY" != x"" ]; then
# export DISPLAY=":$displaynum"
# . /usr/share/acpi-support/screenblank
# fi
# done
#fi
echo -n $HIBERNATE_MODE >/sys/power/disk
if [ -x /sbin/s2disk ]; then
DEVICE="/dev/disk/by-uuid/`awk -F= '{print $3}' </etc/initramfs-tools/conf.d/resume`"
if [ -f /etc/usplash.conf ]; then
. /etc/usplash.conf
/sbin/s2disk -x "$xres" -y "$yres" $DEVICE
else
/sbin/s2disk $DEVICE
fi
else
echo -n "disk" >/sys/power/state
fi
$LAPTOP_MODE stop
. /etc/acpi/resume.sh
Posted: Fri Mar 07, 2008 5:56 pm
by aaa
Anyways, on my end it just turned out to be because of my having both Hardy and Gutsy on there, which mixed up the swap UUID, which lead to poking around in two different grub.conf files... It works now.
As far as I can tell bobbarker's problem was simply not having a swap partition.
Posted: Fri Mar 07, 2008 8:19 pm
by bobbarker
I made a swapfile (gotta love dd) and threw it in to fstab-- I'll try those conf files once I finish rebuilding my battery (cells just arrived today).
Posted: Fri Mar 07, 2008 8:26 pm
by aaa
I believe it must be a partition, not a file.