Comment 45 for bug 2020782

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

In the absence of ~/.config/monitors.xml (meaning the user has never pressed the 'Keep Changes' button), Mutter will start up in a linear layout with all monitors turned on. I think you can sometimes see this on Xdcv login (and always see it on Xorg login), but for some reason the secondary monitors quickly turn off again for Xdcv. But Mutter only remembers turning on all monitors and so that's the config it will revert to when you click 'Revert Settings'.

I don't think it's worth the effort to engineer entirely new xrandr detection logic in Mutter to solve this for Xdcv only. It would be significant work and take a long time to implement, for a very narrow use case. Instead I'd recommend either:

  (a) Modifying Xdcv to never connect virtual monitors you don't want to see, until the user virtually connects them. Because any sensible desktop environment will try to turn on all monitors as the default configuration.; or
  (b) Installing a default ~/.config/monitors.xml in which unused monitors are in the <disabled></disabled> section. You can draft such a file using the Settings GUI and clicking 'Keep Changes'.

So that part is now an enhancement request, not a bug. If anyone still wants it implemented then please mention it at: https://gitlab.gnome.org/GNOME/mutter/-/issues

As for the original bug 2020782 here, that's solved by upstream merge request: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3062