Scaling factors for HiDPI on multiple monitors

Bug #1528319 reported by lum3n
114
This bug affects 24 people
Affects Status Importance Assigned to Milestone
gnome-control-center
New
Undecided
Unassigned
gnome-control-center (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Hello,

a bug report for my problem was suggested here: https://answers.launchpad.net/ubuntu/+question/274062
I also created a question at askubuntu: http://askubuntu.com/questions/614301/how-to-set-different-scaling-on-multiple-monitors

I'm trying to use an external monitor on my HiDPI Dell XPS 13 9343. It has a resolution of 3200x1800. The monitor I'm trying to connect has a resolution of 2560x1440 (or 1920x1080). When using the notebook alone I need to use a scaling factor of 1,75 due to the high resolution. The problem occurs when changing the scaling factor for the external monitor, which is too high with 1,75.

As the GUI settings describe, it is possible to set different scaling factors for different monitors. Unfortunately the settings always take effect on all monitors. For example:

Scaling factor: 1
Monitor 3200x1800: everything too small
Monitor: 2560x1440: everything good

Scaling factor 1,75: vice versa

In the question on askubuntu (see above) you can see how the gsettings are changed when altering the scaling factor. It seems like it is not possible to set the value separately for each monitor.

I would be grateful if you can check that. I hope all necessary information are included in the bug report. If not, please describe how I can help.

Regards,
lum3n

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: xorg 1:7.7+7ubuntu4
ProcVersionSignature: Ubuntu 4.2.0-18.22-generic 4.2.3
Uname: Linux 4.2.0-18-generic x86_64
NonfreeKernelModules: wl
.tmp.unity.support.test.0:

ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Mon Dec 21 19:24:41 2015
DistUpgraded: 2015-11-02 20:46:01,871 DEBUG enabling apt cron job
DistroCodename: wily
DistroVariant: ubuntu
DkmsStatus:
 bcmwl, 6.30.223.248+bdcom, 3.19.0-31-generic, x86_64: installed
 bcmwl, 6.30.223.248+bdcom, 4.2.0-16-generic, x86_64: installedError! Could not locate dkms.conf file.
 File: does not exist.

 bcmwl, 6.30.223.248+bdcom, 4.2.0-18-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation Broadwell-U Integrated Graphics [8086:1616] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Dell Device [1028:0665]
InstallationDate: Installed on 2015-07-06 (168 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
MachineType: Dell Inc. XPS 13 9343
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.2.0-18-generic.efi.signed root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
UdevLog: Error: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/log/udev'
UpgradeStatus: Upgraded to wily on 2015-11-02 (48 days ago)
dmi.bios.date: 03/12/2015
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A02
dmi.board.name: 0310JH
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA02:bd03/12/2015:svnDellInc.:pnXPS139343:pvr01:rvnDellInc.:rn0310JH:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.name: XPS 13 9343
dmi.product.version: 01
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.12.2+15.10.20151015-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.64-1
version.libgl1-mesa-dri: libgl1-mesa-dri 11.0.2-1ubuntu4
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 11.0.2-1ubuntu4
version.xserver-xorg-core: xserver-xorg-core 2:1.17.2-1ubuntu9
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.9.2-1ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.5.0+git20150819-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20150808-0ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.11-1ubuntu3
xserver.bootTime: Mon Dec 21 18:46:25 2015
xserver.configfile: default
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id 5153
 vendor SHP
xserver.version: 2:1.17.2-1ubuntu9

Revision history for this message
lum3n (lum33n) wrote :
lum3n (lum33n)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
Changed in xorg (Ubuntu):
importance: Undecided → Medium
affects: xorg (Ubuntu) → gnome-control-center (Ubuntu)
Revision history for this message
Rocko (rockorequin) wrote :

In case it helps, X provides a sort-of workaround using the xrandr --scale option. For instance, I have a 3840x2160 HiDPI laptop monitor (eDP1) and an external 1680x1050 monitor (HDMI1) above it. With this setup I can make the text etc size approximately the same on both monitors with this command, which increases the zoom on the eDP1 scale:

xrandr --output eDP1 --scale 0.6x0.6

However, with this configuration the text is a bit blurry on the eDP1 screen and the graphics performance is much worse (glxgears only manages 30 fps instead of what it's trying for, ie 60). (Maybe it might work better if the scaling factor is something like 0.5 so the calculations are easier?)

Additionally, if I try to do it the other way around (use xrandr to shrink the screen on HDMI1 above the eDP1 screen), you can't use a y-scale of anything above 1, or X draws the top of the eDP1 screen at the bottom of the HDMI1 screen as well as at the top of the eDP1 screen.

So the workaround isn't really acceptable; it's better to set the HiDPI display to a lower resolution. Or hope that Mir or Wayland will become stable enough to use some time soon.

Revision history for this message
Andrea Lazzarotto (Lazza) (andrea-lazzarotto) wrote :

Xorg simply doesn't allow to have different DPIs on different displays. Wayland supports it more or less decently.

Revision history for this message
Kai Mast (kai-mast) wrote :

I'm using Wayland + GNOME 3.26 on Artful.

How do I get multiple DPIs to work?

Revision history for this message
Rocko (rockorequin) wrote :

@Kai: You can set per-monitor scaling by setting org.gnome.desktop.interface scaling-factor to zero, and then Wayland figures out the scaling automatically. But it only works for apps that support Wayland directly (like nautilus), not for apps that run under XWayland (like chrome and firefox and most other apps as well), so it's a bit pointless at the moment. There's some info here: https://askubuntu.com/questions/875832/how-to-set-per-monitor-scaling-on-wayland

The page https://wiki.gnome.org/HowDoI/HiDpi talks about HiDPI support via the org.gnome.settings-daemon.plugins.xsettings overrides setting. I think it says Wayland detects monitors above a certain resolution as HiDPI and applies the override scaling factor you set (eg of 2) just to those monitors, but I haven't tried it. (My guess is it also doesn't work with XWayland apps). And https://bbs.archlinux.org/viewtopic.php?id=221742 discusses issues when trying to use this setting.

Revision history for this message
Rocko (rockorequin) wrote :

It looks like it's working now in Ubuntu 17.10! In the display settings you can set the resolution and the scaling individually per monitor if you are using Wayland. You might have to turn on fractional scaling (see http://www.omgubuntu.co.uk/2017/09/enable-fractional-scaling-gnome-linux).

If I set my laptop monitor to 3840 x 2160 and 175% scaling and the external monitor to 1920x1080 and 100% scaling, xrandr says:

Screen 0: minimum 320 x 200, current 2192 x 2313, maximum 8192 x 8192
XWAYLAND0 connected 2192x1233+0+1080 (normal left inverted right x axis y axis) 350mm x 190mm
   2192x1233 59.89*+
XWAYLAND4 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 530mm x 300mm
   1920x1080 59.96*+

I am seeing a flickering white line just above the gnome top bar (and it flickers on the right hand side), though.

Revision history for this message
Chris Graham (chrisgraham) wrote :

I'm on an iMac, so I want to make use of my Retina (hj-dpi) screen, while also using external screens that are not hi-dpi.

I can confirm no good X11 support for separate dpis per screen. I was able to mess around with xrandr, but I got ghosting on my mouse cursor that I could not resolve. Possibly I could have hand-configured an X config for my particular screens, but seems like a lot of work and I don't want to hard-code my screens.

The iMac screen doesn't work with all the resolutions selectable. In fact, my realistic choices were basically either:
1) Full resolution with 200% scaling, and no usable second screen
2) 1/2 resolution with 100% scaling and usable second screen

I settled for '2'.

However, I read this issue and did see Wayland supported it. So I:
1) Logged in with Wayland
2) Ran gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
3) Logged out (necessary)
4) Changed my dpis per screen in Display settings

It works reasonably well. Gnome apps are crisp on my Retina screens, other apps are blurry due to presumable up-scaling of low-dpi rendering to go onto the larger canvas.

Unfortunately of course Ubuntu has made Wayland non-default. I hope it can become default again and all the issues with it (network protocol, native app support) can be resolved, as I do think X11 is dated at this point.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.