iBook Suspend Problems

I just installed Ubuntu on my G3 iBook, and it’s working out pretty well. However, it was hanging when it resumed from sleep. I did a bit of detective work online and found out that the hang happens when dbus prods devices on wakeup. Here’s a workaround.

Update: This workaround does have an undesirable side-effect: because Hoary’s gnome-volume-manager doesn’t respond to hal restarts correctly, you’ll probably lose the ability to see mounted volumes on your desktop after the first suspend/resume. However, that’s a lot better than locking up the machine.

Update: For Ubuntu Breezy, you will need to change /etc/init.d/dbus-1 in the script below to /etc/init.d/dbus for it to work. Also, under Breezy, the battery monitor applet may crash on suspend (and ask to be restarted upon wakeup). Other than that the hack continues to work as it did before. Regrettably it is still necessary, and gnome-volume-manager doesn’t deal with hal restarts any better than it did in Hoary either.

Remainder of article follows:

The actual problem, in this case, is in the kernel (it’s getting into a loop while trying to service the requests from dbus), but you can still work around it by disabling dbus while the laptop is suspended. Carlos A. Paramio provides a script for this purpose:

#!/bin/sh

# name        : hal
# author      : Carlos A. Paramio <carlos dot paramio at hispalinux dot es>
# description : Stops/starts hal service before/after suspend
# requirements:
# limitations :
#
# --- end of public part -- don't change below this line ---

PATH=/bin:/sbin:/usr/bin:/usr/sbin
case "$1" in
  powersave|custom)
    ;;
  performance)
    ;;
  suspend)
    /etc/init.d/dbus-1 stop
    ;;
  resume)
    /etc/init.d/dbus-1 start
    ;;
esac

Simply save this script as /etc/power/scripts.d/hal, make sure it’s executable, and create a symlink at /etc/power/event.d/hal which points to it. After that your laptop should basically wake up OK.

Note that if your laptop isn’t going to sleep in the first place, this won’t help. That’s a separate issue—often it’s because you have devices (e.g. a newer ATi card, or some USB/firewire device) whose Linux drivers haven’t gotten sleep support yet.

hoodwink.d enhanced