4.18.0 Preview 1: Editor scaling is broken on Linux

When running 4.18.0 Preview 1 on Linux, the editor launches in super high DPI mode, even at 1920x1080 in a 14 inch (not so high DPI) screen, reducing the available screen space greatly.

Additionally, menus open nearly half a screen away from where they should (take my word for it, X11 can’t take screenshots while menus are open), and title bar buttons can’t be clicked (no hover effects either).

Changing the application scale in Widget Reflector works normally, but menus and the title bar stay broken.

4.17.1 runs at the normal scale as expected, so this is a new bug in 4.18.

Screenshot (ignore the unfinished shader compilation):


Distribution: Arch Linux

Patches applied: -fno-pie compiler parameter in LinuxToolchain.cs (linker-only flag, no effect on compiled code)

Clang version:

clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/sbin

Git commit ref: dcf5ec1a9bdbe8f690a15c1855f5ca04ef88f8b6 from tag: 4.18.0-preview-1

Note: bug happens with both Intel driver and Nvidia driver (via Bumblebee/Primus).

Attaching a screenshot of what 4.17.1 looks like on the same system:

Hello . Yes, the tag I’ve built from was from Wednesday (9/20), so that was before the fix. I’m having issues compiling a newer 4.18 build of the engine on my system at the moment, but I can confirm that the -nohighdpi works around the issue for now. Thank you.

Hey

When did you obtain your version of the preview? I ask because changes specific to DPI settings went in late on Friday afternoon (9/22) so what you’re seeing may already be fixed if your version is earlier than that. If you do have a version from after Friday (specifically after [this commit][1]), please check the logs for mention of the dpi scaling and post them here. If you are still having scaling issues, let me know if using the argument -nohighdpi when launching the UE4Editor.exe disables the DPI scaling.

[1]:

Update! I’ve managed to compile 4.18 preview 2 (which has the commit merged), and although menus and title bar buttons are now working correctly in high DPI mode, the scaling is still way too aggressive. Here are the relevant log lines:

[2017.09.27-20.25.20:651][  0]LogLinux: Scale at X=0.000000, Y=0.000000: 1.750000 (monitor=#0, HDPI=157.825241 (horz scale: 1.644013), VDPI=158.566467 (vert scale: 1.651734))
[2017.09.27-20.25.20:651][  0]LogLinux: Scale at X=1676.250000, Y=917.625000: 1.750000 (monitor=#0, HDPI=157.825241 (horz scale: 1.644013), VDPI=158.566467 (vert scale: 1.651734))
[2017.09.27-20.25.20:682][  0]LogLinux: Scale at X=0.000000, Y=0.000000: 1.750000 (monitor=#0, HDPI=157.825241 (horz scale: 1.644013), VDPI=158.566467 (vert scale: 1.651734))

The detected DPI is correct, it’s just the resulting scale that is unexpectedly high. Seems like the DPI scaling math makes sense for desktop monitors which have way lower DPI overall, but it doesn’t really work too well for laptops. Personally, I’d rather have DPI scaling be an user setting on Linux (the only desktop platform without an unified system DPI scale setting, sadly), instead of an auto-detected value, which would cover all possible scenarios.