[arch-general] Weird acpid issue

Damjan Georgievski gdamjan at gmail.com
Mon Feb 9 11:04:20 EST 2009

> I use the default handler.sh file for my stuff, found in /etc/acpi.  I
> have the lid closure trigger a suspend-to-ram:
>    button/lid)
>        #echo "LID switched!">/dev/tty5
>        grep -q closed /proc/acpi/button/lid/*/state
>        if [ $? = 0 ]; then
>            echo -n mem >/sys/power/state
>        fi
>        ;;
> You can easily replace "echo -n mem >/sys/power/state" with any of the
> following, depending on your desired result:
>    xset dpms force off
>    xscreensaver-command -lock
>    etc.

xset needs to connect to the X server, so it needs both for the
DISPLAY to be specified and also to have access to the XAuthority
cookie for the X server. Otherwise it will not work - can't connect to
the X server.

Since acpid runs as a sytem service it ussually doesn't have access to
that information.


More information about the arch-general mailing list