GNOME Bugzilla – Bug 790537
Reported DPI for X clients reverts to real physical DPI after logged in for a while, which breaks Qt app font sizes when a custom text scaling factor is set
Last modified: 2021-07-05 13:50:21 UTC
After being logged in for a while under GNOME 3.26 Wayland, newly-launched Qt5 applications start with tiny fonts. My display is 1920x1080, and reports a diagonal of 72" (presumably via EDID), for a DPI of ~30 (it's actually 55", but that doesn't come into play since it's not reported as such). When the tiny fonts problem manifests, the DPI reported by xdpyinfo is 30: $ xdpyinfo | grep dots resolution: 30x30 dots per inch Initially when logged in, it instead reports the standard X "fake DPI" of 96. The tiny fonts only happen when /org/gnome/desktop/interface/text-scaling-factor is non-default - resetting it to 1.0 and re-launching a given Qt5 application gives normal font sizes (well, relative to the enormous 1.0 text-scaling-factor ;)) Setting QT_FONT_DPI=96 also works around the issue. I'm assuming Mutter is responsible for the DPI reported to X clients under GNOME Wayland, so presumably this reversion to reporting the real DPI is Mutter's fault? This originally surfaced around the time of Fedora 24, so GNOME 3.20? but seemed to go away in 3.22 or 3.24, but has reappeared in 3.26 - see https://bugzilla.redhat.com/show_bug.cgi?id=1380470
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.