Run plasmashell with "PLASMA_USE_QT_SCALING=1" : Wait until 18.10; re-test
Closed, WontfixPublic

Description

Right now, Plasma doesn't respect the system scale factor on X, only Wayland. However there is actually support; you just need to run plasmashell with PLASMA_USE_QT_SCALING=1.

There were two major blockers that have both been resolved upstream of us:

If we ship with Frameworks 5.45 and take the trivial, two-line patch from https://codereview.qt-project.org/#/c/222827/ into whatever Qt version we ship with, then we can turn on Qt scaling in plasmashell and fix a significant amount of bugs with running Plasma with a HiDPI screen.

To turn this on, we would patch /etc/xdg/autostart/org.kde.plasmashell.desktop to replace plasmashell with PLASMA_USE_QT_SCALING=1 plasmashell.

ngraham created this task.Mar 10 2018, 11:59 PM
ngraham updated the task description. (Show Details)Mar 11 2018, 12:02 AM

Yes yes yes! I had no idea about this variable. It fixes a bunch of icon scaling and spacing issues. Lots of people will still be using Xorg for a while due to missing features in Wayland (such as myself). Enabling this for them will go a long way to making Plasma look good on newer computers. The only thing I noticed that happened to me, was my panel reset it's width (it's on the left of my screen).

ngraham added a comment.EditedMar 11 2018, 3:19 PM

Andrew, would you mind testing at multiple scale factors (including non-integer ones) and see if you can find any glaring regressions? I fear that at non-integer scale factors, we'll run into blurry pixellated text all over the place due to PlasmaComponenets Labels not using the right Qt Text rendering (see https://bugs.kde.org/show_bug.cgi?id=391691).

Even so, I wonder if there's a way to only allow this to be on with integer scale factors, which would seem to work around that issue.

ngraham updated the task description. (Show Details)Mar 11 2018, 3:20 PM

Just tested, and text does indeed look awful when a non-integer scale factor is used and PLASMA_USE_QT_SCALING=true is active. So that would be a regression for people who use non-integer scale factors.

I've just submitted a patch that fixes this: D11244

So if D11244 lands, then we can do this if we ship with Frameworks 5.45, or if we cherry-pick that patch into 5.44.

ngraham updated the task description. (Show Details)Mar 11 2018, 8:19 PM

Yep, landed in Frameworks 5.45. So if we want to do this, and we don't ship with 5.45, we'll need to cherry-pick that patch.

ngraham renamed this task from Run plasmashell with "PLASMA_USE_QT_SCALING=true" to Run plasmashell with "PLASMA_USE_QT_SCALING=1".Mar 19 2018, 3:48 PM
ngraham updated the task description. (Show Details)
ngraham updated the task description. (Show Details)Mar 19 2018, 4:56 PM
ngraham updated the task description. (Show Details)Mar 19 2018, 6:08 PM
tsimonq2 moved this task from Backlog to Ready 4 Work on the Kubuntu board.Mar 20 2018, 9:37 PM
valorie renamed this task from Run plasmashell with "PLASMA_USE_QT_SCALING=1" to Run plasmashell with "PLASMA_USE_QT_SCALING=1" : Wait until 18.10; re-test.Mar 31 2018, 8:36 PM
rikmills moved this task from Ready 4 Work to Backlog on the Kubuntu board.Apr 7 2018, 12:06 PM

I just wanted to mention this still works fine for me and resolves numerous icon scaling issues.

dos added a subscriber: dos.Feb 21 2019, 1:31 AM

Small glitch I noticed: when using PLASMA_USE_QT_SCALING=1 on X11 and minimizing window with a KWin effect, Plasma reports unscaled iconGeometry (in logical coordinates instead of real pixels, like 200x850 instead of 400x1700 on 2x screen), resulting in wrong animations. This doesn't happen on Wayland.

Other than that, I've been using it for months now and seems to work fine.

In T8177#176789, @dos wrote:

Small glitch I noticed: when using PLASMA_USE_QT_SCALING=1 on X11 and minimizing window with a KWin effect, Plasma reports unscaled iconGeometry (in logical coordinates instead of real pixels, like 200x850 instead of 400x1700 on 2x screen), resulting in wrong animations. This doesn't happen on Wayland.

Other than that, I've been using it for months now and seems to work fine.

Can you please file a bug on bugs.kde.org? Please make sure to explicitly mention that you're using PLASMA_USE_QT_SCALING=1, and mention why.

pragun added a subscriber: pragun.EditedMar 7 2019, 3:46 PM

I just wanted to mention this still works fine for me and resolves numerous icon scaling issues.

@acrouthamel @ngraham @dos
Hi, I landed on this page while digging on the internet looking for scaling of desktop context menu icons and tray icons.
I am on Kubuntu 18.10. My screen is 13inch, 3200*1800. I replaced the following line in the org.kde.plasmashell.desktop file present in /etc/xdg/autostart/:

Exec=plasmashell

to

Exec=PLASMA_USE_QT_SCALING=1 plasmashell

Now, this indeed fixed the context menu icon size and tray icon size but now another problem has popped up. Please refer attached screenshots


The dialog boxes, menu, application launcher have started to appear weird. There is a glare of shade running across the right and bottom edge of these boxes.

Also, I have noticed that the minimize and maximize animation of Magic Lamb is distorting.

I have tried changing scaling factor in Desktop settings but no luck.

I am an average Joe when and noob when it comes to tuning/tweaking things, however I can try some steps if they are explanatory from a beginner perspective.
Please let me know what should i do? :(

You should use the Kubuntu backports PPA to upgrade to Plasma 5.15 and see if that fixes the issue. https://launchpad.net/~kubuntu-ppa/+archive/ubuntu/backports

If it's still broken in Plasma 5.15, then you should file a bug. :) https://bugs.kde.org/enter_bug.cgi?product=plasmashell

Please make sure to explicitly state that you are using PLASMA_USE_QT_SCALING=1 for the purpose of finding bugs with that setting.

dos added a comment.Mar 7 2019, 4:44 PM

I've checked on my PC with the same screen and 5.15.2. It works fine with 2x factor (except the Magic Lamp, which I already mentioned in my last comment - haven't filled a bug yet, will do so soon), but shows similar symptoms when using fractional factors.

pragun added a comment.Mar 7 2019, 5:31 PM
In T8177#178195, @dos wrote:

I've checked on my PC with the same screen and 5.15.2. It works fine with 2x factor (except the Magic Lamp, which I already mentioned in my last comment - haven't filled a bug yet, will do so soon), but shows similar symptoms when using fractional factors.

@dos
2x as in Scaling factor in System Settings or setting PLASMA_USE_QT_SCALING=2?

dos added a comment.EditedMar 7 2019, 5:32 PM

@pragun Scaling factor of course. Keep in mind you have to log out and log back in for change to take full effect.

pragun added a comment.Mar 7 2019, 6:21 PM

You should use the Kubuntu backports PPA to upgrade to Plasma 5.15 and see if that fixes the issue. https://launchpad.net/~kubuntu-ppa/+archive/ubuntu/backports

If it's still broken in Plasma 5.15, then you should file a bug. :) https://bugs.kde.org/enter_bug.cgi?product=plasmashell

Please make sure to explicitly state that you are using PLASMA_USE_QT_SCALING=1 for the purpose of finding bugs with that setting.

@dos @ngraham
Thanks. Upgraded to plasma 5.15 via backports and now it looks perfect(At Scaling of 2x). Like @dos said the minimize and maximize animations of Magic Lamp are still distorted. @dos please make sure you file the bug. You really have pointed out something which would bother a lot of people.


This is a bit off topic but can you tell me guys, why touchpad experience on linux is so choppy. I mean there is no multi pinch zoom. No momentum/inertial/kinetic scrolling. It just scrolls in discreet steps. I read a lot on online forums and people pointed out that it has to do with libinput driver which has replaced synaptics(because the moderators have abandoned it). I tried installing synaptics but it was the same. Any reference/pointer where I can tweak this. I am on Asus Zenbook UX330 and the touchpad is so pleasing to use on Windows.

This is a bit off topic but can you tell me guys, why touchpad experience on linux is so choppy. I mean there is no multi pinch zoom. No momentum/inertial/kinetic scrolling. It just scrolls in discreet steps. I read a lot on online forums and people pointed out that it has to do with libinput driver which has replaced synaptics(because the moderators have abandoned it). I tried installing synaptics but it was the same. Any reference/pointer where I can tweak this. I am on Asus Zenbook UX330 and the touchpad is so pleasing to use on Windows.

That's a question with a very complicated answer, so it would be better asked in another venue, like r/kde on Reddit, or #kde-devel on freenode IRC or Matrix.

Run plasmashell with "PLASMA_USE_QT_SCALING=1" : Wait until 18.10; re-test

Just to be absolutely clear, if you do a fork of something deliberately against upstream Kubuntu will lose all upstream support.

[spam comment removed by sysadmin]

ngraham closed this task as Wontfix.Jan 22 2020, 2:04 AM

I guess we'll wait for upstream support.