You are not logged in.

#1 2009-12-17 22:48:06

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

X DPI weirdness

This started way back with the xorg-server 1.7 upgrade I think.  Basically, X is confused about what DPI my monitor is:

$ grep -B1 DPI /var/log/Xorg.0.log
(**) NOUVEAU(0): Display dimensions: (370, 230) mm
(**) NOUVEAU(0): DPI set to (131, 132)
$ xrandr | grep ' connected'
LVDS-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 367mm x 230mm
$ xdpyinfo | grep -B1 resolution
  dimensions:    1920x1200 pixels (508x317 millimeters)
  resolution:    96x96 dots per inch

For some reason, by DPI is correctly detected (131, 132), but then ignored by all my applications.  xdpyinfo wrongly reports (96, 96) as the DPI, and all my fonts are drawn super small.  I've been overriding the DPI from within KDE, but I find it weird that the DPI is detected and then ignored.  Is this an xorg bug or a configuration issue?

Offline

#2 2009-12-18 00:14:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: X DPI weirdness

What are your display dimensions? (370, 230) mm v. (508x317 millimeters)
Do you have multiple displays?

I don't use any DE so I've put 'xrandr --dpi 96' in my .xinitrc - you can use other settings of course. Maybe you have a similar setting and you need to comment it out because it's forcing the 96 DPIs?

Offline

#3 2009-12-18 00:32:16

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: X DPI weirdness

The real dimensions are 370x320 mm, and the correct DPI is 131x132.  No multiple displays; it's just a laptop screen.

I've looked everywhere for something setting the DPI, but cant find it.  Nothing in my dotfiles does that, and I got the same result (96x96 dpi) when I tried starting X as root and as a new user.

Offline

#4 2009-12-18 00:39:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: X DPI weirdness

Can you use this as your .xinitrc? Try to log in from the console using these settings - don't use KDE this time.

#!/bin/sh
#
# ~/.xinitrc

setxkbmap -option terminate:ctrl_alt_bksp
xrandr --dpi 132
exec xterm

Offline

#5 2009-12-18 01:19:36

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: X DPI weirdness

That works fine -- there's tonnes of workarounds I can use.  The best seems to be putting -dpi 131 in ServerFlagsLocal in kdmrc, so that KDM gets the right DPI too.  I'm mainly just wondering if this is a bug.  I think I'll go ahead and report it.

Offline

#6 2009-12-18 01:25:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: X DPI weirdness

I use neither ATI/nouveau nor KDE so I really can't say whether it's a bug or someone messed some configs ;-)

Offline

#7 2009-12-18 02:29:13

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: X DPI weirdness

Well it's not KDM related, since I get the same result with just "xinit".  Could be nouveau-related I guess, but nouveau does at least detect the display size and DPI correctly.

Offline

Board footer

Powered by FluxBB