Display DPI wrongly calculated by driver

Bug #154390 reported by Rudd-O
8
Affects Status Importance Assigned to Milestone
xserver-xorg-video-ati (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

== Problem: ==

Wrong DPI calculated (causes too small fonts in browsers and apps, messed up display form factors in video players)

DPI as seen in xorg.log:

(II) RADEON(0): Output VGA-1 using initial mode 1280x800
after xf86InitialConfiguration
(**) RADEON(0): Display dimensions: (295, 225) mm
(**) RADEON(0): DPI set to (110, 135)

It makes no sense, the horizontal DPI is correct, but the vertical DPI is way off. WAY off. DPI should be closer to ~110 and ~90.3 (vertical DPI)

But that's not it. More inconsistencies. DPI as seen in xdpyinfo:

screen #0:
  dimensions: 1280x800 pixels (338x211 millimeters)
  resolution: 96x96 dots per inch

Even more inconsistencies: Screen dimensions as seen in xrandr:

VGA-1 connected 1280x800+0+0 (normal left inverted right) 0mm x 0mm

In summary:

resolution 1280 800
dimensions mm 295 225
dpm 4.34 3.56
correct dpi 110.21 90.31
RADEON dpi 110 135
xrandr dpi inf inf
xdpyinfo 96 96

I think KDE is picking up on the xdpyinfo DPI to draw its fonts, based on (my unscientific observation of) the relative font size.

==Extra symptoms:==

Flickers at the start of my KDE session. Consistent with the flickers produced by xrandr. I Understand it's produced by displayconfig-restore in kde-guidance:

/etc/X11/Xsession.d/40guidance-displayconfig_restore

==Things to know==

Card: ATI Radeon Mobility 7000-M

Driver: radeon

Old monitor (VESA DDC supported, disabled in xorg.conf)

NoDDC in xorg.conf Device section

DisplaySize 295 225 setup manually to true screen dimensions in xorg.conf Monitor section

PreferredMode 1280x800 in Monitor section

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks for your report. The calculation of the vertical dpi is definitely wrong.
That the server uses 96x96 instead is probably bug #141146.

Can you please run it without any xorg.conf and attach the resulting Xorg.0.log?

Changed in xserver-xorg-video-ati:
assignee: nobody → tormodvolden
status: New → Incomplete
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Please attach your xorg.conf and corresponding Xorg.0.log as well.

Revision history for this message
Rudd-O (rudd-o) wrote :
Revision history for this message
Rudd-O (rudd-o) wrote :
Revision history for this message
Rudd-O (rudd-o) wrote :
Revision history for this message
Rudd-O (rudd-o) wrote :
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Can you please run it without any xorg.conf and attach the resulting Xorg.0.log?

Revision history for this message
Rudd-O (rudd-o) wrote :

Sure. Attached xorg.1.log without config file, xrandr and xdpyinfo outputs.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

As I commented in bug #154142: Talking to upstream on IRC it appears that the "DPI set to" message doesn't matter.

Does it help to run xrandr --dpi 110 ? It seems like xrandr can not set independent vertical dpi though.

Changed in xserver-xorg-video-ati:
assignee: tormodvolden → nobody
status: Incomplete → Confirmed
Revision history for this message
Rudd-O (rudd-o) wrote :

Yes, that works for all subsequently started apps, and it changes the xdpyinfo DPI, but it does NOT solve the wrong dimensions problem (which is very odd considering that I have manually set the dimensions in millimeters in xorg.conf -- see the first log, not the second one). Unfortunately it doesnt' work for already started apps, such as konq, kicker, kdesktop, all apps started with my KDE session. I need to restart them to see any effect.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

> I have manually set the dimensions in millimeters in xorg.conf

I wonder if the recent upstream commit http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=48ca5961caee62f2980017a6bdc96a1b4c747727 can fix this. We'll have to see if we can backport this change.

Changed in xserver-xorg-video-ati:
status: Confirmed → Fix Committed
Revision history for this message
Rudd-O (rudd-o) wrote :

It's now more or less working for me, calculating usable DPI.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks, I'll close this bug then.

Changed in xserver-xorg-video-ati:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.