You are not logged in.

#1 2008-05-17 12:08:26

thom_raindog
Member
Registered: 2008-04-29
Posts: 175

[Solved]Laptop lid question

Hello,

I am really happy with arch on my laptop. Suspend2Disk works (although the light on my wlan-button stays off after wake up, but since the network itself works I am fine with that), suspend2ram works to.. and those two are crucial.

Even the Sleep-Button works and that is awesome!

But I would like the Laptop to go to suspend2disk when I close the lid, and honestly I am confused about how to do that.
I use acpid for the sleep button, which calls its own suspend2ram (works better then PM-utils for me btw). I call pm-hibernate by myself when I need it.

I read probably every article in the wiki but I can not put the puzzle pieces together.
acpid reacts on closing the lid, it does something with the ati-driver, probably to shut the screen of, or some.
But how can I change that to execute pm-hibernate?

BTW: it's Samsung P35, should that help.

Last edited by thom_raindog (2008-05-17 20:17:20)

Offline

#2 2008-05-17 14:12:14

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [Solved]Laptop lid question

Edit the script /etc/acpi/handler.sh for that (that's what acpid calls when an acpi event is generated). Useful to have a look at /var/log/acpid.log to see what event is generated when you close the lid.

Offline

#3 2008-05-17 15:39:56

hennes
Member
Registered: 2008-03-31
Posts: 50

Re: [Solved]Laptop lid question

Run acpi_listen and close the lid to get the relevant event. If you get the same event for closing and opening the lid (I do) you can use something like

grep open /proc/acpi/button/lid/LID/state || hibernate -F /etc/hibernate/ususpend-ram.conf

Of courseyou might need to change the path of the state file and the hibernate command as this is pasted from my handler.sh.

Offline

#4 2008-05-17 20:15:47

thom_raindog
Member
Registered: 2008-04-29
Posts: 175

Re: [Solved]Laptop lid question

OK, I edited handler.sh and indeed it worked..
Cool. Thanks,

Offline

Board footer

Powered by FluxBB