I am using Ubuntu 18.04 on a Dell XPS 13 (2018) that has a HiDPI (UHD) Screen (3480 x 2160), I am then connecting to a UHD Dell 34" Monitor (3440 x 1440) via a USB-C DisplayPort cable.
All the screenshots here are using Wayland - I have also tried using X, but switched to Wayland as that supports separate scaling on the monitor and built-in display.
However the scaling is off on quite a few applications.
From the Screen Display application, the 'Built-in display' is scaled to 200% (this is the default that Ubuntu sets) and works well for the default when I am not connected to a monitor. Then the Dell Inc. 34" screen settings has the scale at 100%.
With these scaling factors my terminal session windows look about correct and so I'm using this as a base.
However there are lots of things that don't seem to match up with my most common applications:
- Firefox
- Chromium
- KeypassXC (this has a QT application UI)
- Gimp
These are the issues I've hit:
- The scaling of the title bars for FF,Chrome and Keypass on the monitor stays based on the in-built display (so scaled to 200% when the other applications are scaled to 100%)
- The scaling of the text inside the window remains huge
- Adjusting both the in-built and the monitor to 100% still leaves the applications with title bar heights that are scaled to 200% but the text within them is scaled to 100% and the text in the application is still scaled to 200%.
The only way to get things to match up correctly between screen and monitor is to set both to 200% but then everything looks huge on the monitor.
Screenshot 1 (built-in 200%, monitor 100%)
(Current) Best possible but the browser applications are all too big.
Screenshot 2 (built-in 300%, monitor 100%)
This shows the title text being based of the screen scaling and not the monitor scaling
Screenshot 3 (built-in 100%, monitor 100%)
The applications on the monitor still look incorrect and now Gnome applications look tiny on the built-in display.
I have a similar issue with Matebook X Pro (3000x2000) and external 1440p display. Weyland scaling factor not apply to all programs as above.
I also checked other distros and desktop environments, it works somehow on KDE Plasma - I mean scaling was proper on second display - but there was a lot of other issues, for example, some programs not scale in general.
On Ubuntu I also notice touchscreen issue, it works, but it is not the best user experience for me.
I type it with pain, but... for now - it is really hard to write - for now only Windows 10 works fine with this setup. It looks like we have to wait for better Linux support of HiDPI.
Update
After about one week i gave up... Windows 10 is so useless. I am very impressed that OS provided with hardware works so bad (minimum 1 crash/hang per day, about 10Gig RAM used by OS, Candy Crash in menu, preinstalled, in profesional OS!! and many many more bad experiences).
Then I switch back to only right OS - Linux. I'm really sorry that I doubted him.
In some way I workaround this issue. I disabled scaling on both screen (1x scale factor was seted). Then on my HiDPI screen I changed resolution to 1920x1280. I know that is strange resolution but it is because my screen aspect ratio is 3:2. This resolution is apropriate to properly see UI elements and do not casue strange graphical glitches. Everything looks perfect. All programs works like charm. I was afraid when I changed resolution to smaller one then everything will be looking odd. I am impressed how everything works so great and there is no need for scaling.
I setted this weird resolution using xrandr (google is your friend).
For every day use my setup is 3000x2000, 1920x1080, 1920x1080 screens and finaly I can use this potential with power of only right OS.
Currently I am using Ubuntu but this should work on any Linux based OS.
tl;dr: KDE plasma solved my issues but caused others, so I switched to vanilla GNOME 3 leaving the scaling at 200% for both laptop and monitor.
After a month of trying with Wayland and then also regular X I gave up and tried alternative options. I even was willing to accept that scaling would be twice as big on the monitor as long as the menu bars and text would be consistently displayed. However as you can see with the top half of the screenshots in my question the menu bars even on the same screen differ in size and beyond that the close icons don't scale and so the text becomes smaller but the buttons are still just as big.
I first tried Budgie. Where as this is nice, it is just a wrapper on Gnome and so suffers from the same problems - inconsistent menu bar heights and min/max/close icons that don't scale.
KDE Plasma
Then I tried KDE Plasma (recommended via reddit) and this for me works about perfectly - all windows are scaled consistently. The one issue is that by default just through the System Settings > Displays menu you can only scale both the monitor and the in-built screen to the same (same as Gnome X). This means that things are twice as big on the monitor as the desktop, but I can just put terminal windows on the monitor and scale the font down and that's fine.
The KDE Displays menu seems to be a fairly simple wrapper around
xrandr
- so hopefully they'll extend it to allow independent scaling through the menu. My objective when using Linux is that you can achieve things through menus so that others can use them too. However at least the scaling is consistent and so if I do usexrandr
I should be able to get the perfect setup, where as on Gnome the windows were different sizes in the same screen.Here is a comparison screenshot:
Update: switching to plain GNOME 3
After a couple of months with KDE a couple of annoyances popped up where it doesn't deal well with UHD screens and external monitors.
All of this was compared to the almost perfect experience that I have with Fedora + GNOME, plus I guess I'm just comfortable with using GNOME.
So as my current solution I have simply installed the base GNOME 3 (Wayland or not doesn't matter, but I do use Wayland) and I have accepted that the only scaling that handles all the things I care about is the default of scaling 200% on both the laptop and external monitor.
Even with plain GNOME scaling to 100% doesn't work - it just makes the text of the titles smaller rather than shrinking the size of the title bars.
I followed this It's FOSS guide for installing GNOME:
Then I needed a further tweak to switch the login screen back to
gdm3
:Now it's the case that actual regular Ubuntu GNOME 3 would also work fine, so it sounds like potentially my best option in the beginning was just to do nothing and accept the large titles on the external monitor
**sigh**
. But at least my desktop experience is fairly consistent now between my home Fedora Thinkpad laptop and my work Dell Ubuntu laptop.But I do now have:
Now my desktop looks like this:
Things have gotten much better in KDE Plasma since the question was asked. My new XPS-15 with a 4K internal screen and an external 28" monitor works reasonably in a Plasma Wayland session in kubuntu 20.04 if I set the internal screen to 2x scaling and the external one to 1x.
Native Plasma apps are perfectly scaled on both screens. As far as I can tell, so are QT apps and probably any native Wayland apps.
What doesn't work perfectly is legacy X11 apps running through XWayland on the internal screen. All the window decorations are good and the content is caled to the correct size but is clearly rendered at a low resolution and then scaled to the screen as a bitmap so it becomes fuzzy. Unfortunately that includes all the web browsers and my python IDE. So they get mostly dragged to the external screen and the internal screen is used for (gorgeous) terminal windows, file managers and simple editors.
Still, this is enormously better than the previously accepted answer of setting the internal screen to half its native resolution.
So my screen now looks like the above screen-shot. What it doesn't show is that the browser window in the bottom-left is a bit fuzzy compared to the super crisp terminal window in the bottom-right.