Linux: Fluxbox on Nvidia driver: Fonts are huge
I installed Devuan GNU+Linux on a desktop computer with a Nvidia graphics card. Once I used the nvidia-driver
dpkg and rebooted, everything worked correctly. Fluxbox had a problem where its size 8 fonts were gigantic! Investigating revealed that the Nvidia settings utility shows a DPI of 304x305. An Internet search for nvidia fluxbox large font showed a very useful solution from the FreeBSD forum
Inside the generated xorg.conf
(which I placed in /etc/X11/xorg.conf.d/hostname.conf), add to the "Monitor" section:
Option "UseEditDpi" "false" Option "DPI" "96 x 96"
Also, I learned that lspci -v
will show you what kernel module is in use for a given PCI device. Here is my graphics card with the proprietary Nvidia driver.
01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Gigabyte Technology Co., Ltd GP107 [GeForce GTX 1050 Ti]
Flags: bus master, fast devsel, latency 0, IRQ 30, IOMMU group 1
Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at f0000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities:
References
Internet searches
Weblinks
update 2024-04-13
While you might be tempted to place a file, /etc/X11/Xresources/dpi
with contents:
! bgstack15 2023-07-16-1 17:29 Xft.dpi: 96
Which tends to help most of the time, it doesn't fix the "hardware" dpi that this post helps with. See also https://old.reddit.com/r/archlinux/comments/gsq0ix/nvidia_drivers_ruins_my_resolution_and_dpi/ which indicates to place this in a file, e.g., /etc/X11/xorg.conf.d/hostname.conf
:
Section "OutputClass" Identifier "nvidia dpi settings" MatchDriver "nvidia-drm" Option "UseEdidDpi" "False" Option "DPI" "96 x 96" EndSection
Comments