HiDPI UI blurry on Linux (Wayland)

Godot Version

4.5.1.stable.arch_linux

Question

I haven’t been able to figure out how to get Godot to properly render UI on HiDPI displays with scaling on Linux (Wayland). Text, rounded corners, and other UI elements appear noticeably blurry regardless of the display settings (stretch mode, stretch scale, viewport width/height). Below are two screenshots, the first was taken when my display was set to 1x scaling, the second is the same UI element after setting my display to 2x scaling and restarting Godot.

1x-scaling
2x-scaling

In the editor, the text displays as crisp as in the 1x image regardless of screen scaling; this issue only affects the game when running.

It’s not clear if you have looked at the relevant section in the documentation yet.

You could potentially have your default res be hidpi and scale down instead…

Turns out the game was launching under X11 under XWayland by default despite having set “Prefer Wayland”. Since X11/XWayland doesn’t have proper support for HiDPI scaling, the game was forced to render at half resolution. The documentation should probably mention this (or better, Default to Wayland display server on Linux · Issue #11583 · godotengine/godot-proposals · GitHub).