I have this issue where Windows is sometimes randomly changing my primary display after a system restart. So I wanted to create a simple command-line application that would allow me to change the display settings on system startup – should be easy, right?
Narrator: it wasn’t easy.
I write this in jest, but isn’t it just easier to swap the plugs?
With a serious side, the author doesn’t discuss the type of display connections in use. I’ve come across this problem before in industrial setups, with both VGA and HDMI connections, and in all cases it was resolved by just swapping the monitor connections about. I suspect the problem was ultimately related to the BIOS and hardware initialisation rather than OS, it seems not all hardware is equal and even the age of a display can alter it’s performance and impact it’s readiness.
It’s possible, there must be a race condition somewhere. I would have thought that display identification would be based on the physical port connection but apparently not. If windows had a way to assign a unique ID across boots then I don’t see why the boot order should matter but maybe windows can’t identify which monitor is which and there are boot order heuristics that can fail. Still seems odd to me that it doesn’t use physical ports that wouldn’t normally change.
Is linux the same? I don’t have a dual monitor setup so I can’t really test it.
Actually, I have been exposed to this on Linux a long time ago and had similar problems that I wrote off at the time as a quirk of Compiz, but maybe it wasn’t Compiz at all!
My everyday setup is also multimonitor, but I don’t have a problem as it’s a dock based setup with distinctive monitor connections. I presume the article is using two identical connection types such as a graphics card with multiple HDMI or DVI connections..
My assertion about hardware doesn’t exclude the monitors causing an issue through some startup delay.