This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Laptop with HiDPI (3840x2160) and LowDPI external monitor

Tags: None
(comma "," separated)
vootey
Registered Member
Posts
54
Karma
0
OS
corax,

did you try setting
Code: Select all
export QT_AUTO_SCREEN_SCALE_FACTOR=1

(while not touching all the other qt variables)
?
corax
Registered Member
Posts
28
Karma
0
OS
vootey wrote:corax,

did you try setting
Code: Select all
export QT_AUTO_SCREEN_SCALE_FACTOR=1

(while not touching all the other qt variables)
?

Hi, no I haven't yet. I've just been watching Qt video https://www.youtube.com/watch?v=2XPpp4yD_M4

Will try this tonight.
vootey
Registered Member
Posts
54
Karma
0
OS
Hm, I just upgraded to qt 5.6 (with Plasma 5.6) and tried this option, since the usual method (scaling via kscreen-option) produces weird results.

It seems, the applications are scaled fine, but my plasma desktop is only partially scaled (mixtures of different font sizes) and it seems confused about positioning plasma-components, etc. So this is pretty unusable now. Curiously, there is a "fixed" bug (https://bugs.kde.org/show_bug.cgi?id=357896) about this issue.

Let me know about the result on your end.
corax
Registered Member
Posts
28
Karma
0
OS
vootey wrote:Hm, I just upgraded to qt 5.6 (with Plasma 5.6) and tried this option, since the usual method (scaling via kscreen-option) produces weird results.

It seems, the applications are scaled fine, but my plasma desktop is only partially scaled (mixtures of different font sizes) and it seems confused about positioning plasma-components, etc. So this is pretty unusable now. Curiously, there is a "fixed" bug (https://bugs.kde.org/show_bug.cgi?id=357896) about this issue.

Let me know about the result on your end.


I'm curious to see what happens on my machine. It is unstable as it is (occasional screen tearing and subsequent crashing). Wonder what will happen when I start playing with Qt variables.
vootey
Registered Member
Posts
54
Karma
0
OS
Just for the record:
My problem with the unusable plasma desktop while setting QT_AUTO_SCREEN_SCALE_FACTOR=1 was resolved by recompiling plasma-workspace and kwin. As is pointed out in the bug reported I linked before, the setting is only disabled in plasma and kwin when qt 5.6 is already there at compile time (the enabled setting causes the confusing plasma session).
The result is a usable desktop on a hidpi screen with qt 5.6 and plasma 5.6.
corax
Registered Member
Posts
28
Karma
0
OS
vootey wrote:Just for the record:
My problem with the unusable plasma desktop while setting QT_AUTO_SCREEN_SCALE_FACTOR=1 was resolved by recompiling plasma-workspace and kwin. As is pointed out in the bug reported I linked before, the setting is only disabled in plasma and kwin when qt 5.6 is already there at compile time (the enabled setting causes the confusing plasma session).
The result is a usable desktop on a hidpi screen with qt 5.6 and plasma 5.6.


I have't had a chance to test it yet. I can't boot from my USB with OpenSuse 42.1 and Qt5.6. I have Tumbleweed on my SSD, but it does not have Qt5.6. Furthermore - Opensuse 42.1 installer on my XPS 9550 crashes early on (doesn't even reach GUI stage), so I'm stuck.

Good to hear that it worked for you. However, recompiling the whole thing doesn't sound so appealing.
corax
Registered Member
Posts
28
Karma
0
OS
vootey wrote:Just for the record:
My problem with the unusable plasma desktop while setting QT_AUTO_SCREEN_SCALE_FACTOR=1 was resolved by recompiling plasma-workspace and kwin. As is pointed out in the bug reported I linked before, the setting is only disabled in plasma and kwin when qt 5.6 is already there at compile time (the enabled setting causes the confusing plasma session).
The result is a usable desktop on a hidpi screen with qt 5.6 and plasma 5.6.


So I finaly got OpenSuse Leap installed and upgrade to QT 5.6.

OK,
export QT_AUTO_SCREEN_SCALE_FACTOR=1
does nothing for me at all. I have't used my system extensively, but I havent suffered any error or crashes after setting the
Code: Select all
QT_AUTO_SCREEN_SCALE_FACTOR=1
. No screen tearing either. I'm using Intel integrated graphics only and have nouveau blacklisted. Obviously, I have no scaling either.

I can start an application with
Code: Select all
QT_SCALE_FACTOR={n} Application
and it scales the application (text, buttons, icons), but does not scale the window border (title area, minimise and close buttons). However, If I drag such an application to another screen (low DPI), the application is not scaled down. So, From the final result as an end user I get basically the same desktop as setting screen scaling through Plasma settings.

If you don't mind, I'de love to have a more detailed description of what you have tried and what/how exactly you have compiled to get usable + auto scalable desktop.
vootey
Registered Member
Posts
54
Karma
0
OS
I used the information provided on this blog: https://blog.qt.io/blog/2016/01/26/high ... in-qt-5-6/

Where did you place the export-command? If you just evaluate the command in some terminal after login it probably won't have an effect, as only the "terminal-environment" is populated with the new value for the variable, not your whole X-session. (This is my non-expert understanding of it, so the explanation might be wrong.)
If you want some variable to be not only temporarily populated but for every X-session, you can place the command
Code: Select all
export QT_AUTO_SCREEN_SCALE_FACTOR=1
in a file in /etc/profile.d/, e.g. /etc/profile.d/qt-hidpi.sh (see the HiDPI ArchWiki). (That is what I did.)

You can temporarily test the effect on one application with
Code: Select all
QT_AUTO_SCREEN_SCALE_FACTOR=1 someapp
as you did with the QT_SCALE_FACTOR variable. I suggest to try this with some Qt5-app (more specifically, an app using >= qt-5.6; this doesn't work for Qt4-apps).

It is expected that QT_SCALE_FACTOR does not automatically adjust for your monitors, since it's designed this way (see the above mentioned blog).
As for your issues regarding QT_SCALE_FACTOR: I'm not sure it's supposed to scale the window border at all, this should be the job of kwin. As a matter of fact, I never cared about the size of the borders, because they seemed right-sized to me from the start. Can you check whether your X-server gets your monitor's native resolution right?
Code: Select all
cat /var/log/Xorg.0.log | grep -i dpi
should give some information in this regard. Also double check, if you accidentally forced any dpi-settings in kde (in systemsettings - fonts).

I think the compiling-stuff only mattered to me, because I use gentoo (i.e. you always compile the stuff for yourself). For a binary distribution, your packagers should take care of this stuff (otherwise it's a bug).

Hope this helps a bit.
corax
Registered Member
Posts
28
Karma
0
OS
Txhank you for the tips.

I've created /etc/profile.d/qt-hidpi.sh and indeed got autoscaling "enabled".

Unfortunately, it is very odd. My HiDPI screen looks more or less normal (there are some oddities like buttons too large, but is usable). However, If I move an application window from HiDPI screen to LowDPI screen, text on LowDPI screen is tiny.

I guess this is because (if I interpret it correctly) because my system "think" that my HiDPI screen is 96x96dpi

Code: Select all
cat /var/log/Xorg.0.log | grep -i dpi
        /usr/share/fonts/100dpi:unscaled,
        /usr/share/fonts/75dpi:unscaled,
[     5.388] (==) intel(0): DPI set to (96, 96)


In summary, hiDPI and lowDPI doesn't mix in my set-up (yet, hopefully).
corax
Registered Member
Posts
28
Karma
0
OS
vootey wrote:I used the information provided on this blog: https://blog.qt.io/blog/2016/01/26/high ... in-qt-5-6/

Where did you place the export-command? If you just evaluate the command in some terminal after login it probably won't have an effect, as only the "terminal-environment" is populated with the new value for the variable, not your whole X-session. (This is my non-expert understanding of it, so the explanation might be wrong.)
If you want some variable to be not only temporarily populated but for every X-session, you can place the command
Code: Select all
export QT_AUTO_SCREEN_SCALE_FACTOR=1
in a file in /etc/profile.d/, e.g. /etc/profile.d/qt-hidpi.sh (see the HiDPI ArchWiki). (That is what I did.)

You can temporarily test the effect on one application with
Code: Select all
QT_AUTO_SCREEN_SCALE_FACTOR=1 someapp
as you did with the QT_SCALE_FACTOR variable. I suggest to try this with some Qt5-app (more specifically, an app using >= qt-5.6; this doesn't work for Qt4-apps).

It is expected that QT_SCALE_FACTOR does not automatically adjust for your monitors, since it's designed this way (see the above mentioned blog).
As for your issues regarding QT_SCALE_FACTOR: I'm not sure it's supposed to scale the window border at all, this should be the job of kwin. As a matter of fact, I never cared about the size of the borders, because they seemed right-sized to me from the start. Can you check whether your X-server gets your monitor's native resolution right?
Code: Select all
cat /var/log/Xorg.0.log | grep -i dpi
should give some information in this regard. Also double check, if you accidentally forced any dpi-settings in kde (in systemsettings - fonts).

I think the compiling-stuff only mattered to me, because I use gentoo (i.e. you always compile the stuff for yourself). For a binary distribution, your packagers should take care of this stuff (otherwise it's a bug).

Hope this helps a bit.


So, I've been playing about with QT5.6 autoscaling, but I can't get it right. I'm curious, does scaling work fine for you? I.e. is all elements scaled properly and in proportion? In my case for example, when using
Code: Select all
export QT_AUTO_SCREEN_SCALE_FACTOR=1
icons and scroll bars are huge, but text is small, not in proportion.
corax
Registered Member
Posts
28
Karma
0
OS
Is there any progress in this area? Can we mix HiDPI and LowDPI now?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]