Bug 407501 - QT_AUTO_SCREEN_SCALE_FACTOR is not set properly
Summary: QT_AUTO_SCREEN_SCALE_FACTOR is not set properly
Status: RESOLVED INTENTIONAL
Alias: None
Product: KScreen
Classification: Plasma
Component: common (other bugs)
Version First Reported In: 5.15.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-13 15:54 UTC by Max
Modified: 2022-11-08 21:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max 2019-05-13 15:54:21 UTC
SUMMARY

The QT_AUTO_SCREEN_SCALE_FACTOR environment variable is not set to 1 upon KDE startup. The issue seems to be specific to this particular env. variable: others from ~/.config/environment.d/*.conf are set as expected.

STEPS TO REPRODUCE
1. Set QT_AUTO_SCREEN_SCALE_FACTOR=1 via ~/.config/environment.d/11-kde.conf
2. Logn to KDE
3. env | grep QT_AUTO_SCREEN_SCALE_FACTOR

OBSERVED RESULT

QT_AUTO_SCREEN_SCALE_FACTOR=0

EXPECTED RESULT

QT_AUTO_SCREEN_SCALE_FACTOR=1

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: ubuntu 19.04 / 5.15.4
(available in About System)
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION

There seems to be nothing related to this variable in logs or configuration. This variable is absolutely essential for working HiDPI setup in multi-monitor configuration.

The workaround is to set it via ~/.config/plasma-workspace/env/qt-fix.sh but that's ugly - the real fix would be to find out what exactly breaks setting this variable.
Comment 1 postix 2020-03-08 11:58:18 UTC
QT_AUTO_SCREEN_SCALE_FACTOR is deprecated since 5.14

> Added the QT_ENABLE_HIGHDPI_SCALING environment variable 
> which enables high-dpi scaling based on display DPI. 
> Replaces QT_AUTO_SCREEN_SCALE_FACTOR (now deprecated),
> and corresponds to the Qt::AA_EnableHighDpiScaling application attribute.

source: https://wiki.qt.io/New_Features_in_Qt_5.14
Comment 2 Nate Graham 2022-11-08 21:05:15 UTC
Yep, we don't use QT_AUTO_SCREEN_SCALE_FACTOR.