Retaining Multi-Monitor Configs After Sleep

I recently upgraded my dual-monitor setup to include a 32″ primary monitor on DisplayPort and a 24″ secondary on HDMI. Apparently, the LG 32GP750 in primary position takes slightly longer to wake up after sleep mode than the Acer K242HYL in secondary — just long enough, in fact, that Arch’s display manager can’t work out what to do and ends up rejecting the primary monitor entirely. Enter a minute of grudgingly editing display settings and rearranging windows.

After 2 months of this nonsense, I shall put up with it no further.

Fortunately, the solution is comically simple.

Step 1: Install autorandr

Ubuntu/Debian:

sudo apt install autorandr

Arch:

sudo pacman -S autorandr

Step 2: Save your configuration using the name default, unless you’re being sassy and using multiple configs:

autorandr --save default

Step 3: Prosper

There should be a file called /etc/xdg/autostart/autorandr.desktop that invokes the default configuration (see why we called it that?) upon loading of the login screen; i.e. the first step after waking up. Problem solved.

Step 4: Attribution

I definitely did not figure this out myself, but it did take an inordinate amount of googling. For reference, here’s where I got the deets.

Leave a Reply