You are not logged in.

#1 2018-02-05 21:25:17

yair
Member
Registered: 2014-11-07
Posts: 21
Website

fail to xrandr on acpi event

I'm trying to switch the display on ACPI event.
specifically, an ThinkPad docking station engage/disengage event.

this following snippet from /etc/acpi/handler.sh  will log the first line of the case as expected,  but the xrandr command does nothing.

case "$1" in
     ibm/hotkey)
         case "$4" in
             00004011)
                echo "thinkpad dock disengaged" >> /home/user/log.log 
		xrandr --output VGA1 --off --output LVDS1 --auto
                ;;
             00004010)
                echo "thinkpad dock engaged" >> /home/user/log.log 
                xrandr --output LVDS1 --off --output VGA1 --auto
                ;;
         esac
        ;; 

i suspect this is connected to root trying to run a user xorg process, like discussed in acpi wiki page, but i find it difficult to understand. or implement.
https://wiki.archlinux.org/index.php/Ac … nt_display

related links
1. https://unix.stackexchange.com/question … dev-events
2.

Last edited by yair (2018-02-05 21:28:05)

Offline

Board footer

Powered by FluxBB