#!/bin/sh echo "this doesn't work yet" export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin tmpfile=`mktemp` || exit 1 # These always seem to cause problems in whatever sleep mode rmmod ehci_hcd uhci_hcd # Change to text mode to attempt to avoid hangs on resume with new # radeon DRM driver orig_vt=`fgconsole` chvt 1 # Save video state vbetool vbestate save > $tmpfile # suspend to disk echo suspending echo disk > /sys/power/state echo back # restore video state vbetool post vbetool vbestate restore < $tmpfile # Change back from text mode chvt $orig_vt # Can't load them in parallel with & or nasty things happen modprobe uhci_hcd modprobe ehci_hcd rm -f $tmpfile