LinuxQuestions.org
Social Bookmarking all things Linux and Open Source
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Thread Tools
Old 12-31-2005, 02:55 AM   #1
brokenflea
Member
 
Registered: Nov 2003
Distribution: Slackware 11.0, FreeBSD
Posts: 284
Thanked: 0
ACPI Lid Question


[Log in to get rid of this advertisement]
I'm running slackware 10.2 on kernel 2.6.13
I'm trying to get my notebook to a state where if i close the lid, it goes into standby. this is the script i have in /etc/acpi/actions (lm_lid.sh)

Code:
#!/bin/bash
if [ "`cut -d " " -f 20 /proc/acpi/button/lid/LID/state`" = "open" ]
        then
                logger "ACPI: Lid open. Not going into suspend"
        else
                killall wpa_supplicant
                rmmod ndiswrapper
                echo -n "standby" > /sys/power/state
fi
When i close the lid, it works fine, the notebook goes into standby. The problem is when i open the lid the notebook goes back to normal operation for a second and then goes back to standby. It sorta gets stuck in a loop. What am I doing wrong here ? Any help would be gladly appreciated.

TIA
brokenflea is offline     Reply With Quote
Old 12-31-2005, 05:09 AM   #2
samwwwblack
Member
 
Registered: Apr 2003
Location: Midlands, UK
Distribution: Lapwing-Linux 0.2
Posts: 64
Thanked: 0
I'm not an expert in acpi or anything, but looking at your script the default is to standby, which I would change to:

Code:
#!/bin/bash

if [ "`cut -d " " -f 20 /proc/acpi/button/lid/LID/state`" = "closed" ]
        then
                killall wpa_supplicant
                rmmod ndiswrapper
                echo -n "standby" > /sys/power/state
        else
                logger "ACPI: Lid open. Not going into suspend"

fi
I would think this would fill the logs with "ACPI: Lid open"'s :-)

edit: Noticed a bad error on my part

Last edited by samwwwblack; 12-31-2005 at 05:17 AM..
samwwwblack is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
slack 10.1 acpi lid blanking issue... o2_sparx Linux - Laptop and Netbook 9 07-01-2005 01:57 AM
Inspiron 8500 LID switch with ACPI RBJohns Linux - Laptop and Netbook 8 05-21-2005 11:17 AM
ACPI: edit lid.sh to blank screen, turn backlight off, no-suspend ????? Outabux Debian 5 11-15-2004 09:11 AM
ACPI question mortal Slackware 2 10-02-2004 01:37 AM
lid close generates no acpi event mannyzen76 Linux - Laptop and Netbook 0 02-22-2004 12:37 AM


All times are GMT -5. The time now is 02:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration