Bug 16466 - wrong DPI detection: fonts too big
Summary: wrong DPI detection: fonts too big
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2008-06-22 12:57 UTC by craig
Modified: 2008-07-06 13:22 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
i810-1.7.4 (76.62 KB, image/png)
2008-06-22 12:57 UTC, craig
no flags Details
i810-2.3.2 screenshot (46.10 KB, image/png)
2008-06-22 12:58 UTC, craig
no flags Details
lspci -v output (6.64 KB, text/plain)
2008-06-22 12:59 UTC, craig
no flags Details
xdpyinfo i810-1.7.4 (5.93 KB, text/plain)
2008-06-22 12:59 UTC, craig
no flags Details
xdpyinfo i810-2.3.2 (5.94 KB, text/plain)
2008-06-22 13:00 UTC, craig
no flags Details
Xorg.0.log-i810-1.7.4 (50.62 KB, text/plain)
2008-06-22 13:01 UTC, craig
no flags Details
Xorg.0.log-i810-2.3.2 (37.90 KB, text/plain)
2008-06-22 13:01 UTC, craig
no flags Details

Description craig 2008-06-22 12:57:58 UTC
Created attachment 17301 [details]
i810-1.7.4

After updating from i810-1.7.4 to anything 2.0.0 or anything greater, the fonts are in X are too big, even in GDM.

The bug was already discussed in http://bugs.gentoo.org/show_bug.cgi?id=182975
and it seems that the bug has something to do with the DPI detection of the driver, some got rid of it, 

grep -b2 dim xdpyinfo.1.7.4
1328-screen #0:
1339-  print screen:    no
1361:  dimensions:    1024x768 pixels (347x260 millimeters)
1416-  resolution:    75x75 dots per inch
1453-  depths (7):    24, 1, 4, 8, 15, 16, 32

grep -b2 dim xdpyinfo.2.3.2
1328-screen #0:
1339-  print screen:    no
1361:  dimensions:    1024x768 pixels (246x184 millimeters)
1416-  resolution:    106x106 dots per inch
1455-  depths (7):    24, 1, 4, 8, 15, 16, 32

It should be 75x75 dots per inch!

I'll attach Xorg logs, screenshots, xdpyinfo and lspci -v output.

packages:
Kernel 2.6.25-r2
xorg-x11 7.2
xorg-server 1.3.0.0
fluxbox 0.9.15.1
Comment 1 craig 2008-06-22 12:58:57 UTC
Created attachment 17302 [details]
i810-2.3.2 screenshot
Comment 2 craig 2008-06-22 12:59:26 UTC
Created attachment 17303 [details]
lspci -v output
Comment 3 craig 2008-06-22 12:59:56 UTC
Created attachment 17304 [details]
xdpyinfo i810-1.7.4
Comment 4 craig 2008-06-22 13:00:43 UTC
Created attachment 17305 [details]
xdpyinfo i810-2.3.2
Comment 5 craig 2008-06-22 13:01:10 UTC
Created attachment 17306 [details]
Xorg.0.log-i810-1.7.4
Comment 6 craig 2008-06-22 13:01:41 UTC
Created attachment 17307 [details]
Xorg.0.log-i810-2.3.2
Comment 7 Aaron 2008-06-22 16:36:36 UTC
I can confirm that, without explicit dpi forcing fonts are huge.
Comment 8 Julien Cristau 2008-06-23 05:16:33 UTC
On Sun, Jun 22, 2008 at 12:57:59 -0700, bugzilla-daemon@freedesktop.org wrote:

> After updating from i810-1.7.4 to anything 2.0.0 or anything greater, the fonts
> are in X are too big, even in GDM.
> 
> The bug was already discussed in http://bugs.gentoo.org/show_bug.cgi?id=182975
> and it seems that the bug has something to do with the DPI detection of the
> driver, some got rid of it, 
> 
Your monitor claims a physical size of 246x184 millimeters (see the
log), and a resolution of 1024x768.  1024x25.4/246 = 105.73 dpi,
768x25.4/184 = 106.02 dpi, so that doesn't sound like a bug in the
driver.  If the physical size detected is wrong, then that could be
fixed, but there's no reason the dpi should be forced to 75 afaik.
Comment 9 craig 2008-06-23 09:49:16 UTC
Well, i810-1.7.4 works, >=i810-2.0.0 doesn't - thats looks like a driver bug to me!

How is the physical size detected, doesn't the driver do that?
Comment 10 Julien Cristau 2008-06-23 09:54:50 UTC
On Mon, Jun 23, 2008 at 09:49:16 -0700, bugzilla-daemon@freedesktop.org wrote:

> --- Comment #9 from Craig Venter <craig@haquarter.de>  2008-06-23 09:49:16 PST ---
> Well, i810-1.7.4 works, >=i810-2.0.0 doesn't - thats looks like a
> driver bug to me!
> 
if by 'works' you mean 'reports 75 dpi even if your monitor has 106',
then sure...

> How is the physical size detected, doesn't the driver do that?
> 
the driver gets it from the monitor.
Comment 11 Aaron 2008-06-23 10:13:18 UTC
You can;t say that it is not driver's fault and ignore it. It may be wrongly reported screen size, but there should be a workaround added, so I don't need to do this workaround myself, as it is the only way for solving this now.
Comment 12 craig 2008-06-23 11:14:12 UTC
>> How is the physical size detected, doesn't the driver do that?
>the driver gets it from the monitor.
Then we should check if there has been a change in that code, because in 1.7.4 it gets 347x260 millimeters and in 2.3.2 it gets 246x184 millimeters. I didn't change the monitor [it's a Dell Latitude D400 Laptop and I just CAN'T ;)] so this imposes some bug in the driver's code upon me.
Even if something different causes this behaviour, a workaround in the driver would be *really* nice.
Comment 13 Rémi Cardona 2008-06-23 11:30:39 UTC
(In reply to comment #12)
> Then we should check if there has been a change in that code, because in 1.7.4
> it gets 347x260 millimeters and in 2.3.2 it gets 246x184 millimeters. I didn't
> change the monitor [it's a Dell Latitude D400 Laptop and I just CAN'T ;)] so
> this imposes some bug in the driver's code upon me.

Of the 2 value-pairs reported by the driver, which one is the physically correct one? Could you measure it?

As a side note, 75dpi is the old default value for the server and it was changed just before 1.4.1. It looks like the DPI value reported by the driver is now actually *used* rather than being ignored :)

> Even if something different causes this behaviour, a workaround in the driver
> would be *really* nice.

As far as modern desktop environments are concerned, setting the DPI atom on the root window will do just that (gnome uses gnome-settings-daemon to manage it), but that will still yield weird results for GDM and other login managers where the value reported by the driver is used by default.

But yeah, an official workaround would be very interesting.
Comment 14 Wang Zhenyu 2008-06-23 18:08:48 UTC
From log, it looks edid block returns exact 246x184 size, so it might be bug in your monitor. Driver doesn't involve here as far as I see, dpi is calculated from what it gets from ddc. You can overwrite it by config in anyway.
Comment 15 Michael Fu 2008-06-24 18:30:37 UTC
zhenyu, could you give an example how to correct this in conf file? 
Comment 16 Wang Zhenyu 2008-06-25 18:08:07 UTC
see xorg.conf man on "DisplaySize" setting.
Comment 17 craig 2008-06-26 15:25:50 UTC
246x184mm is the correct, real physical size.
Comment 18 Alexandre Garcia 2008-07-01 02:08:57 UTC
Well Wang, I did everything you said, but the BUG (YES IT'S A BUG!!!!!!!!) persists - Look:
DisplaySize     338     211 

[amg@laptop ~]$ xdpyinfo | grep resolution
  resolution:    112x968 dots per inch

ROTFL, I'd love to have a monitor with bugs.
Just tell me why in i810-1.7.4 it is ok and in new versions not? (Perhaps it is because my monitor doesn't has "bugs") Stop thinking that the problem is in the users configs, because it isn't. The problem is in the driver!
Comment 19 Julien Cristau 2008-07-01 04:29:10 UTC
> --- Comment #18 from Alexandre Garcia <alexmgarcia@tux-linux.net>  2008-07-01 02:08:57 PST ---
> Just tell me why in i810-1.7.4 it is ok and in new versions not? (Perhaps it is
> because my monitor doesn't has "bugs") Stop thinking that the problem is in the
> users configs, because it isn't. The problem is in the driver!
> 
no, it isn't.  you also don't give your full X log and config, which
means we can't help you.  the original 'issue' reported in this bug is
that the new driver reports the resolution correctly if you don't force
the dpi to 96.  if you have another problem then don't conflate it with
this bug and open a new one.
Comment 20 Alexandre Garcia 2008-07-01 04:44:52 UTC
Anyway, for those who has the problem here is a fix (thanks to:

Comment by Alois Nespor (anespor) - Sunday, 01 July 2007, 09:38 GMT-4
I find the problem - driver intel read not correctly info from DDC and set up
wrong dimensions/resolution :
xdpyinfo |grep -A1 dimensions
dimensions: 1280x800 pixels (289x21 millimeters)
resolution: 112x968 dots per inch

FIX: to Section "Device" add line Option "DDC" "no"

xdpyinfo |grep -A1 dimensions
dimensions: 1280x800 pixels (338x211 millimeters)
resolution: 96x96 dots per inch


i know, is small hack, but works good ==> fix driver intel about developers on
http://www.intellinuxgraphics.org/

again, sorry for my english, is bad

@ http://bugs.archlinux.org/task/7129
Comment 21 Rémi Cardona 2008-07-01 07:00:12 UTC
@Alexandre,

Could you please attach your Xorg.0.log without any sort of hack: ie by removing the option that disables DDC and the one that sets a display size.

Thanks
Comment 22 Eric Anholt 2008-07-02 11:08:56 UTC
The driver is reporting the correct DPI instead of a placeholder DPI, as confirmed by the bug reporter.  If the desktop is doing inappropriate things with that DPI value, it should be taken up with the desktop folks.

Alexandre: you have an actual bug in your monitor's EDID data, that results in a DPI that's off by a factor of 10 in one direction.  If you submit a bug with your Xorg.0.log with no config file, we can get the X Server to work around that for you.
Comment 23 craig 2008-07-06 13:22:53 UTC
Option "DDC" "no"
makes the fonts smaller but they are not of equal size as they were. :/


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.