LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-27-2010, 04:27 PM   #31
michaluv
LQ Newbie
 
Registered: Mar 2006
Posts: 1

Rep: Reputation: 0
Thanks for solution!


Thanks for solution!

Quote:
Originally Posted by rssn6 View Post
Drive, I think the problem is resolved.
1. I rename the the lid.sh to lid.sh.old (as you told me to)
2.I check the script of my lid2.sh and there was a problem with my condition. Dive, you told me to use

but i check the syntax and it is:
Code:
if [$lidstate = "closed"] .....
3. Restarted my laptop and now it goes to standby on close then goes up when I open the lid.
--------------------------------------
Summary / Reference
--------------------------------------
my /etc/acpi/acpi_handler.sh :
Code:
#!/bin/sh
# Default acpi script that takes an entry for all actions

IFS=${IFS}/
set $@

case "$1" in
  button)
    case "$2" in
      power) /sbin/init 0
         ;;
	lid) /etc/acpi/lid2.sh
         ;;
      *) logger "ACPI action $2 is not defined"
         ;;
    esac
    ;;
  *)
    logger "ACPI group $1 / action $2 is not defined"
    ;;
esac
my /etc/acpi/lid2.sh:
Code:
#!/bin/bash

lidstate=`cat /proc/acpi/button/lid/LID/state | awk '{print $2}'`
if [ $lidstate = "closed" ]
        then
                sync
                echo -n mem > /sys/power/state
        else
                logger "ACPI: Lid open. Not going into suspend"
fi
* don't forget to make your script -->> chmod +x lid2.sh

my etc/acpi/events/default is the standard file.

Hope it will help people later on!!!

Will write a final post later.
 
  


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
Bypassing ACPI lid button event in X Erratio Linux - Laptop and Netbook 3 10-13-2008 12:12 PM
Lid Off/On with ACPI alkos333 Slackware 10 05-28-2007 10:26 PM
ACPI Lid Question brokenflea Slackware 1 12-31-2005 04:09 AM
Inspiron 8500 LID switch with ACPI RBJohns Linux - Laptop and Netbook 8 05-21-2005 10:17 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 09:18 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