[kde] [Bug 461106] New: Feature Request: Don't override Xft.dpi when XWayland applications are configured to scale by themselves and forceFontDPIWayland is not set

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Fri Oct 28 11:06:32 BST 2022


https://bugs.kde.org/show_bug.cgi?id=461106

            Bug ID: 461106
           Summary: Feature Request: Don't override Xft.dpi when XWayland
                    applications are configured to scale by themselves and
                    forceFontDPIWayland is not set
    Classification: I don't know
           Product: kde
           Version: unspecified
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: einbert-xeride at outlook.com
  Target Milestone: ---

SUMMARY

plasma-workspace will override Xft.dpi settings for XWayland applications
according to the DPI setting. The DPI setting is picked from kcmfonts
"forceFontDPIWayland" entry in Wayland sessions, and defaults to 96 when it's
not set. When Xft.dpi is 96 and "Apply scaling themselves", XWayland
applications (in my case, Jetbrains IDEs and Discord) may scale at 1x instead
of manually specified scaling factor indicated by Xft.dpi in ~/.Xresources (in
my case, 192, which is 2x scaling). Manually setting Xft.dpi to 192 would make
these applications use 2x scaling, but that will not survive a reboot.

Switching to "Scaled by the system" is not an option because that would be too
blurry under 2x scaling.

Editing VM options for Jetbrains IDEs / Manually setting command line flags for
Discord would be an option, but that is too specific. I want a generic solution
that works for all UI toolkits that don't support Wayland, but honor Xft.dpi
and perform scaling accordingly.

Code comment (plasma-workspace,b2b507070,kcms/krdb/krdb.cpp:409) indicates that
setting Xft.dpi to 96 due to "we have wayland scaling on top", which is not
true when XWayland applications are configured to scale by themselves. So I
guess it would be better if we keep Xft.dpi as-is in Wayland session when
XWayland applications scale by themselves, or at least update the code comment
indicating that 96 dpi is enfoced regardless of the XWayland scaling option.

STEPS TO REPRODUCE
1. Start a plasma wayland session.
2. Setting `Display Configutation - Scale` to 200%, `Display Configuration -
Legacy Applications (X11)` to `Apply scaling themselves`. Uncheck `Fonts -
Force font DPI`.
3. Start any Jetbrains IDE, or Discord.

OBSERVED RESULT

4. Noticing that they are not scaled.

EXPECTED RESULT

5. xrdb -merge a file containing "Xft.dpi: 192".
6. Restart any Jetbrains IDE or Discord.
7. Noticing that they're scaling at 2x.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: Arch Linux (last sync at 2022-10-28T13:05:16+0800), KDE
Plasma 5.26.2
(available in About System)
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Jetbrains IDE used in the test is Intellij IDEA Ultimate 2022.2.3, downloaded
from Jetbrains Toolbox.
Discord used in the test is 0.0.21, packed by Arch Linux contributors.
Only one monitor is attached: DELL U2720Q. No built-in display.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list