autorandr
autorandr copied to clipboard
Autorandr is awesome but...
...Is there a way for it to be invoked when resuming from sleep? I have one 49" 4k TV and a 24" regular ViewSonic 1080p display in portrait mode that loads up just fine with the config I made for it, but only when I log in or restart and log in. When I set my computer to suspend/sleep and then go to resume it I need to run autorandr --load portrait24 to get the proper config loaded. Is there a way to automate that? Like maybe with a hook? I'm not sure how those work.
I guess I'd go for After=suspend.target in the systemd unit file for that.
I guess I'd go for
After=suspend.targetin the systemd unit file for that.
Hi Phillip! And I'm running Void Linux, so my init system is Runit.
In that case, have a look at the udev hooks in the contrib directory. They are just for plug/unplug events, but I'm quite certain that there'll also be an event for suspend/resume (you'll have to find out which, udev monitor often helps with that).
You might want to check what UID your user is. It's possible autorandr is excluding you because you user has an ID below 1000.