LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 12-31-2005, 01:55 AM   #1
brokenflea
Member
 
Registered: Nov 2003
Distribution: Slackware 11.0, FreeBSD
Posts: 284

Rep: Reputation: 30
ACPI Lid Question


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
 
Old 12-31-2005, 04:09 AM   #2
samwwwblack
Member
 
Registered: Apr 2003
Location: Midlands, UK
Distribution: Lapwing-Linux 2009.1
Posts: 64

Rep: Reputation: 15
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 04:17 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 12:57 AM
Inspiron 8500 LID switch with ACPI RBJohns Linux - Laptop and Netbook 8 05-21-2005 10:17 AM
ACPI: edit lid.sh to blank screen, turn backlight off, no-suspend ????? Outabux Debian 5 11-15-2004 08:11 AM
ACPI question mortal Slackware 2 10-02-2004 12:37 AM
lid close generates no acpi event mannyzen76 Linux - Laptop and Netbook 0 02-21-2004 11:37 PM


All times are GMT -5. The time now is 06:45 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration