Bug 25615

Summary: xdpyinfo returns wrong screen size
Product: xorg Reporter: Elmar Stellnberger <estellnb>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: hramrach, mcepl, zaitcev
Version: 7.4 (2008.09)   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.1.log
none
/var/log/Xorg.0.log none

Description Elmar Stellnberger 2009-12-13 02:08:31 UTC
same as Bug 20409, just for radeon.:

> xdpyinfo | egrep "resolution|dimension"
  dimensions:    3840x1200 pixels (555x350 millimeters)
  resolution:    176x87 dots per inch
This is very nasty since programs like KWord which rely on xdpyinfo do not work
at all.

> xrandr -q|egrep "Screen| connected"
Screen 0: minimum 320 x 200, current 3840 x 1200, maximum 3840 x 1200
DVI-D_1 connected 1920x1200+1920+0 550mm x 344mm
PANEL connected 1920x1200+0+0 508mm x 317mm

> grep DisplaySize /etc/X11/xorg.conf
        DisplaySize  370 230
        DisplaySize  555 350
PANEL in deed: 370mm x 230mm

xdpyinfo should perhaps return the dpi value for the primary screen featuring
555x350mm:
3.4 x 3.4 dpmm =  87 x 87 dpi  (555 350)
5.1 x 5.2 dpmm = 132 x 133 dpi (370 230)

Consequently I would expect the following output:
> xdpyinfo | egrep "resolution"
  resolution:    87x87 dots per inch
and not:
  resolution:    176x87 dots per inch
Comment 1 Elmar Stellnberger 2009-12-13 02:10:46 UTC
 Please fix this as soon as possible because otherwise many programs like koffice & kword will not run in Xinerama mode.
Comment 2 Alex Deucher 2009-12-14 06:10:41 UTC
This is handled in the Xserver.  The driver just passes along the EDID.
Comment 3 Elmar Stellnberger 2009-12-15 03:59:37 UTC
Why does it work then with the radeonhd driver?
Comment 4 Elmar Stellnberger 2009-12-15 04:00:05 UTC
Created attachment 32080 [details]
Xorg.1.log
Comment 5 Elmar Stellnberger 2009-12-21 12:00:21 UTC
Created attachment 32225 [details]
/var/log/Xorg.0.log
Comment 6 Yang Zhao 2009-12-21 13:01:59 UTC
*** Bug 20409 has been marked as a duplicate of this bug. ***
Comment 7 Alan Coopersmith 2009-12-21 13:13:47 UTC
*** Bug 20409 has been marked as a duplicate of this bug. ***
Comment 8 Felipe Contreras 2011-05-25 04:28:10 UTC
(In reply to comment #3)
> Why does it work then with the radeonhd driver?

And Intel:
https://bugzilla.redhat.com/show_bug.cgi?id=540783#c17
Comment 9 Pete Zaitcev 2012-03-28 05:13:21 UTC
I have two Intel systems, they do the same thing:

#1 built-in LCD:
[    47.044] (II) intel(0): EDID Version: 1.3
[    47.044] (II) intel(0): Digital Display Input
[    47.044] (II) intel(0): Max Image Size [cm]: horiz.: 30  vert.: 19
[    47.044] (II) intel(0): Gamma: 2.20
......................
[    47.044] (II) intel(0): Supported detailed timing:
[    47.044] (II) intel(0): clock: 101.6 MHz   Image Size:  303 x 190 mm
......................
[    47.980] (II) GLX: Initialized DRI2 GL provider for screen 0
[    47.980] (II) intel(0): Setting screen physical size to 381 x 238

303x190 is correct size, 381x238 is wrong (but it is reported by dpyinfo).

#2 monitor at DP:
[    77.031] (II) intel(0): EDID Version: 1.4
[    77.031] (II) intel(0): Digital Display Input
[    77.031] (II) intel(0): 8 bits per channel
[    77.031] (II) intel(0): Digital interface is DisplayPort
[    77.031] (II) intel(0): Max Image Size [cm]: horiz.: 47  vert.: 30
......................
[    77.032] (II) intel(0): Supported detailed timing:
[    77.032] (II) intel(0): clock: 146.2 MHz   Image Size:  470 x 300 mm
......................
[    77.259] (II) GLX: Initialized DRI2 GL provider for screen 0
[    77.260] (II) intel(0): Setting screen physical size to 444 x 277

470x300 is correct, 444x277 is wrong (but gets into dpyinfo).
Comment 10 Elmar Stellnberger 2015-11-27 12:01:06 UTC
  bug was not observed for long and is consequently closed. 
However pls. consider another issue for the future: the DPI value of different Xinerama screens may differ enormously though to my knowledge there is no function yet to return a DPI value on per xinerama-screen basis rather than for a whole 'screen' (I am talking about the default functions XDisplayWidth/Height[MM] and missing corresponding information for the xinerama extension: no such member in xcb_xinerama_screen_info_t).
Comment 11 Elmar Stellnberger 2015-11-27 12:18:28 UTC
I will close this now as the issue described above is different from the initial issue.
Comment 12 Michal Suchanek 2015-11-27 15:48:12 UTC
The problem has probably not been ever fixed.

As has been pointed out the whole screen DPI is not immensely useful in non-uniform multi-display configurations.

XRandr returns DPI for each display separately.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.