Created attachment 111301 [details] Inconsistent HiDPI rendering (annotated) - Plasma 5.11.2 running on Manjaro 17.0.6 x64 stable HiDPI sometimes renders inconsistently on Plasma 5.11.2 and 5.12.2. Sometimes widgets, icons, fonts, etc will render correctly, whereas other times these things will be tiny and/or lay out according to skewed geometry. Some windows have decorations that are far too small. Attached are three pictures of the problem: - Two running on Plasma 5.11.2/Frameworks 5.39.0/Qt 5.9.2 on Manjaro 17.0.6 - One running on Plasma 5.12.2/Frameworks 5.43.0/Qt 5.10.0 on Neon 5.12 I'm not sure exactly where the problem is located, so I put this under "plasmashell" - feel free to move if this isn't the right place.
Created attachment 111302 [details] Inconsistent HiDPI rendering - Plasma 5.11.2 running on Manjaro 17.0.6 x64 stable
Created attachment 111303 [details] Inconsistent HiDPI rendering - Plasma 5.12.2 running on Neon 5.12 User Edition
To reproduce this, I simply went into the display settings and set "Scale" to 2.0. No other changes were made, other than a tweak to the system tray icon sizes, by going to /usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/config/main.xml and changing 'iconSize' to 2. (taken from https://wiki.archlinux.org/index.php/HiDPI#KDE)
Finally, this is on VirtualBox on a Surface Pro 4. It might not be a problem if I tried to install it natively, but I'm not sure.
If you `killall plasmashell` and then run `PLASMA_USE_QT_SCALING=true plasmashell` are things a bit better? Related: https://phabricator.kde.org/D11131
It does appear to work on 5.12.2 Neon, yes! I'll test on Manjaro later tonight. At least it fixes the issue with small icons - the font layout is still off on some of the windows, but it's still way better. Picture attachment coming next. How do I enable this by default? Is there any reason that this setting is off? This should be enabled by default IMO, as HiDPI scaling is *really* weird without it. I haven't seen anything about this anywhere, on the Arch Wiki and etc.
Created attachment 111305 [details] Some HiDPI issues fixed on 5.12.2 Neon by enabling Qt scaling
>I'll test on Manjaro later tonight. You don't need to, it'll be the same on > 5.11 See linked report. *** This bug has been marked as a duplicate of bug 356446 ***
FWIW, I did get the same good results as on Neon, however the Manjaro Hello app is still screwed up. So while the Qt scaling environment variable fix worked for the other things as in #356446, this part of the bug report is not related to that and hence still active. According to the github repo (https://github.com/manjaro/manjaro-hello), the manjaro-hello app uses python, gtk3, and glade. Any idea what could be throwing the scaling off here? I don't know much about Glade, but perhaps something there, or with GTK3?
Actually, it does appear to be GTK3. I thought I'd tested a GTK3 app previously, but I guess not. The problem also happens for Lollypop music player, which is GTK3. Is there a separate environment variable that needs to be set for GTK3 scaling?
Also, should I make a separate bug report for this, since you set this one as a duplicate of the other Qt issue? Turns out there are multiple things going on here.
You should file a bug against the Manjaro app on their own bug tracker.
The issue applies to all GTK3 apps running in KDE. Read my description above where I mention Lollypop: > Actually, it does appear to be GTK3. I thought I'd tested a GTK3 app previously, but I guess not. The problem also happens for Lollypop music player, which is GTK3. I was able to fix this problem for GTK apps in general by setting GDK_SCALE=2 and GDK_DPI_SCALE=0.5.
So below are attached two pictures of the GTK3 problem, and how I was able to fix it. Note that this is a completely separate dimension from the Qt scaling issue, and that the problem is for all GTK3 apps, not only the Manjaro-Hello one. I have pictures of manjaro-hello and Lollypop for comparison. The first picture is what the two apps look like with KDE's Display settings set to scale=2.0. Setting PLASMA_USE_QT_SCALING=true here makes no difference. The second picture is what I get if I set GDK_SCALE=2.0 and GDK_DPI_SCALE=0.5. Everything looks great. Setting GDK_DPI_SCALE=0.5 is necessary because if you don't, GTK widgets are scaled correctly, but fonts are double-scaled. GDK_DPI_SCALE de-scales the fonts while keeping widgets correct.
Created attachment 111327 [details] Incorrect default scaling behavior for GTK3 apps - ex: manjaro-hello and Lollypop This has KDE scaling = 2.0 and no other changes. This problem is independent of the Qt scaling problem.
Created attachment 111328 [details] Correct GTK3 scaling behavior - GDK_SCALE=2 and GDK_DPI_SCALE=0.5 Correct behavior with GDK_SCALE=2 and GDK_DPI_SCALE=0.5. Note that without GDK_DPI_SCALE=0.5, fonts get double-scaled.
Largely tracked already by BUG 381794 and Bug 366088, but also some of BUG 390147. Arbitrarily re-marking as a duplicate of BUG 381794 because we can't multi-dupe. :) *** This bug has been marked as a duplicate of bug 390147 ***
Un-duping since this appears to be different from Bug 390147 after all. The fix may be similar, but fixing that will not automatically fix this. Looking into it.
And upon further investigation and consultation with colleagues, it is impossible to fix without turning on Qt scaling, because you can't selectively turn on or off Qt scaling for only certain UI elements. The only thing we could do is split plasmashell into multiple processes and have one process draw everything that is drawable using Plasma scaling and another process draw everything that needs to be drawn using Qt scaling. Such an endeavor would be an enormous amount of work and add substantial complexity and fragility though, so it's not really feasible. Re-duping to Bug 356446, and I will re-open it. *** This bug has been marked as a duplicate of bug 356446 ***