Thu Oct 12 01:05:41 CEST 2006

Foresight and hibernation


For some reason hibernation does not work when I click on
the flashy icon on the desktop in my current version of
Foresight Linux (version I never really expected it
to work anyway, me being suspicious of all attempts by the
computer to make life easier for me. They normally just make
life harder... have you noticed this before as well?

Anyway. I tried it the trusty old fashioned way, by command
prompt as root, and voila! It worked. So I guess I'll be
filing a bug with the foresight people when I get the
chance. Oh and the trusty old fashioned way (in the kernel 2.6
series, with the /sys directory activated) is by doing this:
# check memory
free -m

# if you have more swap than memory, you're fine.
# if not, dont do the below

# become root
sudo bash

# disconnect all physical usb gadgets.
/some/rlly/wild/shllscrpt/whch/dscncts/yr/phys/usb/devs -a

# tell the system to hibernate
echo -n 'disk' > /sys/power/state
To restart, boot the laptop and wait for the prompt. Make sure you choose the same boot option as last time, since otherwise the wakeup wont work properly. Afterwards, networking wont work. Just restart dhclient and you'll be fine. Oh and dont forget to reconnect your usb stuff. Should you forget to disconnect the USB devices in advance, no panic. In earlier releases of the kernel the hibernation just didnt work at all with USB devices connected, but nowadays it seems to go into hibernation regardless. When woken up, you'll just have to pull out your USB cables and stick them back in again. tada. --