LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices

Reply
 
Thread Tools Search this Thread
Old 06-18-2009, 01:27 AM   #1
otkaz
LQ Newbie
 
Registered: Apr 2009
Location: Houston, TX
Posts: 7
Thanked: 0
lid.sh acpi event will not run xvattr cmd


[Log in to get rid of this advertisement]
I use my laptop with a docking station. I didn't like the way the default lid.sh script woke my laptop screen up on mouse movement so made a new one, but I cant get one part of it to work. I want to run a xvattr command to switch my overlay to play video on my monitor. This is the script I'm using
Code:
#!/bin/sh
state=`cat /proc/acpi/button/lid/LID/state | awk '{print $2}'`
if [ "$state" = "closed" ]
then
xvattr -a XV_CRTC -v 1
radeontool light off
else
radeontool light on
xvattr -a XV_CRTC -v 0
fi
the radeontool part works fine, but it will not run the xvattr commands when I trigger the lid button. If I launch the script manually with sh /etc/acpi/lid.sh it works though??? Is there some kind of limit on what commands can be run with acpi events?
otkaz is offline     Reply With Quote
Old 06-18-2009, 07:40 PM   #2
TB0ne
Senior Member
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, Mandrake, RedHat, Gentoo, Slack
Posts: 4,569
Thanked: 204
Quote:
Originally Posted by otkaz View Post
I use my laptop with a docking station. I didn't like the way the default lid.sh script woke my laptop screen up on mouse movement so made a new one, but I cant get one part of it to work. I want to run a xvattr command to switch my overlay to play video on my monitor. This is the script I'm using
Code:
#!/bin/sh
state=`cat /proc/acpi/button/lid/LID/state | awk '{print $2}'`
if [ "$state" = "closed" ]
then
xvattr -a XV_CRTC -v 1
radeontool light off
else
radeontool light on
xvattr -a XV_CRTC -v 0
fi
the radeontool part works fine, but it will not run the xvattr commands when I trigger the lid button. If I launch the script manually with sh /etc/acpi/lid.sh it works though??? Is there some kind of limit on what commands can be run with acpi events?
Try putting the fully qualified path in before the commands, like "/usr/bin/xvattr", or something like that.
TB0ne is online now     Reply With Quote
Old 06-19-2009, 02:55 PM   #3
otkaz
LQ Newbie
 
Registered: Apr 2009
Location: Houston, TX
Posts: 7
Thanked: 0

Original Poster
Quote:
Originally Posted by TB0ne View Post
Try putting the fully qualified path in before the commands, like "/usr/bin/xvattr", or something like that.
tried it but no luck will only run the radeontool command but not xvattr...
otkaz is offline     Reply With Quote

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


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 01:12 PM
Lid closing/opening generates no event jirik Linux - Laptop and Netbook 1 10-24-2007 06:37 PM
Lid Off/On with ACPI alkos333 Slackware 10 05-28-2007 11:26 PM
ACPI Lid Question brokenflea Slackware 1 12-31-2005 05:09 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 06:24 PM.

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.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.
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