You are not logged in.

#1 2005-04-27 14:11:07

Registered: 2005-03-31
Posts: 14

/etc/acpi/ question

Machine: Compaq Evo N1015v with kernel26
I installed acpid to use acpi stuff..
acpid made /etc/acpi/ script..
I get the proper event registered to /var/log/acpid when I close lid..
Here is what I'm tyring to do:

# Default acpi script that takes an entry for all actions

# NOTE: This is a 2.6-centric script.  If you use 2.4.x, you'll have to
#       modify it to not use /sys

minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`

set $*

case "$1" in
        #echo "LID switched!">/dev/tty5
        echo "LID switched!"
        /usr/X11R6/bin/xset dpms force off
        logger "ACPI group/action undefined: $1 / $2"

Above forces off the screen when button/lid event is registered (both open and closed)..

Question 1: How do I make a different action to be taken when the lid is closed and when the lid is opened?? I want the screen to be offed as long as the lid is closed, even though I move mouse while the lid is closed..

Question 2: when I look at the log file, it says "/usr/X11R6/bin/xset:  unable to open display "" "
I can log in as root and manually execute xset command ...but I don't know why I'm getting that error message..

Question 3: for battery, I read gentoo document and it said making battery runlevel (and other runlevels) is good way to use acpi, but how do I make new runlevels in arch? is there an arch way of doing acpi properly?
Basically, I want to suspend to disk when I'm running on battery AND battery juice is almost out...(i'll never hibernate when I'm running on ac adapter)..

Thank you.


#2 2005-04-27 15:02:58

Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879

Re: /etc/acpi/ question


if grep open /proc/acpi/button/lid/LID/state; then
   #lid opened
   #lid closed

should work

2) try using "DISPLAY=:0 /usr/X11R6/bin/xset dpms force off"

3) dunno - they probably suggest using a run level so that system daemons can be shutoff when on battery (who want's apache running when on battery power)
I'd say just add the service calls manually for now, i.e. call /etc/rc.d/httpd stop on battery, and start on ac...


Board footer

Powered by FluxBB