Gentoo Archives: gentoo-user

From: Saphirus Sage <saphirus497@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Bash and ACPI issue - laptop lid
Date: Wed, 11 Mar 2009 23:52:54
I've been trying to setup my laptop to enter ACPI S3 (suspend to ram)
when I close the lid. I currently have the scripts setup as such:
    event=button[ /]lid.*
    for i in $(cat /proc/acpi/button/lid/LID/state | grep -o closed); do
        if [ $i = "closed" ]; then
        if [ $i != "closed" ]; then
        sleep 5
The issue I've run into is that this will cause my laptop to suspend to
the RAM upon any change in the lid state, irregardless of if it is open
or closed. I tried to be more specific by utilizing the suffix of the
event, but it's incremental, which is a bit beyond my abilities. Any
suggestions to make this suspend only when the lid is closed?


Subject Author
Re: [gentoo-user] Bash and ACPI issue - laptop lid Mike Kazantsev <mike_kazantsev@×××××××.net>
Re: [gentoo-user] Bash and ACPI issue - laptop lid "Sebastian Günther" <samson@××××××××××××××××.de>