Bug 404333

Summary: GDK_SCALE has no effect in plasma wayland session
Product: [Plasma] plasmashell Reporter: Ardith Metz <itgvkxsd>
Component: generic-waylandAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CLOSED NOT A BUG    
Severity: normal CC: kde
Priority: NOR Keywords: wayland-only
Version First Reported In: master   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ardith Metz 2019-02-14 10:56:30 UTC
SUMMARY
Setting GDK_SCALE env variable has no effect in plasma-wayland session. It woks correctly in x11 session. GDK_DPI_SCALE works in both (but it significantly lowers font quality so it's not a workaround).

STEPS TO REPRODUCE
1. Log into plasma-wayland session
2. Install kde-gtk-config package
3. Run "GDK_SCALE=2 gtk3-demo" (notice it's not scaled)
5. Log into plasma-x11 session
6. Install kde-gtk-config package
7. Run "GDK_SCALE=2 gtk3-demo" (notice it's scaled properly)

OBSERVED RESULT

GDK_SCALE has no effect for gt3 apps in plasma-wayland session

EXPECTED RESULT

GDK_SCALE has effect for gt3 apps in plasma-wayland session

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
KDE Plasma: 5.15.0
KDE Frameworks: 5.55.0
Qt: 5.12.1
Kate/Kwrite 18.12.2
Distro: Archlinux

ADDITIONAL INFORMATION
Comment 1 David Edmundson 2019-02-14 12:55:18 UTC
GDK will use the wl_output scale.
Comment 2 Ardith Metz 2019-02-14 13:45:35 UTC
@David Edmundson

That means it won't work at all if display scaling in Plasma isn't enabled (set to 1) and due to lack of fractional scaling, display scaling is not usable on most setups. (on my system setting it to 2 makes elements so big that I even have hard time to undo that setting).

When using both GDK_SCALE (for upscaling) and GDK_DPI_SCALE (for downscaling) you can achieve fractional scaling effect which is otherwise unreachable.

If GDK_SCALE is set in environment then it's value should be used similarly as in x11 session otherwise it's a regression.
Comment 3 David Edmundson 2019-02-14 13:56:12 UTC
I don't really agree, but if it was to be followed you need GTK to change. Plasma isn't involved in anything inside the GTK app