Created attachment 129122 [details] KRunner window in top left corner Everything KDE from git master with Qt 5.15 on openSUSE Tumbleweed. SUMMARY None of the power/session actions work for me. STEPS TO REPRODUCE 1. Set 200% or 250% scale factor in KScreen KCM 2. Reboot 3. Open KRunner It appears in the top-left corner of the screen. See attached screenshot. The problem does not appear on Wayland.
Can't reproduce on KDE Neon Unstable with Qt 5.14.2.
Hmm, could be a Qt regression. :/
I can't reproduce it with Qt 5.15 and master
*** Bug 422976 has been marked as a duplicate of this bug. ***
I'm seeing the same thing (reported as duplicate in https://bugs.kde.org/show_bug.cgi?id=422976 because I kept looking for "HiDPI" in my bugtracker search.). Alexander reports that he doesn't see this issue on KDE Neon with the same device and scaling; that's possible. I migrated to OpenSUSE from Kubuntu with Plasma 5.18 and Qt 5.12, where I also didn't have this issue. I then tried to move my working HiDPI display configuration to OpenSUSE with Plasma 5.19 and Qt 5.15. During the transition I had to set PLASMA_USE_QT_SCALING=1, which I didn't under Kubuntu. I'm not sure whether that is because Kubuntu doesn't need it, or whether it silently sets it itself. After this, I am now seeing this behaviour with KRunner and a similar issue with Yakuake, whereas before it was fine. I assume that could have to do with how there are too many degrees of freedom in the different ways to try and achieve a good-looking UI on HiDPI screens (Global scaling, QT_SCALE_FACTOR, QT_AUTO_SCREEN_SCALE_FACTOR, Force font DPI, QT_ENABLE_HIGHDPI_SCALING, Xft.dpi and so on). What would be the best way to provide more information?
Addendum: the related Yakuake issue where I'm seeing similar behaviour seems to be bug 389448. Difference: adding & removing a virtual desktop does not make the problem go away with KRunner as it does with Yakuake
I have the same issue with Archlinux, Kde Plasma 5.19, KDE Framework 5.71.0, QT 5.15, under X11. Actually, in my case, KRunner appears on the left but with an offset from the very left side of the screen (similarly to https://bugs.kde.org/show_bug.cgi?id=422976)
I have a feeling we're going to start getting a lot of duplicates of this soon. :( Does everyone experiencing the issue have Qt 5.15?
@ngraham Have you tried installing a previous version the KRunner executable (just the view.cpp file)? I remember there being a lot of work done regarding the positioning. For instance https://invent.kde.org/plasma/plasma-workspace/-/commit/731a190810440726f2db252b3a935648346f4a12.
Yep, that's the one. Reverting that commit fixes the issue for me.
Working on this. Seems like the problem is that the DBus reply gives us a QRect that's in scaled pixels while shownOnScreen->availableGeometry() gives us raw pixels, and the positioning algorithm only works with physical pixels. At 100% scale, these are identical, so there's no bug. At greater than 100% scale, the calculation will be off by a magnitude that increases as the scale does.
Further investigation: this mismatch between scaled and unscaled coordinates only happens on X11. On Wayland everything uses scaled coordinates and it all works properly. But on X11, the DBus reply gives is scaled pixels while the rest of the code is in unscaled pixels.
Final piece of potentially interesting information: this only happens with PLASMA_USE_QT_SCALING=1 on X11. So I guess this could be considered another blocker to enabling that.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/91
Git commit 0f8c6c3a660d9778b04722f6a7319224205e3aa0 by Nate Graham, on behalf of David Edmundson. Committed on 18/06/2020 at 15:22. Pushed by ngraham into branch 'Plasma/5.19'. Fix KRunner positioning on X11 with High DPI and Qt scaling on Plasma When using Qt scaling, we want to adois mising scaled and unscaled geometry spaces, as this leads to poitioning issues. FIXED-IN: 5.19.2 M +4 -2 krunner/main.cpp https://invent.kde.org/plasma/plasma-workspace/commit/0f8c6c3a660d9778b04722f6a7319224205e3aa0
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/107 If someone can test this fix, and confirm it fix the issue, thanks