You are not logged in.

#1 2008-03-13 19:03:07

radious
Member
Registered: 2006-07-15
Posts: 9

Hal is blocking acpi (?)

Hello!
I have a strange problem with hal (or acpi, but IMO it's hal). I used to lock my desktop using xscreensaver lock function, after 5 minutes or when I close the lid. I've added appropriate entry in /etc/acpi/handler.sh

#!/bin/sh

    button/lid)
        #echo "LID switched!">/dev/tty5
        /usr/bin/xscreensaver-command -lock
        ;;
    *)
        #logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

But it doesn't work until i kill a hald-addon-acpi process and restart the whole acpi (/etc/rc.d/acpid restart). I have no idea how to fix it, thanks for all help.
PS. It of course works without hal run, but if i only stop it i still have to restart acpi.

Offline

#2 2009-10-27 12:05:20

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Hal is blocking acpi (?)

Bumped for great justice.

I am having the same problem. hal is not honoring the /etc/acpi/handler.sh script. But if I restart acpid, it works. Here's my config:

#!/bin/sh
# 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`
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"


setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"

set $*

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            PWRF)   logger "PowerButton pressed: $2" ;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            SLPB)   echo -n mem >/sys/power/state ;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;
    ac_adapter)
        case "$2" in
            AC)
                case "$4" in
                    00000000)
                        echo -n $minspeed >$setspeed
                        #/etc/laptop-mode/laptop-mode start
                    ;;
                    00000001)
                        echo -n $maxspeed >$setspeed
                        #/etc/laptop-mode/laptop-mode stop
                    ;;
                esac
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    battery)
        case "$2" in
            BAT0)
                case "$4" in
                    00000000)   #echo "offline" >/dev/tty5
                    ;;
                    00000001)   #echo "online"  >/dev/tty5
                    ;;
                esac
                ;;
            CPU0)
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/lid)
        #echo "LID switched!">/dev/tty5
        xset dpms force off
        ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

The only thing I've added is

xset dpms force off

what am I missing?

Last edited by timetrap (2009-10-27 12:06:29)

Offline

#3 2009-10-28 03:15:51

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Hal is blocking acpi (?)

Start acpid before hal in rc.conf

Offline

Board footer

Powered by FluxBB