gnome-shell monitors.xml config validator fails adjacent check for screens saved with 'Fractional Scaling'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mutter (Ubuntu) |
New
|
High
|
Unassigned |
Bug Description
### Affected version
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
GNOME Shell 3.36.1
### Bug summary
Gome-shell monitors.xml config validator fails to validate config saved by Gnome settings with Fractional Scaling on:
```
Apr 25 13:28:28 xxx systemd[1798]: Starting GNOME Shell on X11...
Apr 25 13:28:28 xxx gnome-shell[10304]: Enabling experimental feature 'x11-randr-
Apr 25 13:28:28 xxx /usr/lib/
...
Apr 25 13:28:28 xxx gnome-shell[10304]: Failed to read monitors config file '/home/
```
### Steps to reproduce
* Need multiple displays to reproduce
1. Go to Display Settings
2. Enable Fractional scaling, for one of the screens, and set scaling to a different value than the other one.
3. Restart gnome-shell
4. Settings switched to default ones, as gnome-shell can't validate monitors.xml
### What happened
Gnome-shell can't apply monitors.xml config as it can't validate it with fractional scaling on
### What did you expect to happen
Scaled settings validated, loaded and remain the same across gnome-shell restarts
### Relevant logs, screenshots, screencasts etc.
Saved 'Scaled' monitors.xml, which not passing validation:
```
<configuration>
<logicalmon
<x>0</x>
<y>0</y>
<
<monitor>
<mode>
</mode>
</monitor>
</logicalmo
<logicalmon
<x>5120</x>
<y>0</y>
<
<
<monitor>
<mode>
</mode>
</monitor>
</logicalmo
</configuration>
```
As you can see first one resolution is 2560x1440, but the second one by position starts at x=5120, so 2560x2, as the second one is saved with 1.5 scale. But gnome-shell probably expects them to be adjacent, so expects x=2560
So, when gnome-shell starts it looks like we are failing to pass the adjacent check. And that's exactly what it's saying:
Apr 25 13:28:28 xxx gnome-shell[10304]: Failed to read monitors config file '/home/
To verify that I made x=2560 in monitors.xml and restarted gnome-shell, all scaling remained in place as they saved and no errors from gnome-shell anymore, but the left screen is half overridden by right one (which is exactly how to position specified now for the scaled screen).
The modified version of monitors.xml, passing validation:
```
<configuration>
<logicalmon
<x>0</x>
<y>0</y>
<
<monitor>
<mode>
</mode>
</monitor>
</logicalmo
<logicalmon
<x>2560</x>
<y>0</y>
<
<
<monitor>
<mode>
</mode>
</monitor>
</logicalmo
</configuration>
```
So it looks like config validator in gnome-shell needs to be fixed to behave differently when logical monitors are scaled.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-shell 3.36.1-5ubuntu1
ProcVersionSign
Uname: Linux 5.4.0-26-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 26 13:53:28 2020
DisplayManager: gdm3
InstallationDate: Installed on 2020-04-23 (3 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
ProcEnviron:
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/usr/bin/zsh
RelatedPackageV
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to focal on 2020-04-26 (0 days ago)
Thank you for your bug report.Marco, could you check if you see anything wrong in the code there?