Display layout changes when AOC display resumes from sleep or is turned back on (from on/off button)
Have 4 displays -- 3 Dell, 1 AOC (Q3279VWFD8). Have learned to live with the reality that the layout and icons gets changed up every time displays resume from sleep (or is turned back on from power button), so had/have implemented xrandr script to fix this.
#!/bin/sh
xrandr --output DisplayPort-0 --primary --mode 2560x1440 --refresh 74.97 --pos 0x1080 --rotate normal\
--output DisplayPort-1 --mode 1920x1080 --pos 640x0 --rotate normal\
--output DisplayPort-2 --mode 1920x1200 --pos 2560x1080 --rotate normal\
--output HDMI-A-0 --mode 1920x1080 --pos 2560x0 --rotate normal
Default and wanted layout is this:
However with the update to Manjaro that updated the Xfce from 4.16 directly to 4.18, it got different and slightly more painful to restore. Now the script simply fixes the layout (if it got mixed up at all, sometimes it doesn't anymore), but all the icons remain scrambled -- well, moved and piled up to display 3+4 and displays 1+2 are left with 0 icons. Also there is this new/old popup every time when the AOC display comes online (previously only saw it once and never again, now I see it after every suspend).
Almost like it always detects this AOC display as "new monitor" that it has never seen before???
(So for a workaround have to run 2 scripts now, one that messes layout slightly more up, and the current one, so swapping between them couple of times the icons also shake to place).
And it only happens when AOC display (sadly main) is turned back on. Changing the primary display to any of the other displays didn't change the result/behavior. Don't understand how one monitor sleep / wake-up (from display power management xfce4-power-manager
) or power off-on (from button on display) acts so differently from other displays. And/or why xfdesktop doesn't change the display layout back, when all 4 are back "on". Is it fixable from your end or any suggestions what I could do here?
Not quite sure how linux and/or xfce detects if the display is "NEW". And why AOC display turning off or going to sleep kind of removes the display from "OLD KNOWN" displays list, so when it comes back online, it's always detected as "NEW". How does the display remembering even work for xfce? what id or number it stores and compares to when some display is (re-)connected? Only visible "ID" difference I see from xrandr --verbose is that Dell displays EDID's are 8 lines, while AOC EDID is 16 lines (unexpected size for xfce, so it doesn't bother remembering it?).
EDIT: just now found another quality-of-life workaround: in xfce4-settings
=> Advanced => When new displays are connected : Show dialog > Do nothing.
Seems to fix the new display popup from appearing AND doesn't seem to scramble the icons that much (they twitch, but then jerk back to the old position almost...? not perfectly, but at least to some rather recent "save point", couple of icons have only moved.)