SUMMARY Krunner doesn't scale correctly for Firefox and other GTK applications. Qt applications work well. I am using KDE with Wayland, 4K resolution with 2x scale factor. The application scales correctly when started from commandline or plasma application launcher, but it starts with incorrect scale with krunner. STEPS TO REPRODUCE 1. Start krunner and type "firefox" 2. Start firefox 3. The result application window text looks small (doesn't scale correctly) OBSERVED RESULT The result application window text looks small (doesn't scale correctly) EXPECTED RESULT The result application window should scale correctly. SOFTWARE/OS VERSIONS openSUSE Tumbleweed 20210423 Linux: 5.11.15 KDE Plasma Version: 5.21.4 KDE Frameworks Version: 5.81.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION Inspecting into the process's environment variable, I find "GDK_SCALE=2" and "GDK_DPI_SCALE=0.5", which leads to incorrect scaling. The process UI scale correctly if started from commandline or from Plasma Application Launcher. And it doesnot have the above two environment variables set when I start it from there. Therefore, it must be krunner incorrectly set the above two environment variables somewhere.
Created attachment 137931 [details] Result of incorrect scaling
This is because when I start my computer, I first login X11 session. After I logout X session and login Wayland session, this bug will appear, because in the wayland session, krunner still uses startplasma-x11.cpp to start an application (not startplasma-wayland.cpp).
My guess is that GDK_SCALE and GDK_DPI_SCALE are "inherited" from the previous session's systemd launch environment. It probably needs to be added to the exclusion list added in https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/580 as well.
We now reset this var explicitly, please reopen it's an issue on Plasma 5.23 or newer