Wayland Multi DPI Setup – How to Configure

dpignomehdpimultiple-monitorswayland

We are writing the year 2018 and it will not be the year of Linux again!
I'm working on Wayland since the beginning of the year (full time!),
but it's not that satisfying with a mixed/multi dpi setup.

I really don't need many applications:

  • PHPStorm
  • Chrome
  • Terminal
  • Docker (For me that's the only reason for Linux actually!)
  • Mail Client

So I'm using one native application: Terminal

This is the only one which is running as excepted on all monitors!
When switching the app from one monitor to another with different dpi it's scaled automatically correct! That's what I'm expecting.

What I've found out yet:

  • Electron apps are not able to use the scale factor of Wayland
  • Java apps are not able to use the scale factor of Wayland
  • Chrome/Chromium/Firefox is not able to use the scale factor of Wayland

So I'm not sure where the problem is really located?
In Mutter? In Electron? In Swing? In Chrome? In Chromium? In Firefox?

I hope someone can point me into the right direction to find out what I need to wait for.

Best Answer

Scaling on Wayland is handled by the application, in practice that means the toolkit (GTK, QT, etc.) (support status). GTK 3 apps (like GNOME Terminal) are fine, as you've found.

Firefox has come a long way, but menus don't position correctly yet (issue and related) - a development version is available here. Thunderbird would hopefully follow after Firefox. For Chromium work is underway, but it isn't finished either. Electron uses Chromium under the hood, so that can't be fixed until Chromium is done.

Because these apps don't fully support Wayland yet, they still use the X11 protocol with XWayland, which doesn't handle MultiDPI well (GNOME has ideas, but I doubt whether this will happen).

So I guess you'll have to wait until all applications support Wayland, but there are some workarounds that may be useful to some. Archlinux has some notes on HiDPI and Wayland, for example.