Bug 19641

Summary: plasma5 show tiny icons in high dpi screens
Product: Mageia Reporter: Giuseppe Ghibò <ghibomgx>
Component: RPM PackagesAssignee: KDE maintainers <kde>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Normal CC: mageia, marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: plasma-workspace-5.8.2-1.mga6.src.rpm CVE:
Status comment:
Attachments: screenshot of plasma system settings without the QT_AUTO_SCREEN_SCALE_FACTOR=0
screenshot of plasma system settings with the QT_AUTO_SCREEN_SCALE_FACTOR=0
Patch to avoid forcing QT_AUTO_SCREEN_SCALE_FACTOR=0 in startkde
external setting of QT_AUTO_SCREEN_SCALE_FACTOR=0
patch for the SPEC file

Description Giuseppe Ghibò 2016-10-23 16:08:46 CEST
Description of problem:

When plasma5 runs in a high dpi screen/monitor, and the dpi is set at the right values (e.g. either using DisplaySize or forcing the -dpi in other places, such as ServerFlags of sddm or xrandr), for instance for a 4K monitor, i.e. at resolution of 3840x2160, the icons aren't scaled proportionally but remains super-tiny, and thus almost unreadable. The higher is the resolution, the smaller are the icons.

The result is shown in the two screenshots in attach (they are scaled for convenience), as you can see the icons of the Plasma's "System Settings" are almost unreadable, while instead the text scales proportionally.

To reproduce, try to force the dpi to the right size, and increase the resolution.

Apparently Plasma5 supports high dpi screens, but actually, while it scales proportionally the text, it doesn't proportionally scale all the icons, and the widgets (e.g. scrollbars, etc.). The problems seems in the line:

QT_AUTO_SCREEN_SCALE_FACTOR=0

of the script /usr/bin/startkde, which forces QT_AUTO_SCREEN_SCALE_FACTOR to 0, and thus "disables the automatic scaling based on the pixel density of the monitor for QT applications". IMHO such value shouldn't be forced, but left to some other floating configuration (which might decide or not to force QT_AUTO_SCREEN_SCALE_FACTOR=1). Just commenting that line would fix the problem.

I attach also the patch.
Comment 1 Giuseppe Ghibò 2016-10-23 16:09:58 CEST
Created attachment 8586 [details]
screenshot of plasma system settings without the QT_AUTO_SCREEN_SCALE_FACTOR=0
Comment 2 Giuseppe Ghibò 2016-10-23 16:10:40 CEST
Created attachment 8587 [details]
screenshot of plasma system settings with the QT_AUTO_SCREEN_SCALE_FACTOR=0
Comment 3 Giuseppe Ghibò 2016-10-23 16:11:35 CEST
Created attachment 8588 [details]
Patch to avoid forcing QT_AUTO_SCREEN_SCALE_FACTOR=0 in startkde
Comment 4 Nicolas Lécureuil 2016-10-23 16:30:47 CEST
can you provide the real patch ? not the one against the spec file ;)

CC: (none) => mageia

Comment 5 Giuseppe Ghibò 2016-10-23 16:34:39 CEST
Yep, sorry, but indeed both are included in the same .diff file. The diff is for both SPEC and SOURCES to provide the new patch. It's just a one line patch and is in the bottom of the .diff file. Let me know if you can extract, otherwise I'll reupload.
Marja Van Waes 2016-10-23 21:10:16 CEST

CC: (none) => marja11
Assignee: bugsquad => kde

Comment 6 Giuseppe Ghibò 2016-11-05 21:02:57 CET
Created attachment 8625 [details]
external setting of QT_AUTO_SCREEN_SCALE_FACTOR=0

Here is a better patch: the setting of QT_AUTO_SCREEN_SCALE_FACTOR has been moved externally to the startkde script, in this way it can be configurable. The default value is left unchanged.
Comment 7 Giuseppe Ghibò 2016-11-05 21:04:37 CET
Created attachment 8626 [details]
patch for the SPEC file

Here is the patch of the spec file with the config file in /etc/sysconfig/plasmaqtsettings.

Attachment 8588 is obsolete: 0 => 1

Comment 8 Nicolas Lécureuil 2016-11-06 11:33:30 CET
if this is a config file this is not the good place, this need to go to the plasma config rpm and in ( http://gitweb.mageia.org/software/desktop/plasma5/config/ )
Comment 9 Giuseppe Ghibò 2016-11-06 16:22:18 CET
Great. I'll add the entry for that in /etc/xdg/plasma-workspace/env/qtplasmasettings.sh
Comment 10 Giuseppe Ghibò 2016-11-11 15:53:02 CET
Closing.

Status: NEW => RESOLVED
Resolution: (none) => WONTFIX

Comment 11 Samuel Verschelde 2016-11-11 23:45:55 CET
(In reply to Giuseppe Ghibò from comment #10)
> Closing.

When closing, please say why.
Comment 12 Giuseppe Ghibò 2016-11-11 23:58:51 CET
Ok, closing because there is no need to patch startkde anymore. Adding a simple config file

 /etc/xdg/plasma-workspace/env/qtplasmasettings.sh

containing just the line:

export QT_AUTO_SCREEN_SCALE_FACTOR=1

or

unset QT_AUTO_SCREEN_SCALE_FACTOR

would achieve the same effect as patching startkde not setting it, because it would override the QT_AUTO_SCREEN_SCALE_FACTOR=0 in startkde, thus Plasma applications in HiDPI (if dpi is correctly set) will scale correctly.