Bug 407501

Summary: QT_AUTO_SCREEN_SCALE_FACTOR is not set properly
Product: [Plasma] KScreen Reporter: Max <suraev>
Component: commonAssignee: Sebastian Kügler <sebas>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: nate, postix
Priority: NOR    
Version First Reported In: 5.15.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.