Summary: | Wrong DPI calculation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Nico R. <n-roeser> | ||||||||
Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> | ||||||||
Status: | RESOLVED MOVED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||
Severity: | normal | ||||||||||
Priority: | medium | CC: | andrey.kiselev, dominik, hramrach, ildar, zhenyu.z.wang | ||||||||
Version: | 7.6 (2010.12) | ||||||||||
Hardware: | x86 (IA32) | ||||||||||
OS: | Linux (All) | ||||||||||
See Also: |
https://bugs.freedesktop.org/show_bug.cgi?id=102424 https://bugs.freedesktop.org/show_bug.cgi?id=23705 https://bugs.freedesktop.org/show_bug.cgi?id=41115 |
||||||||||
Whiteboard: | |||||||||||
i915 platform: | i915 features: | ||||||||||
Attachments: |
|
Description
Nico R.
2009-03-29 00:04:42 UTC
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.