GNOME Bugzilla – Bug 788901
can't set usable scale for hidpi internal display if when using external display less than 1600x1200
Last modified: 2017-10-17 07:41:40 UTC
When plugging in an external 1920 x 1080 monitor to a laptop with a hipdi screen (e.g. 13" 3200x1800), mutter automatically configures the two displays next to each other and keeps the 2x scale factor. If the user sets the scale factor (using the control center, the dbus api, or the monitors.xml file), they will be stuck at 1x and everything will be tiny on the internal display. It's not possible to set the scale factor back to 2x, and any attempts to do so will result in mutter complaining that "Logical monitor scales must be identical" or "Scale 2 not valid for resolution 1920x1080". The user can't even move the external display from the right of the internal to the left without selecting 1x scaling. The configuration simply won't apply. It should be possible to set a apply a given scale factor if at least one monitor supports it. The primary reason to prevent setting a too-high a scale factor is that a user may get stuck in an unusable state.
Have you tried gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" Then reboot. I think that Fedora 27 is considering enabling that option.
That's for Wayland only, right? I just tried that gsetting here to confirm, and it didn't do anything. Dealing with hidpi on X isn't ideal, but is necessary to make things work for users with NVIDIA graphics (or others who can't switch to Wayland yet).
Created attachment 361491 [details] [review] monitor-manager/xrandr: Use a single supported scales list for all Under X11 we can only ever have the same scale configured on all monitors. In order to use e.g. scale 2 when there is a HiDPI monitor connected, we must not disallow it because there is a monitor that does not support scale 2. Thus we must show the same scale for every monitor and monitor mode, even though it might result in a bad experience. Do this by iterating through all the monitors adding all supported scales by the preferred mode, combining all the supported scales. This supported scales list is then used for all monitor and modes no matter what.
Thanks, Jonas! I tested this patch, and it works as expected. gnome-control-center works as expected, and it's possible to automate behavior via the dbus api. It would be great to to get this merged.
Review of attachment 361491 [details] [review]: looks fine ::: src/backends/x11/meta-monitor-manager-xrandr.c @@ +77,3 @@ + + float *supported_scales; + int n_supported_scales; could be unsigned
(In reply to Rui Matos from comment #5) > Review of attachment 361491 [details] [review] [review]: > > looks fine > > ::: src/backends/x11/meta-monitor-manager-xrandr.c > @@ +77,3 @@ > + > + float *supported_scales; > + int n_supported_scales; > > could be unsigned The 'n_supported_scales' in meta_monitor_manager_calculate_supported_scale() is an int* which is why it is that here too.
Comment on attachment 361491 [details] [review] monitor-manager/xrandr: Use a single supported scales list for all Attachment 361491 [details] pushed as 1a78557 - monitor-manager/xrandr: Use a single supported scales list for all
Backported to gnome-3-26.