Why Chromium and other applications look zoomed in (or out) on your external screen in Ubuntu and what to do about it

tags: linux why is everything broken

Apparently, on at least some Ubuntu setups, Chromium (and Firefox, and...) still uses the old X11 protocol on the new Wayland display system. A drawback of this setup is that XWayland, the compatibility glue, can only scale applications to suit the primary display. If you, like my officemate, have a low-resolution external screen and a ridiculously high-resolution internal screen, you will have windows that look either too zoomed in or too zoomed out, depending on which one of the screens you set as your primary.

The fix is to have your programs use Wayland rather than X11. In time, this will happen automatically for most programs, but apparently in December 2023 it still hadn't happend for Chrome, Firefox and a few others.

The setting to enable Wayland in Chrome is straightforwardly called Preferred Ozone platform and should be set to Wayland. The setting is available by going to chrome://flags. For Firefox, you need to start with the environment variable MOZ_ENABLE_WAYLAND=1. (source)

The fact that this problem that's been well-documented for six years still made it into mainline Ubuntu tells me I should hold off on Linux-based desktops for a while longer until they are finished), whenever that happens.