Monday, April 23, 2007

DPI - change from 75 to 96


There is no one standard DPI. It is actually determined based on monitor size values from DDC given the screen resolution. If DDC does not specify the size, 75 DPI is used by default.

Unlike GNOME, KDE does not force DPI anywhere in its settings. So, when you run KDE and GNOME applications side by side, the font sizes will differ.

When I switch from "nvidia" to the binary "nv" driver, it always sets 75 DPI for my BenQ FP731. To force 96 DPI which will produce consistent font sizes for GNOME, KDE, XFCE and all other applications, I need to edit the display manager's configuration.

Here is how to do it in Xubuntu:

#sudo vi /etc/X11/gdm/gdm-cdd.conf

--8<--
# Definition of the standard X server.
[server-Standard]
name=Standard server
command=/usr/bin/X -br -audit 0 -dpi 96
-->8--


To do it the really easy way using the GDM setup GUI tool:

#sudo gdmsetup

Add the DPI setting in Security > Configure X Server > Command.


The same for KDE greeter:

#sudo vi /etc/kde3/kdm/kdmrc

--8<--
[X-:*-Core]
AllowNullPasswd=true
AllowShutdown=All
NoPassEnable=false
NoPassUsers=
ServerArgsLocal=-nolisten tcp -dpi 96
ServerCmd=/usr/X11R6/bin/X -br
-->8--

nVIDIA binary driver freq fix (Feisty)


When some people switch to the nVIDIA binary driver ("nvidia" as opposed to "nv"), they can no longer access their desktop. For example, my old BenQ FP731 LCD goes black&blank and displays "Out of range".

Here is the fix:

#vi /etc/X11/xorg.conf

Section "Device"
Identifier "nVidia Corporation NV34 [GeForce FX 5200]"
Driver "nvidia"
Busid "PCI:1:0:0"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
Option "NoLogo" "True"
Option "UseEdid" "False"
#Option "UseEdidDpi" "False"
#Option "DPI" "96 x 96"
EndSection

The "UseEdidDpi" and "DPI" options can be used to set the DPI to 96. These settings are specific to nVIDIA gfx chips but there is another way to set a sane DPI...