3

I have a laptop using Arch Linux and Gnome Shell. My graphics card is an Intel HD 520. My laptop's screen resolution is 3200×1800. At work I connect my laptop to a monitor which has resolution of 1920×1080. The connection is being done using an HDMI cable. The system detects both screens and their resolutions correctly. The problem is the following:

In ultra HD resolutions Gnome (does Gnome do this or is it the graphics card driver?) scales the windows in order to be bigger. This is makes perfect sense, else Firefox's bar for example would be a thin line. But the problem is that when I move a window (e.g., Firefox) from one monitor to the other, this scaling is being preserved. As a result things look huge in my 1920×1080 monitor, even though the resolution is detected correctly.

  1. Is this a bug? If yes, whose fault is it? Gnome, Intel HD graphics or the Linux Kernel?
  2. Can I correct it?
1
  • Not an answer, but I'd ask on Gnome mailing list(or IRC, but imho mailing list is better). Since displaying, managing and scaling the window bar of any program falls under the responsibility of DM/WM, I'd say that Kernel and Intel have nothing to do with this, and go straight to the Gnome guys, unless Gnome's doing things correctly but drivers/hardware aren't; however, Gnome guys would know better if that is the case. Oct 13, 2016 at 12:46

2 Answers 2

2
  1. TLDR: It's not a bug, just a less that ideal solution for comfortably using HiDPI screens.

It seems these solutions stem from the fact that most software does not automatically compensate for higher DPI monitors. If we left things as it were (no scaling or DPI settings) a lot of programs end up looking tiny on a HiDPI screen. As such, compensation can be made at the OS level (see Information on HiDPI for Arch Linux), but this causes a problem when you have two screens with different pixel density.

  1. Given an internal HiDPI screen @ 3200x1800 and an external @ 1920x1080, the following configurations should work (tested with a Dell XPS9350 and XPS9360).

Configure external to the right:

xrandr --dpi 276 --fb 7040x3960 --output eDP-1 --mode 3200x1800 --output 
DP-1 --scale 2x2 --pos 3200x0 --panning 3840x2160+3200+0

Configure external to the left:

xrandr --dpi 276 --fb 7040x3960 --output DP-1 --scale 2x2 --panning
-3840x2160+3200+0 --pos 0x0 --output eDP-1 --mode 3200x1800 --pos 3840x0

If one finds themselves switching a lot, it might be a good idea to put these commands in your .bashrc as an alias. For example:

alias ext-config-right="xrandr --dpi 276 --fb 7040x3960 --output eDP-1 --mode 
3200x1800 --output DP-1 --scale 2x2 --pos 3200x0 --panning 3840x2160+3200+0"
2

It seems to be that there is a single setting for ultra hd screens, which applies to all attached monitors, even though that may not be suitable, and seems to be a setting from X, maybe.

The Arch Linux wiki has a section on this, with a few options using xrandr to scale the monitor, where eDP1 is the laptop screen:

xrandr --output eDP1 --auto --output HDMI1 --auto --scale 2x2 --right-of eDP1

apparently there can still be a few problems though, with either these two screens overlapping, or secondly the cursor may not cover all of both screens.

if the internal monitor has dimensions AxB, external has CxD and the scaling is ExF, as suggested on the Arch wiki, then a shell script is linked to a user called wvengens Github, which would need the displays being given the appropriate ones. It gives:

xrandr --output eDP1 --auto --pos ${(A-C)/2}x${D} --scale 1x1 \
--output HDMI1 --auto --scale 2x2 --pos 0x0

For the second problem, arch suggest using panning:

xrandr --output eDP1 --auto \
--output HDMI1 --auto --panning [C*E]x[D*F]+[A]+0 --scale [E]x[F] --right-of eDP1

and finally, if any of that helped, the ubuntu wiki suggests the xrandr command could be saved in /etc/gdm/Init/Default, just before the line initctl -q emit login-session-start DISPLAY_MANAGER=gdm. (sorry, too low rep for a third link..)

2
  • Would switching to Wayland fix the problem?
    – Aventinus
    Oct 13, 2016 at 19:42
  • @Aventinus worth a try. The Gnome site seems to suggest its simple enough.. I don't know any more than that though.
    – Guy
    Oct 13, 2016 at 20:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .