You are not logged in.

#1 2015-08-30 22:12:03

JamieKitson
Member
From: UK
Registered: 2010-10-18
Posts: 161
Website

External monitor script has become unreliable

I have been using the following udev rule and script to automatically configure my external monitor for some time now, however recently the script has become unreliable, sometimes working, sometimes doing the opposite of what it should. I've added a noise to the script so that I know it's running each time I (un)plug my HDMI monitor, so I am confident that the udev rule is working properly. I've tried adding a delay in case xrandr is running too soon, and I've added logging, but xrandr doesn't seem to be outputting any errors. The script works properly if I run it manually. Does anyone have any ideas what could be causing the unreliableness?

ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/bin/hdmi-plugged"
#!/bin/bash

export XAUTHORITY=/home/jamie/.Xauthority
export DISPLAY=:0

/usr/bin/xrandr --output eDP1 --auto --output HDMI1 --auto --above eDP1

Last edited by JamieKitson (2015-08-30 22:13:25)

Offline

Board footer

Powered by FluxBB