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

(Solved) suspend to RAM not waking up



Jose Rodriguez wrote:
Florian Kulzer wrote:
If you have powersaved installed (see "dpkg -l powersaved") then you can
configure it using the files in /etc/powersave. The default for the
power button is set up in "events" as EVENT_BUTTON_POWER="ignore".

>> I noticed as well than when I press the power button (not suspending here)
I'm shown the gnome window asking what do I want to do, but this dissapears before I can do anything and the computer shuts down.


I would first try to comment out the line

     /sbin/shutdown -h now "Power button pressed"

This should allow you to test if the system comes back from suspend at
all. If this works then you can either decide that you don't mind if the
power button can no longer be used to shut down the system, or you have
to change powerbtn.sh so that it can tell the difference between "power
button was pressed to wake me up from suspend" and "power button was
pressed because the user wants to shut me down".

I did the following: I changed hibernate.conf so that

touch /tmp/powerbtn_flag_hibernate

is executed before the system suspends. Then I added this line before
all the other commands in powerbtn.sh:

[ -e /tmp/powerbtn_flag_hibernate ] && rm -f /tmp/powerbtn_flag_hibernate && exit 0

Hello, thanks a lot for the suggestions, they made me think.

I checked out some things:

1. powersaved is not installed in my system, and I don't want to install it to avoid adding more variables to the problem--unless somebody tells me this is a bad idea.

2. Commenting out of /etc/acpi/powerbtn.sh the line which calls for shutdown has the effect of allowing the gnome confirmation window to stay in place and not just dissapear in half a second. The computer still does not come back to life after suspending to RAM, though.

3. If I issue s2ram from the shell, the machine suspends and wakes up normally by pressing the power button. However:

4. Changing, as previously said, /etc/acpi/sleep.sh from

action=/etc/acpi/sleep.sh to
action=/etc/acpi/s2ram

makes the system go to suspend and hanging when pressing the power button. I noticed the screen showed different lines when suspending, so:

5. I commented out the other lines in /etc/acpi/sleep.sh and included the following one:

action=/usr/bin/glxgears

This, unsurprisingly, failed to call the gears and it went to suspend hanging the machine afterwards. I then tried to:

6. Kill gnome-power-manager and press the sleep button, and that did the trick--or a useless shortcut to test your fps. Changing glxgears for s2ram makes the machine "suspendable". It seems that the gnome-power-manager daemon calls hibernate, for the behaviour it's the same when suspending with the button than when calling hibernate manually (it hangs the same way, showing the same things before blanking the screen).

My question here is whether it's a good idea to get rid of gnome-power-manager and suspend the machine this way or maybe I should try something else with hibernate.conf. I would like to be able to tell the laptop to sleep after a given inactivity time, which I don't know whether it's possible without the gnome thing.


Well, basically, I ended up completely removing gnome-power-manager and installing powersaved and kpowersave (optional). I spent some time configuring powersaved the way I liked and that's it. I don't know what the problem was, maybe I should've had only the gnome-power-manager daemon running or something--as I do know with powersaved, for in its documentations says to do so.

Anyway, thanks for the reply.



Reply to: