[Bug 1123424] New: YaST icons and fonts switch to half size when Tweaking font scale from 1,25 to 1,26 (HiDPI)
http://bugzilla.suse.com/show_bug.cgi?id=1123424 Bug ID: 1123424 Summary: YaST icons and fonts switch to half size when Tweaking font scale from 1,25 to 1,26 (HiDPI) Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.1 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 Assignee: yast2-maintainers@suse.de Reporter: terje@nordland-teknikk.no QA Contact: jsrain@suse.com Found By: --- Blocker: --- Created attachment 795465 --> http://bugzilla.suse.com/attachment.cgi?id=795465&action=edit YaST2 controlcenter with Gnome font scale 1,25 and 1,26 As also for previous Leap 15.0, the YaST2 controlcenter opens with half size icons and fonts after Tweaking the font scale from 1,25 to 1,26 on Gnome. This is on a XPS 13 with HiDPI display, On the attached screenshot the windows to the upper left is YaST2 controlcenter opened with the standard font scale 1,25, the window to the upper right show YaST2 controlcenter opened after extending the font scale one step to 1,26. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c1
--- Comment #1 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c2
Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c3
--- Comment #3 from Terje J. Hanssen
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c4
Stasiek Michalski
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c5
Stefan Schubert
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c6
--- Comment #6 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c7
--- Comment #7 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c8
--- Comment #8 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c9
--- Comment #9 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c10
--- Comment #10 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c11
--- Comment #11 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c12
Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c13
--- Comment #13 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c14
--- Comment #14 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c15
--- Comment #15 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c16
--- Comment #16 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c17
--- Comment #17 from Fabian Vogt
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c18
Fabian Vogt
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c19
--- Comment #19 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c20
--- Comment #20 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c21
Fabian Vogt
tux@g1:~> xrdb -query | grep Xft Xft.dpi: 120.9599609375
This seems to be the culprit to me. Does it work after running "echo Xft.dpi: 120 | xrdb -nocpp -merge"? If that's not enough, does "QT_LOGGING_RULES=qt.qpa.screen.debug=true QT_FONT_DPI=120 qdirstat" work?
Xft.antialias: 1 Xft.hinting: 1 Xft.hintstyle: hintslight Xft.rgba: none
tux@g1:~> QT_LOGGING_RULES=qt.qpa.screen.debug=true qdirstat . Logging to /tmp/qdirstat-tux/qdirstat.log
tux@g1:~> fgrep '<Verbose>' /tmp/qdirstat-tux/qdirstat.log 2019-03-04 17:36:58.204 [2558] <Verbose> Failed to parse EDID data for output "XWAYLAND0" edid data: ""
2019-03-04 17:36:58.208 [2558] <Verbose> adding QXcbScreen(0x5596f81fc8b0, name="XWAYLAND0", geometry=1680x1050+0+0, availableGeometry=1680x1016+0+34, devicePixelRatio=1.0, logicalDpi=QPair(inf,inf), physicalSize=0.0x0.0mm, ^^^^^^^
That doesn't look right either, but it might be unrelated. It's caused by the invalid physicalSize value, so the safeguards there didn't work for some reason. I'll have a look at that tomorrow. What does xrandr show as geometry?
screenNumber=0, virtualSize=1680x1050 (1680.0x1050.0mm), orientation=Qt::LandscapeOrientation, depth=24, refreshRate=59.0, root=38c, windowManagerName="GNOME Shell") (Primary: true )
2019-03-04 17:36:58.208 [2558] <Verbose> primary output is "XWAYLAND0"
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c22
Fabian Vogt
Not sure if this is expected, but I still find it weird:
When I use "ssh -X" to that machine to try to start qdirstat via remote X, it still appears on that Wayland display (i.e. in the VM, not on the remote X server),
Do you ssh -X from inside the VM or from the outside?
and it looks just fine (with unscaled fonts, but otherwise perfectly normal). It complains on that ssh command line:
libGL error: failed to load driver: swrast
So it might simply ignore the desktop settings now.
Desktop settings should not have any effect on scaling at all - unless some third-party plugin uses the private API. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
Yifan Jiang
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c23
Stefan Hundhammer
(In reply to Stefan Hundhammer from comment #19)
tux@g1:~> xrdb -query | grep Xft Xft.dpi: 120.9599609375
This seems to be the culprit to me. Does it work after running "echo Xft.dpi: 120 | xrdb -nocpp -merge"?
Right; that fixes the problem indeed, both for QDirStat and for the YaST Qt control center.
If that's not enough, does "QT_LOGGING_RULES=qt.qpa.screen.debug=true QT_FONT_DPI=120 qdirstat" work?
I tried this first (to leave the X resources undisturbed before changing them for the running X server with the "xrdb" command) and I can confirm that this also works. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c24
Fabian Vogt
(In reply to Fabian Vogt from comment #21)
(In reply to Stefan Hundhammer from comment #19)
tux@g1:~> xrdb -query | grep Xft Xft.dpi: 120.9599609375
This seems to be the culprit to me. Does it work after running "echo Xft.dpi: 120 | xrdb -nocpp -merge"?
Right; that fixes the problem indeed, both for QDirStat and for the YaST Qt control center.
Ok, that confirms that the root cause is GNOME not rounding Xft.dpi.
If that's not enough, does "QT_LOGGING_RULES=qt.qpa.screen.debug=true QT_FONT_DPI=120 qdirstat" work?
I tried this first (to leave the X resources undisturbed before changing them for the running X server with the "xrdb" command) and I can confirm that this also works.
Regarding the "QDpi(inf, inf)" issue - does that still appear if "Xft.dpi" is set to a valid integer? If so, can you give me access to the VM you saw it on? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c25
--- Comment #25 from Stefan Hundhammer
When I use "ssh -X" to that machine to try to start qdirstat via remote X, it still appears on that Wayland display (i.e. in the VM, not on the remote X server),
Do you ssh -X from inside the VM or from the outside?
I did that from the outside. I tried again, and the result was a bit surprising: [shundhammer @ morgul] ~ % ssh -X tux@g1 tux@g1:~> echo $DISPLAY localhost:10.0 tux@g1:~> qdirstat . Logging to /tmp/qdirstat-tux/qdirstat.log libGL error: failed to load driver: swrast -> QDirStat runs on the Wayland display (??) [shundhammer @ morgul] % ssh -X root@g1 g1:~ # echo $DISPLAY localhost:10.0 g1:~ # qdirstat . Logging to /tmp/qdirstat-root/qdirstat.log libGL error: failed to load driver: swrast -> QDirStat runs on the remote X server as expected (with unscaled fonts etc. and perfectly normal rendering)
Desktop settings should not have any effect on scaling at all - unless some third-party plugin uses the private API.
I don't know what exactly that GNOME "Tweak" application does, but it does affect Qt programs. After using it I find that "Xft.dpi" X resource in the X server changed; maybe that's all that it does. tux@g1:~> xrdb -query | grep Xft.dpi Xft.dpi: 120.9599609375 tux@g1:~> echo Xft.dpi: 120 | xrdb -nocpp -merge tux@g1:~> xrdb -query | grep Xft.dpi Xft.dpi: 120 tux@g1:~> gnome-tweaks (change the font scaling in that program's "Fonts" page) tux@g1:~> xrdb -query | grep Xft.dpi Xft.dpi: 120.9599609375 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c26
--- Comment #26 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c27
--- Comment #27 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c28
--- Comment #28 from Fabian Vogt
Wild shot into the blue: QVariant conversion gone wrong? Expecting and int and getting a double, so the toInt() conversion fails?
No, Qt simply expects that Xft.dpi is an integer, but it's not, so Xft.dpi is ignored and it uses whatever is the next source for the logical DPI (in this case the physical screen DPI). This needs to be fixed in GNOME. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c29
--- Comment #29 from Stefan Hundhammer
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c30
--- Comment #30 from Fabian Vogt
I completely agree that the GNOME people should fix that on their level.
But Qt could also do this a lot more defensively;
It could, but IMO it only makes sense if the majority of toolkits interpret it in the same way. I'm not aware of any valid use of non-integer Xft DPI values - it does not make much sense to me.
AFAICS it would be a really trivial patch to also check for a double if the int conversion fails:
https://github.com/qt/qtbase/blob/5.12/src/plugins/platforms/xcb/qxcbscreen. cpp#L323
static bool parseXftInt(const QByteArray& stringValue, int *value) { Q_ASSERT(value != 0); bool ok; *value = stringValue.toInt(&ok); return ok; }
Maybe something like (untested)
static bool parseXftInt(const QByteArray& stringValue, int *value) { Q_ASSERT(value != 0); bool ok; *value = stringValue.toInt(&ok); if (!ok) *value = round(stringValue.toDouble(&ok) return ok; }
(Even the rounding is already the de luxe version)
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c31
--- Comment #31 from Fabian Vogt
Regarding the "QDpi(inf, inf)" issue - does that still appear if "Xft.dpi" is set to a valid integer? If so, can you give me access to the VM you saw it on?
It does and it's indeed simply because the physicalSize is invalid. Normally the X server takes care of not supplying invalid values there, but apparently it does anyway. So that's either a bug in Xwayland or gnome. In this case playing it safe in Qt and using 96 dpi for guessing the physical size (same what X normally does) might make sense, but unless we see any bugs directly caused by that it shouldn't be necessary. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1123424
http://bugzilla.suse.com/show_bug.cgi?id=1123424#c32
--- Comment #32 from Stefan Hundhammer
https://bugzilla.suse.com/show_bug.cgi?id=1123424
https://bugzilla.suse.com/show_bug.cgi?id=1123424#c33
Stefan Hundhammer
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com