Text too small in X Windows when using nvidia-drivers
July 26, 2016 Leave a comment
In an earlier post titled ‘Switching between Intel and NVIDIA graphics processors on a laptop with NVIDIA Optimus hardware running Gentoo Linux‘ I described how I am able to switch between the closed-source NVIDIA video driver and the open-source Intel video driver on a Clevo W230SS laptop with NVIDIA Optimus hardware. This works nicely, but one thing had been niggling me for over a year: the size of the fonts in the Desktop Environment were much smaller when using the NVIDIA driver than when using the Intel driver. I could of course increase the font size via KDE’s ‘System Settings’ > ‘Font’ when using the NVIDIA driver, but then I would have to reduce the font size the same way when using the Intel driver. So I resolved to find a better way, and it turned out all I needed to do was add one line to the Monitor section in
xorg.conf to specify the DPI (Dots Per Inch) for the X Screen when using the NVIDIA driver:
Section "Monitor" Identifier "Monitor0" Option "DPMS" Option "DPI" "96 x 96" EndSection
You can read more about this in the NVIDIA Accelerated Linux Graphics Driver README and Installation Guide, Appendix B. X Config Options.
As described in my earlier post, I run a script to copy a file I named
xorg.conf when I want to use the NVIDIA driver, and another script to copy a file I named
xorg.conf when I want to use the Intel driver. So all I needed to do was add the line
Option "DPI" "96 x 96" to the Monitor section in the file
xorg.conf.nvidia and run my script to switch to the NVIDIA driver. Problem finally solved.