DPI overridden unconditionally to 96 on both axes
Submitted by Paul Bredbury
Assigned to Xfce Bug Triage
Description
Created attachment 5315 Stops xfce4-settings from changing DPI
Hi, xfce4-settings is overriding the DPI from my Nvidia card.
$ grep -i dpi /var/log/Xorg.0.log [ 34403.988] (--) NVIDIA(0): DPI set to (131, 119); computed from "UseEdidDpi" X config
This is a 1920x1080 laptop monitor. With the enclosed patch (against xfce4-settings git as of 20140112), I get the expected:
$ xdpyinfo | grep reso resolution: 131x119 dots per inch
Without the enclosed patch, I get 96x96. This is just a standard, single screen with a single XFCE panel, nothing complicated, and no reason to override, kinda similar to these controversial xorg-server bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=23705 (don't force 96dpi) https://bugs.freedesktop.org/show_bug.cgi?id=41115 (add option to override)
The problem is in xfsettingsd/displays.c:
helper->mm_width = (helper->width / 96.0) * 25.4 + 0.5;
helper->mm_height = (helper->height / 96.0) * 25.4 + 0.5;
I think that something like the above code, should only be run, if the current DPI is confidently known to be invalid.
Also, let's not forget, DPI is two numbers, x and y, which can be different (especially with widescreen monitors). XFCE's "Appearance - Fonts" tab quaintly assumes they are both equal, as one number :(
Patch 5315, "Stops xfce4-settings from changing DPI":
dpi-unchanged.patch
Version: 4.15.0