On a computer using xorg-7.4 with xorg-server-1.6.0, xf86-video-intel-2.6.99.902 and libXrandr-1.2.99.4 and randrproto-1.2.99.4 (do not know whether the last two are relevant), the DPI values seem to be incorrectly calculated. The screen is 331x207 millimeters (measured and given as DisplaySize in xorg.conf). The mode set in xorg.conf is 1680x1050. Grepping the Xorg logfile for that stuff results in the following lines: (II) intel(0): Output LVDS using initial mode 1680x1050 (**) intel(0): Display dimensions: (331, 207) mm (**) intel(0): DPI set to (128, 206) (II) intel(0): Setting screen physical size to 331 x 207 It seems that the vertical DPI value is calculated using the horizontal resolution: xDPI = 1680/(331/25.4) ~= 128.9 (OK) yDPI = 1050/(207/25.4) ~= 128.8 (should be that value) yDPIwrong = 1680/(207/25.4) ~= 206.1 (is that value instead) I filed this bug for the Driver/intel component, but it may belong to Server/general (or even App/xrandr?). Someone who knows better than me should properly set the component. This bug might also be related to bug 16789; that looks a bit different, though.
Created attachment 24349 [details] Xorg server logfile
Created attachment 24350 [details] Xorg configuration file
hi This is indeed set by xserver, it chose the largest one between HDislay and VDislay of mode as virtuaX/Y of screen. Thanks Ma Ling
if it's a xserver bug, please correct the component field then.
I have the very same problem with XOrg 7.6 and radeon 6.14.2 driver. $ xdpyinfo | egrep "resolution|dimension" dimensions: 1680x1050 pixels (444x277 millimeters) resolution: 96x96 dots per inch $ xrandr -q|egrep "Screen| connected" Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192 DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm xrandr reports the right physical display size and xdpyinfo does not. Xorg.0.log contains: [ 1357.413] (II) RADEON(0): clock: 146.2 MHz Image Size: 473 x 296 mm [ 1357.414] (==) RADEON(0): DPI set to (96, 96) ...and following: [ 1357.425] (II) RADEON(0): Setting screen physical size to 444 x 277 I have a single display connected to DVI output and resolution must be 90 dpi, not 96 for my display. If the physical size is detected properly why the DPI value is wrong? Also it is somewhat similar to bug #25615.
Created attachment 50997 [details] Xorg log file
If the proper display size is forced in xorg.conf ("DisplaySize 473 296"), xdpyinfo still does not report correct numbers: $ xdpyinfo | egrep "resolution|dimension" dimensions: 1680x1050 pixels (444x277 millimeters) resolution: 96x96 dots per inch From Xorg.log: [ 16.547] (II) RADEON(0): clock: 146.2 MHz Image Size: 473 x 296 mm [ 16.547] (**) RADEON(0): Display dimensions: (473, 296) mm [ 16.547] (**) RADEON(0): DPI set to (90, 90) ...but later still comes: [ 17.620] (II) RADEON(0): Setting screen physical size to 444 x 277
Even more info: if DPI setting is forced through the command line with option "-dpi 90" (90 is the right value for my case) everything works as it should: $ xdpyinfo | egrep "resolution|dimension" dimensions: 1680x1050 pixels (474x296 millimeters) resolution: 90x90 dots per inch $ xrandr -q|egrep "Screen| connected" Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192 DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm [ 5909.821] (II) RADEON(0): clock: 146.2 MHz Image Size: 473 x 296 mm ... [ 5909.833] (II) RADEON(0): Setting screen physical size to 474 x 296 So I can suppose that the problem located somewhere in the following code from xf86RandR12.c: if (width && height) { /* * Compute physical size of screen */ if (monitorResolution) { mmWidth = width * 25.4 / monitorResolution; mmHeight = height * 25.4 / monitorResolution; } else { xf86OutputPtr output = xf86CompatOutput(pScrn); if (output && output->conf_monitor && (output->conf_monitor->mon_width > 0 && output->conf_monitor->mon_height > 0)) { /* * Prefer user configured DisplaySize */ mmWidth = output->conf_monitor->mon_width; mmHeight = output->conf_monitor->mon_height; } else { /* * Otherwise, just set the screen to DEFAULT_DPI */ mmWidth = width * 25.4 / DEFAULT_DPI; mmHeight = height * 25.4 / DEFAULT_DPI; } } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting screen physical size to %d x %d\n", mmWidth, mmHeight); or the monitorResolution is being incorrectly set somewhere before that. Though I am not ready to debug it myself.
There are two issues here. The first issue was that the X server calculated wrong DPI, the latter that it sets DPI to 96 (bug 23705).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/378.
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.