This has happened to me a few times. Usually actually when switching displays while Linux is running, they get swapped around. In the early days I had to reboot. Later I found the settings in nvidia-settings to reset it via software, but it wasn’t intuitive. I think there was something that the UI is not reflecting state, and you switch it back and forth or something. Has been months since it last happened. I worked out my sequence.
I share two Eizo monitors, FSI broadcast, Tangent panel and Wacom between my Linux Flame and my Windows Nuke system.
I tried KVM, but it just never worked really well. So I have a more basic yet more reliable setup.
The way I have it setup is that each monitor has a 2:1 DP switch that switch with a button press. The Wacom is on a basic 2:1 USB switch, and the FSI monitor, I have Linux go into SDI1 and Windows in SDI2, so I can switch on the monitor.
That has been solid for the last year. But when I switch I do make sure that I switch the secondary display first (going from Linux to Windows; primary first going from Linux to Windows), give it a beat to settle in, and then switch the primary display. By observing that order, I never have the problem with Flame monitors being reversed. Essentially at the moment you’re down to one display, it should be your primary monitor.
One more reason that this works better than standard KVM, because there you can’t control the order and timing.
@naveen The ‘Show viewport on 2nd monitor’ feature is insufficient for your use case? You want the second monitor actually treated as broadcast monitor?
Personally I do prefer using an actual broadcast monitor, mostly because it clarifies color management, there’s no interference by the OS or anything else. And you can keep the 2nd screen for the explorer and and other work items.
With this setup, I often also log in remotely from my other desk (Parsec for Windows) and RealNVC for Linux. That helps me avoid switching monitor if I just need to quickly look something up. I really only switch now if I’ll spend the day on Flame or some of the Windows apps.