How to fix screen-resolution detection?

Alan Stern stern at rowland.harvard.edu
Sat Jan 8 19:57:18 UTC 2022


The screen resolution on my laptop is not reported accurately.  Here's 
an extract from the output of xdpyinfo (under Xwayland):

screen #0:
  dimensions:    3200x1800 pixels (847x476 millimeters)
  resolution:    96x96 dots per inch

The number of pixels is correct, but the size and resolution values 
smack of a bogus default.  The actual width of the screen (determined 
with a tape measure) is about 11.5 inches (or 291 mm), which yields a 
resolution of 280 dots per inch (11 dots per mm), approximately.  
Most definitely _not_ 96 dpi.

Presumably X gets the size/resolution information from Wayland, which 
gets it from the firmware.  Here is the output from "edid-decode -s 
/sys/class/drm/card0-eDP-1/edid" on the laptop:

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: SDC
    Model: 22602
    Made in: 2015
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 8
    DisplayPort interface
    Maximum image size: 29 cm x 17 cm
    Gamma: 2.20
    DPMS levels: Standby Suspend Off
    Supported color formats: RGB 4:4:4, YCrCb 4:4:4
    First detailed timing includes the native pixel format and preferred refresh rate
  Color Characteristics:
    Red  : 0.6396, 0.3300
    Green: 0.2998, 0.5996
    Blue : 0.1503, 0.0595
    White: 0.3134, 0.3291
  Established Timings I & II: none
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  3200x1800   60.000 Hz  16:9   108.960 kHz  361.310 MHz (293 mm x 165 mm)
                 Hfront   48 Hsync  32 Hback  36 Hpol N
                 Vfront    2 Vsync   5 Vback   9 Vpol N
    Manufacturer-Specified Display Descriptor (0x0f): 00 0f 00 00 00 00 00 00 00 00 00 37 82 05 46 00 '...........7..F.'
    Alphanumeric Data String: 'SAMSUNG'
    Alphanumeric Data String: '133YL02-C02'
Checksum: 0x41

The "29 cm x 17 cm" and "293 mm x 165 mm" values are about right (close 
enough, anyway).

It looks like something is going wrong, either in Wayland or the X 
server.  I'd like to pin it down and get it fixed, so I'm starting by
checking Wayland.

Now, I know essentially nothing about Wayland.  All I can say for sure 
is that the /usr/lib64/libwayland-server file on the laptop is from 
version 1.19.0 (as distributed in Fedora 34).

Can someone please tell me what to look for or what tests to run?

Thank you,

Alan Stern


More information about the wayland-devel mailing list