Multi Montior on KVM

I'm battleing a problem since day 1.
I got a KVM with Displayport. Source + Destination are DP. I got a windows laptop and Zorin on my PC on this KVM.
My Problem: When i switch from Laptop to PC, Zorin goes on mirrormode on my two monitors until i go into settings and switch to multimonitor. It's fine until i switch back and for on the KVM....
Why on earth is there no option to fix my settings to default?
Any advice?

CachyOS always rememberd my settings on the same hardware with same KVM. And Windows on the Laptop too...

yeah gnome on the kvm flip often dumps u into mirror. windows keeps the layout, gnome rewrites it when the displays vanish for a sec.

for me this stuck:

-set join/extend how u want (not mirror), Apply
-cp ~/.config/monitors.xml ~/monitors.xml.kvm
-sudo apt install autorandr
-autorandr --save kvm-dual

after each kvm switch to the zorin box:
autorandr --change

if autorandr doesnt see the profile just:
cp ~/monitors.xml.kvm ~/.config/monitors.xml
then log out/in once. that file is what mutter reads for the layout.

1 Like

Thanks for your response.
Autorandr is already running, but honestly i dont want to kick a cmd everytime i change from on system to the other...

yeah kicking a cmd every kvm flip sucks

make autorandr do it alone:
-autorandr --save kvm-dual (while the layout is correct)
-mkdir -p ~/.config/autostart
-put a file ~/.config/autostart/autorandr.desktop with:

[Desktop Entry]
Type=Application
Name=autorandr
Exec=autorandr --change
X-GNOME-Autostart-enabled=true

also lock the layout file so mutter cant rewrite mirror on the hotplug:
-cp ~/.config/monitors.xml ~/monitors.xml.kvm
-sudo chattr +i ~/.config/monitors.xml

next kvm switch should come back extended. if u need to edit the layout later: sudo chattr -i ~/.config/monitors.xml

Autorandr should already do it alone... but it dosent. I take a look with your infos. Thanks again!