Ask Your Question

How to configure screen DPI PPI properly?

asked 2014-01-17 15:07:36 -0500

Bucic gravatar image

updated 2014-01-17 15:16:03 -0500

First and foremost, do I even need to change the automatically set 96x96 DPI (via xorg.log) if my display DPI is differs vastly from 96? (it's over 120!)

If yes:
- how do I change DPI settings on contemporary Fedora? (desktop environment agnostic method, if possible)
- please don't ask me what's wrong with what is displayed on my screen

I'm concerned whether improperly set DPI causes some applications (like web browsers for example) to probe and set wrong DPI values.

I know there's the dconf font-scaling-factor but it only scales UI elements (e.g. Firefox contents are unaffected) and doesn't prove 96 DPI in xorg is fine. The dconf scaling-factor (introduced in Gnome 3.10 for high-ppi displays) also doesn't affect Firefox contents.

15.4" TFT display with 1680x1050 resolution (WSXGA+) Display size: 13.06" × 8.16" = 106.59in² (33.17cm × 20.73cm = 687.67cm²) at 128.65 PPI, 0.1974mm dot pitch, 16550 PPI² 128.65/96=1.34

From /var/log/Xorg.0.log:

[     5.105] (--) intel(0): Output LVDS1 using initial mode 1680x1050 on pipe 0
[     5.105] (==) intel(0): DPI set to (96, 96)
[     5.160] (II) intel(0): Setting screen physical size to 444 x 277


$ xrandr -q
    Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 32767 x 32767
    LVDS1 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) **331mm x 207mm**
       1680x1050      60.0*+   50.0  
       1400x1050      60.0  
       1280x1024      60.0  
       1280x960       60.0  
       1024x768       60.0  
       800x600        60.3     56.2  
       640x480        59.9  
    VGA1 disconnected (normal left inverted right x axis y axis)
    DP1 disconnected (normal left inverted right x axis y axis)


$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1680x1050 pixels (**444x277** millimeters)
  resolution:    96x96 dots per inch

As you can see the dimensions reported by xdpyinfo are way off!


edit retag flag offensive close merge delete


what make you think that isn't properly configured ?

sergiomb gravatar imagesergiomb ( 2014-02-13 16:06:50 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2014-02-13 15:32:01 -0500

Bucic gravatar image

I've read a lot on the subject and it seems at least setting DPI via xorg is deprecated

As for available methods of dealing with too small fonts in Gnome and on web:

What I use on my Gnome Shell system for a ~130 ppi display: dconf > org.gnome.desktop.interface > text-scaling-factor set to 1.2 This made the top bar font a bit too big so I changed /usr/share/gnome-shell/theme/gnome-shell.css font-size: 11pt; to 9pt;

Web content is a when it comes to scaling though. I use NoSquint Firefox extension with default scaling set to either: 110 text 125 full OR 130 text 100 full.
It's text scaling that usually breaks web pages layout. I've set it to control text zoom using scroll wheel so whenever a site breaks I adjust for it. NoSquint works based on the default plus it remembers custom zoom settings you've set on the fly for any website. Please donate if you find it useful!

For even higher ppi displays there's the dconf scaling-factor which scales even windows etc. but it accepts only integer values. See:

Marking the question as answered. If you find some better, more comprehensive info, particularly involving setting the correct DPI at lower level (XRANDR) which Gnome and web browsers will actually use, I'll swap the mark.

edit flag offensive delete link more

answered 2017-03-10 10:29:55 -0500

eddygeek gravatar image

updated 2017-03-10 10:55:52 -0500

For anyone else coming here for the xdpyinfo issue, the corresponding upstream bug seems to be (from 2008!) but nobody seems to care about it.

It seems most programs do not use xdpyinfo data these days, I am unaware of specific display issues related to xdpyinfo.

The data most toolkits use is Xft.dpi (AFAIK):

> xrdb -q | grep dpi
Xft.dpi:        144

For gnome-shell the dpi used is from xrandr-provided dimensions (doc and code), gnome-shell will autoscale by setting scaling-factor to 2 when computed dpi is above 2✕96dpi -- expect, for some reason, for HDMI-connected 4K monitors.

Unfortunately for lower values like in my case (144 dpi) there is no autoscale and one has to set text-scaling-factor manually.

edit flag offensive delete link more

answered 2014-03-28 07:58:15 -0500

jimrey gravatar image

I cannot use Fedora 19 or 20 when in I install ir from new as it insists on using 1920x1080 and my maximum resolution is 1680x1050. Since no one seems to have a solution for this, it looks like the end of the line for me as far as Fedora is concerned. I have been using Linux since 1993 with Slackware. When Redhat Linux started in 1994, I preferred that and stayed with it until Fedora started in 2003. I detested Gnome 3 because it is completely useless for developing software and I first use Xfce, but when Mate improved I moved to it because it had greater control within the Gui. I am sick of tthe idiots that try to tell me what I want, when I really want to control my own working environment. As far as Gmome 3 is concerned, I have an iPad, if all I want is a toy.

edit flag offensive delete link more



Such fedora behavior is definitelly a legitimate reason to file a bug report (against xrandr?).

Bucic gravatar imageBucic ( 2014-05-17 12:41:23 -0500 )edit

Question Tools


Asked: 2014-01-17 15:07:36 -0500

Seen: 31,321 times

Last updated: Mar 10 '17