autorandr icon indicating copy to clipboard operation
autorandr copied to clipboard

Autorandr is awesome but...

Open shiggitay opened this issue 4 years ago • 4 comments
trafficstars

...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.

shiggitay avatar Apr 29 '21 15:04 shiggitay

I guess I'd go for After=suspend.target in the systemd unit file for that.

phillipberndt avatar Apr 29 '21 20:04 phillipberndt

I guess I'd go for After=suspend.target in the systemd unit file for that.

Hi Phillip! And I'm running Void Linux, so my init system is Runit.

shiggitay avatar Apr 29 '21 20:04 shiggitay

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).

phillipberndt avatar Apr 30 '21 06:04 phillipberndt

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.

elderK avatar Sep 24 '21 03:09 elderK