LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > 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
  Search this Thread
Old 06-18-2009, 12:27 AM   #1
otkaz
LQ Newbie
 
Registered: Apr 2009
Location: Houston, TX
Posts: 26

Rep: Reputation: 0
lid.sh acpi event will not run xvattr cmd


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?
 
Old 06-18-2009, 06:40 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,827

Rep: Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323Reputation: 6323
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.
 
Old 06-19-2009, 01:55 PM   #3
otkaz
LQ Newbie
 
Registered: Apr 2009
Location: Houston, TX
Posts: 26

Original Poster
Rep: Reputation: 0
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...
 
  


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 12:12 PM
Lid closing/opening generates no event jirik Linux - Laptop and Netbook 1 10-24-2007 05:37 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
lid close generates no acpi event mannyzen76 Linux - Laptop and Netbook 0 02-21-2004 11:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration