Skip to content

XWayland reports 0mm×0mm physical dimensions, hardcoded 96 DPI breaks physical accuracy #1402

@jw0785

Description

@jw0785

Windows build number:

26200.7462

Your Distribution version:

12

Your WSL versions:

WSL version: 2.6.1.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.66
MSRDC version: 1.2.6353
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26200.7462

Steps to reproduce:

$ xrandr
Screen 0: minimum 16 x 16, current 2880 x 1920, maximum 32767 x 32767
XWAYLAND0 connected 2880x1920+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   2880x1920     59.96*+

$ xdpyinfo | grep -E "dimensions|resolution"  
  dimensions:    2880x1920 pixels (762x508 millimeters)
  resolution:    96x96 dots per inch

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

  1. no scaling should be conducted on the host end. which means in windows ~/.wslgconfig, no scaling happen with or without setting workaround like
[system-distro-env]
XCURSOR_SIZE=48
WAYLAND_CURSOR_SIZE=48
WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=100
  1. windows should report the actual dpi and resolution to wsl, no value should be hardcoded.
  2. if there's any config microsoft wish to set as default, that should happen inside wsl, not in windows, not hardcoded in the binary.

Actual behavior:

  1. Physical dimensions reported as 0mm × 0mm by xrandr
  2. xdpyinfo reports fake dimensions 762x508 mm ignoring actual display size which is merely 13"
  3. xrandr --dpi 267 is ignored, 96 dpi gets hardcoded
  4. `Xft.dpi: 267 are also ignored
  5. break everything need physical dimension and with no way to fix it by the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions