Re: [gpm] suspend not working



I meant to be sending these mails to the list, but now that I have got everything working, I will share the methods with you.

The first problem was that when I clicked on Suspend or Hibernate on gnome-power-manager, the computer did not suspend, and an error came up saying:
    HAL failed to Suspend/Hibernate.
    Check the FAQ for common problems.

Thanks to a tip from Richard Hughes, I worked around this by changing a value in my /etc/dbus-1/system.d/hal.conf file from

at_console="true"           # Apparently it might be possible to fix this another way,
to                                     # by adding your user to a group which has the correct permissions
user="myusername"       # to call the necessary hal function. Could someone tell me what
                                        # this group is called?
Clicking Suspend/Hibernate now worked, but it did not use my preferred suspend method. I have installed suspend2, (called from /sbin/hibernate), and gnome-power-manager was using /sbin/s2disk

To change this, it was necessary to edit two files.

To make "hibernate" use suspend2, reorder the list for your distribution in "/usr/lib/hal/scripts/linux/hal-system-power-hibernate" so that the "/usr/sbin/hibernate" entry is at the top of the list.
#Other distros just need to have *any* tools installed
else
        if [ -x "/usr/sbin/hibernate" ] ; then
                # Suspend2 tools installed
                /usr/sbin/hibernate --force
                RET=$?
...

Similarly To make "Suspend" suspend to ram, reorder the list for your distribution in "/usr/lib/hal/scripts/linux/hal-system-power-suspend" so that "/usr/sbin/hibernate -F/etc/hibernate/ram.conf" is at the top of the list.

#Other distros just need to have *any* tools installed
else         if [ -x "/usr/sbin/hibernate" ] ; then
            # Use hibernate configured for suspend-to-ram
            /usr/sbin/hibernate -F/etc/hibernate/ram.conf
            RET=$?

Now suspend works just how I would like it to : )
Perhaps some of these instructions should be in the FAQ. (there is a similar entry at the very bottom which says to put custom scripts in /prefix/share/hal/scripts/system/hal-system-power-*,  but it this is a slightly different path and it doesn't mention that you just change scripts which are already there. Unless of course this is Debian specific.

Your FAQ does need a bit of work though. Perhaps ordering it into categories such as "Computer doesn't suspend", "Video doesn't work", "How do I change the type of suspend", etc.

Cheers, James

P.S. Any Idea's on which group I should be added to, so that I can avoid the workaround with the hal.conf file?

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]