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

            Bug ID: 494206
           Summary: xdpyinfo reports wrong default DPI value 96dpi instead
                    of the true resolution in Wayland session
    Classification: Plasma
           Product: kwin
           Version: 6.1.5
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kwin-bugs-n...@kde.org
          Reporter: matthias.na...@mhnnet.de
  Target Milestone: ---

SUMMARY

With Plasma/KWin 6.1.5 the command `xdypinfo | egrep resolution` always returns
the default value of 96dpi instead of the true, physical pixel density of the
screen. This always happens independent of any set global scaling factor or
whether the environment variable `QT_USE_PHYSICAL_DPI=1` is set or not.

I also notice that non-native KDE apps are unable to correctly scale their
"workbench" such that 100% scaling matches the true physical size of the
objects (e.g. GIMP, FreeCAD, etc.) I am not sure whether this is observation is
related to the problem or independent of it.

OBSERVED RESULT

I have a 311mm × 175mm laptop panel (14" diagonal) with 2560 × 1440 pixels,
i.e. a resolution of 209dpi. The EDID reports 310mm × 174mm and 210dpi, but
that's fine.

I ran three different tests:

a) KWin scaling factor 100%,  `QT_USE_PHYSICAL_DPI=1` not set
b) KWin scaling factor 215%,  `QT_USE_PHYSICAL_DPI=1` not set (because 
209dpi÷96dpi = 2,177 ≅ 215%)
c) KWin scaling factor 100%,  `QT_USE_PHYSICAL_DPI=1` set

Result for test a):

$ wayland-info
xdg_output_v1
    name: 'eDP-1'
    description: 'LG Display eDP-1-0x0419'
    logical_x: 0, logical_y: 0
    logical_width: 2560, logical_height: 1440
interface: 'wl_output'
    name: eDP-1
    description: LG Display eDP-1-0x0419
    x: 0, y: 0, scale: 2,
    physical_width: 310 mm, physical_height: 174 mm,
    make: 'LG Display', model: 'eDP-1-0x0419',
    mode:
        width: 2560 px, height: 1440 px, refresh: 60.004 Hz

$ kscreen-doctor -o
Output: 1 eDP-1
        Modes:  0:2560x1440@60*!  1:1600x1200@60  2:1280x1024@60  3:1024x768@60
 4:1920x1200@60  5:1280x800@60  6:2560x1440@60  7:1920x1080@60  8:1600x900@60 
9:1368x768@60  10:1280x720@60 
        Geometry: 0,0 2560x1440
        Scale: 1.0

$ xdpyinfo
dimensions:    2560x1440 pixels (677x381 millimeters)
resolution:    96x96 dots per inch

Result for test b):

$ wayland-info
xdg_output_v1
    name: 'eDP-1'
    description: 'LG Display eDP-1-0x0419'
    logical_x: 0, logical_y: 0
    logical_width: 1190, logical_height: 670
interface: 'wl_output'
    name: eDP-1
    description: LG Display eDP-1-0x0419
    x: 0, y: 0, scale: 2,
    physical_width: 310 mm, physical_height: 174 mm,
    make: 'LG Display', model: 'eDP-1-0x0419',
    mode:
        width: 2560 px, height: 1440 px, refresh: 60.004 Hz

$ kscreen-doctor -o
Output: 1 eDP-1
        Modes:  0:2560x1440@60*!  1:1600x1200@60  2:1280x1024@60  3:1024x768@60
 4:1920x1200@60  5:1280x800@60  6:2560x1440@60  7:1920x1080@60  8:1600x900@60 
9:1368x768@60  10:1280x720@60 
        Geometry: 0,0 1190x670
        Scale: 2.15

$ xdpyinfo
dimensions:    2560x1440 pixels (677x381 millimeters)
resolution:    96x96 dots per inch

Result for test c):

$ wayland-info
xdg_output_v1
    name: 'eDP-1'
    description: 'LG Display eDP-1-0x0419'
    logical_x: 0, logical_y: 0
    logical_width: 1190, logical_height: 670
interface: 'wl_output'
    name: eDP-1
    description: LG Display eDP-1-0x0419
    x: 0, y: 0, scale: 2,
    physical_width: 310 mm, physical_height: 174 mm,
    make: 'LG Display', model: 'eDP-1-0x0419',
    mode:
        width: 2560 px, height: 1440 px, refresh: 60.004 Hz

$ kscreen-doctor -o
Output: 1 eDP-1
        Modes:  0:2560x1440@60*!  1:1600x1200@60  2:1280x1024@60  3:1024x768@60
 4:1920x1200@60  5:1280x800@60  6:2560x1440@60  7:1920x1080@60  8:1600x900@60 
9:1368x768@60  10:1280x720@60 
        Geometry: 0,0 1190x670
        Scale: 1.0

$ xdpyinfo
dimensions:    2560x1440 pixels (677x381 millimeters)
resolution:    96x96 dots per inch

SUMMARY OF OBSERVED RESULT

xdpyinfo always reports the wrong physical size and wrong pixel density.

EXPECTED RESULT

xdpyinfo should report the correct values.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux 2.15
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

IMHO on a large picture KWin should provide two options: a) to set the physical
DPI value and b) a GUI scaling factor. The current situation is a regression
compared to KDE 5 and X11/X.Org. The physical DPI value and the GUI scaling
factor serve two different purposes. I wrote a long (sorry) post on that here:
https://discuss.kde.org/t/return-dpi-resolution-adjustments-in-font-settings-support/11860/29.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to