SysAdmin Blog

Xorg: DPI set to (20, 20)

Alexander Bochmann Thursday 12 of January, 2012
So I have this rather old Celeron-300 laptop that I install a new version of Ubuntu on from time to time to see if it still works.

It's had the problem that DPI gets set to a wrong value (20) and consequently I get a really tiny font for quite some time, and after the old way of forcing --dpi on the X comand line doesn't seem to work anymore, it was finally time to find out why.

Turns out the newly created /etc/X11/xorg.conf contains garbage in the form of a wrong DisplaySize and PanelSize:
wrong DisplaySize in Xorg.conf
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        DisplaySize  800 600

Both contain the resolution of the display in pixels in the autogenerated xorg.conf, but are supposed to have the size of the panel in millimetres instead.

After setting DisplaySize to the correct values (and just commenting out PanelSize in the Device section), the resulting DPI looks much more sane...

DisplaySize 245 185

...creates the following DPI value:

(II) SMI(0): Output LVDS using initial mode 800x600
(**) SMI(0): Display dimensions: (245, 185) mm
(**) SMI(0): DPI set to (82, 82)