Comment 3 for bug 85589

Revision history for this message
Darryl Clarke (dclarke) wrote :

As a solution for a user (telling them to manually run those commands isn't a good option) I've made up a little script with the help of some existing ones and my co-worker.

the script:

/etc/acpi/resume.d/89-fixstuff.sh

--
#!/bin/bash
# start acpi-support to re-enable suspend and stuff
/etc/init.d/acpi-support start

# Restart dbus to fix network manager breakage.
/etc/init.d/dbus restart

# For each user that is logged in we need to restart gnome-power-manager
# this is borrowed from 90-xscreensaver.sh
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"
        su $user -c "(/usr/bin/gnome-power-manager)"
    fi
done

--
chmod +x /etc/acpi/resume.d/89-fixstuff.sh

and all should work.

I have no idea if this is specific to certain laptops, or if it is fixed in gutsy... but the above works for me in my current situation.