As far as I know, starting with version 1.7, xorg defaults to 96 dpi. It doesn't calculate anything unless you specify DisplaySize via Xorg config files. Also, don't rely on xdpyinfo output.
My laptop runs on Intel SandyBridge. Excerpt from my Xorg.0.log on a fresh Archlinux install:
(==) intel(0): DPI set to (96, 96)
running
xdpyinfo | grep -E 'dimensions|resolution'
returns:
dimensions: 1600x900 pixels (423x238 millimeters)
resolution: 96x96 dots per inch
which is far from being true. I know that my screen size is 344x193 mm so obviously xdpyinfo calculates the physical size based on pixel resolution (1600x900) and default 96 DPI. If I add
........
DisplaySize 344 193
........
in /etc/X11/xorg.conf.d/monitor.conf and restart, Xorg.0.log correctly reports:
(**) intel(0): Display dimensions: (344, 193) mm
(**) intel(0): DPI set to (118, 118)
However, xdpyinfo | grep -E 'dimensions|resolution' always returns:
dimensions: 1600x900 pixels (423x238 millimeters)
resolution: 96x96 dots per inch
Still, no visual changes as I'm using Gnome, and 96 DPI is also hard-coded in gnome-settings-daemon. After patching the latter, I can enjoy my native 118 DPI. But even after all that, xdpyinfo still returns:
dimensions: 1600x900 pixels (423x238 millimeters)
resolution: 96x96 dots per inch