autorandr icon indicating copy to clipboard operation
autorandr copied to clipboard

Question: should autorandr systemd service change profile when external monitor is unplugged?

Open carlotm opened this issue 1 year ago • 2 comments

I can't make autorandr to change the profile when the external monitor is unplugged.

Is it supposed to work? How can I debug what's going on?

Cheers

carlotm avatar Sep 08 '23 07:09 carlotm

The systemd unit isn't a service, it's started ad hoc as needed. What mechanism do you use to detect changes? udev? Generally, unplug should trigger autorandr.

phillipberndt avatar Sep 08 '23 12:09 phillipberndt

I am using this udev rule:

$ cat /etc/udev/rules.d/95-monitors.rules
ACTION=="change", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/carloratm/.Xauthority", RUN+="/usr/bin/autorandr --change"

It is working when I plug a monitor, does not work when I unplug it

carlotm avatar Sep 09 '23 06:09 carlotm