[PLUG] Forcing persistent xrandr display configurations
Keith Lofstrom
keithl at kl-ic.com
Mon May 9 21:23:57 UTC 2022
My desktop setup is two largish 1280x1024 rotated
screens side by side (1024X 1280Y), rotated so the
narrow tops meet in the middle.
The screens are shared between two computers with
a KVM switch on the left and a DVI-video-only switch
on the right. I can only type and mouse into the
left screen, but I can see what the other computer
is doing on the right screen.
I've written suid scripts ("twoscreen") in
/usr/local/bin on both computers that use xrandr to
set up the screens the way I like. The scripts on
the two machines slightly different because the
older two-port-DVI nVidia video cards are different.
The problem is, if a screen is switched to one of
the computers for a while, the "neglected" computer
(or X, or the nVidia dual-DVI graphic card) somehow
decides to rotate the screen image back to "normal",
which is sideways on the physically rotated screen.
The easiest way to fix this is to make the "twoscreen"
programs loop in the background, "refreshing" the
orientation to the desired format every few seconds.
But it is probably cleaner to figure out what bit of
software or hardware:
(The nVidia graphics driver? X? The hardware of
the graphics card?)
... is deciding to ignore prior instructions and
revert to "normal" orientation without leaving an
obvious message in Xorg*log or syslog.
Any suggested diagnostics that I can run to learn what
is triggering the reversion to unwanted "normal" and
when, while my attention and video is focused on the
other machine?
If not, I'll just loop the xrandr script in the
background; kludgy and unclean, but it does the job.
What could possibly go wrong?
Keith
Note1: one machine is old CentOS7.3, the other is a new
install of MateUbuntu 20.04 . The goal is to configure
MateUbuntu 20.04.3 to replace CentOS and duplicate/replace
DECADES of accumulated linux/unix tools (back to SVR4
and BSD).
When that is complete, archive the CentOS drive and use
that machine for long compute jobs. Eventually, that
secondary machine will be upgraded to MateUbunu 22.04.1
and the upgrade pingpong will continue indefitely
Note2: I don't need much graphics compute power; if I
can display a video animation, that's good enough, and
way less compute power than gaming or real-time video
synthesis. I wouldn't mind replacing both two-port
video cards with a cheap low power solution, perhaps
open-source-friendlier ATI/Radeon; Suggestions?
However, two single-DVI cards in one machine might
get mixed up by the OS, now or after a future distro
change. Two port DVI cards seem less difficult to
goof up.
--
Keith Lofstrom keithl at keithl.com
More information about the PLUG
mailing list