ati radeon driver does not autodetect displaysize on Latitude D600, therefore uses wrong resolution

Bug #80940 reported by Achim Bohnet on 2007-01-22
14
Affects Status Importance Assigned to Milestone
X.Org X server
Invalid
Medium
xorg-server (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-driver-ati

Since Hoary up to Feisty Herd2, the xorg ati/radeon driver never detected the right physical
dimension of the display. So dpi is set to 75 instead of 125. This results
in fonts that almost half as wide and height as it should be.

Using DisplaySize in Monitor section of xorg.conf fixes it, but that's not autodetection
(as works perfect with i810 on other laptops)

$ grep DisplaySize /etc/X11/xorg.conf
        DisplaySize 286 214

$ xdpyinfo | egrep 'dimens|resolu'
  dimensions: 1400x1050 pixels (287x215 millimeters)
  resolution: 124x124 dots per inch

Bryce Harrington (bryce) wrote :

We've changed the -ati driver from 6.6.x to 6.7.x in Gutsy - could you test if this issue is still occurring on Gutsy?

Changed in xorg:
status: New → Incomplete
Scott (scott-a-albrecht) wrote :

I have a D600 with 1400x1050 resolution and a clean installation (no upgrade) of Gutsy. The installation generated xorg.conf file didnt contain the DisplaySize 286 214. After adding the line here are my results from the grep and xdpyinfo :

xxxxxx:~$ grep DisplaySize /etc/X11/xorg.conf
        DisplaySize 286 214

xxxxxx:~$ xdpyinfo | egrep 'dimens|resolu'
  dimensions: 1400x1050 pixels (370x277 millimeters)
  resolution: 96x96 dots per inch

Glen Ditchfield (gjditchfield) wrote :

I have a Dell D600 running Gutsy, upgraded from Feisty.
xorg version is currently 1:7.2-5ubuntu13.
xserver-xorg-video-ati version is currently 1:6.7.196-1ubuntu2.
My xorg.conf contains
...
Section "Monitor"
 Identifier "Generic Monitor"
 Option "DPMS"
 DisplaySize 285 215
EndSection
...

/var/logs/Xorg.0.log contains
...
(II) RADEON(0): Output LVDS using initial mode 1400x1050
after xf86InitialConfiguration
(**) RADEON(0): Display dimensions: (285, 215) mm
(**) RADEON(0): DPI set to (124, 141)
...
Note that the Y component of DPI is calculated incorrectly!

xdpyinfo says
...
  dimensions: 1400x1050 pixels (370x277 millimeters)
  resolution: 96x96 dots per inch
...
So the specified dimensions, and the calculated DPI values, are not taking effect.

philipp beitz (philippbeitz) wrote :

same problem with open source ati driver in ubuntu gutsy. compiz is activated

Akos Ladanyi (akos-ladanyi) wrote :

The dpi miscalculation of the open source ati driver is present in Hardy too.

Timo Aaltonen (tjaalton) wrote :

No need to keep open for 'xorg'.

Changed in xorg:
status: New → Invalid

Thanks for taking the time to report this bug and helping to make Ubuntu better. In the development cycle for Intrepid there have been some vast improvements in the open source ati video driver and we could use your help testing them. Could you please download the latest Alpha CD image of Intrepid and test this particular bug just using the Live CD? You can find the latest image at http://www.ubuntu.com/testing . Your testing can help make Ubuntu and the open source ati driver even better! Thanks in advance.

Glen Ditchfield (gjditchfield) wrote :

I booted the D600 from an Intrepid alpha 4 Live CD.
"grep DisplaySize /etc/X11/xorg.conf" outputs nothing.
"xdpyinfo | egrep 'dimens|resolu'" prints
  dimensions: 1400x1050 pixels (370x277 millimeters)
  resolution: 96x96 dots per inch
so the resolution still is not autodetected.

I edited /etc/X11/xorg.conf and added
    DisplaySize 285 215
to the Monitors section, and restarted X via Control-Alt-Backspace. Now my results are

ubuntu@ubuntu:~$ grep DisplaySize /etc/X11/xorg.conf
 DisplaySize 285 215
ubuntu@ubuntu:~$ xdpyinfo | egrep 'dimens|resolu'
  dimensions: 1400x1050 pixels (370x277 millimeters)
  resolution: 96x96 dots per inch

After the reboot, /var/log/Xorg.log.0 contains
    (II) RADEON(0): Output LVDS using initial mode 1400x1050
    after xf86InitialConfiguration
    (**) RADEON(0): Display dimensions: (285, 215) mm
    (**) RADEON(0): DPI set to (124, 141)

So, the driver is still miscalculating the y-axis DPI incorrectly, and still ignoring the numbers that it calculates.

Changed in xserver-xorg-video-ati:
importance: Undecided → Medium
status: Incomplete → Confirmed
Akos Ladanyi (akos-ladanyi) wrote :

Could you please test if putting the following line in the Device section fixes the miscalculation?

Option "IgnoreEDID"

Glen Ditchfield (gjditchfield) wrote :

I tried
    Section "Device"
        Identifier "Configured Video Device"
        Option "IgnoreEDID"
    EndSection
by itself, and also with
    Section "Monitor"
        Identifier "Configured Monitor"
        DisplaySize 285 215
    EndSection
The results were the same as before: resolution 96x96 dots per inch, Y resolution in Xorg.0.log miscomputed. I have attached the log corresponding to the xorg.conf with both of the added lines.

Bryce Harrington (bryce) on 2008-08-29
Changed in xserver-xorg-video-ati:
status: Confirmed → Triaged
Changed in xorg:
status: Invalid → New
Timo Aaltonen (tjaalton) wrote :

and again, this is a bug in the driver..

Changed in xorg:
status: New → Invalid
Achim Bohnet (allee) wrote :

Problem, 96 dpi as default instead of 125 , is still there with
  * dell latitude 600 with ati card, 1400x1050 display
  * intrepid live cd 20080917.4 session
  * the radeon xorg driver

Achim Bohnet (allee) wrote :
Achim Bohnet (allee) wrote :
Achim Bohnet (allee) wrote :
Achim Bohnet (allee) wrote :

Adding Option "IgnoreEDID" does not help. DPI still 96.

Achim Bohnet (allee) wrote :

Using IgnoreEDID and Display size and xdpyinfo still reports 96 dpi :(
Strange is that in xorg.log xserver says dpi (124 142). Diff to the default
attached.

Achim Bohnet (allee) wrote :

No change, i.e. still the wrong 96 dpi, when only displaysize is used (without ignoreedid) :(

Lemme know if you need further info.

Achim

Akos Ladanyi (akos-ladanyi) wrote :

The radeon driver in OpenSUSE 11 calculates the DPI right in case DisplaySize is given. Using their xorg.conf in Ubuntu does not fix the problem, so it must be one of the patches they apply to the driver. There are many patches in xorg-x11-driver-video-7.3-138.2.src.rpm, and I don't know which one is related to this problem.

Bryce Harrington (bryce) wrote :

Hi Achim,

Are you still having this issue? This seems to actually be an issue in the xserver. I browsed through the code and it is in the xserver's xf86SetDpi() routine that the 96 dpi is selected. 96 is what it picks when all of its usual algorithms fail.

If this issue is still problematic, could you please do a few things to help us make progress on solving this?

First, please test against Jaunty (ISO images are available at http://cdimages.ubuntu.com/releases/jaunty; testing against a LiveCD boot should be plenty sufficient).

Please also attach the Xorg.0.log from the Jaunty session. Unfortunately the Xorg.0.log we have for you in this bug lacks some log info about how it's deciding your screen height/width via EDID or DDC. Another Xorg.0.log may have that.

Also, please attach the output from these three commands, which will give us better insight into what your monitor is communicating about its capabilities and what the xserver is picking up:

  * get-edid | parse-edid # from the read-edid package
  * lshal
  * xrandr --verbose

Changed in xserver-xorg-video-ati:
status: Triaged → Incomplete
Achim Bohnet (allee) wrote :

HI Bryce,

I'm writing this from Kubuntu Jaunty LiveCD (15-Jan-2009) session. I still see the problem.
dpi is 96 instead of 124.

Achim Bohnet (allee) wrote :
Achim Bohnet (allee) wrote :
Achim Bohnet (allee) wrote :
Achim Bohnet (allee) wrote :

FWIW: I had a quick try booting the liveCDs of Fedora 10 and OpenSuSE 11.1.

 * Fedora 10: same error 96 dpi. Therefore fonts really small
 * OpenSuSE 11.1: Display dimension used is wrong: 1260x960 instead
   of 1400x1050 (Xorg.conf contains: Option "PreferredMode" "1400x1050") the
   displaysize 286 214 is correct (hardcoded in generated xorg.conf). dpi is
   113 x 113.

Glen Ditchfield (gjditchfield) wrote :

I installed Hardy Heron on the D600 using the 8.04.1 Live CD, using the installer's "safe graphics" mode. When Hardy started up, xdpyinfo reported the screen size to be 291x212 mm, which is nearly correct. The autogenerated xorg.conf uses the vesa driver. I added DisplaySize to xorg.conf, and when X restarted the display size and dpi were correct. (Original xdpyinfo, xorg log, and xorg.conf attached.) So I think the problem is in the driver, not xserver -- at least, vesa does something right that ati doesn't.

I also deleted xorg.conf. With no xorg.conf, X detects the video card and uses the ati driver, with the same results as before: dpi incorrectly calcuated to be 96x96.

I hope this issue can be fixed for Hardy.

Glen Ditchfield (gjditchfield) wrote :
Bryce Harrington (bryce) on 2009-01-29
Changed in xserver-xorg-video-ati:
status: Incomplete → Triaged
Arkashkin (arkashkin) wrote :

I have the same laptop model and both Ubuntu Intrepid Ibex and Jaunty can't detect my maximum resolution of the laptop screen which is 1400x1050. The only modes i have to choose from are - 640x480,800x600 and 1024x768 and the funny thing is that on older versions of
Ubuntu (Feisty Fawn and Hardy) I could fix it by changing xorg.conf to:

//////////////////////////////////////////////////////////////////////////////////////////////
Section "Device"
Identifier "Radeon 9000"
Driver "ati"
BusID "PCI:1:0:0"
Option "GARTSize" "64"
Option "MergedFB" "off"
Option "XAANoOffscreenPixmaps" "true"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Radeon 9000"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Virtual 1920 1440
Modes "1400x1050"
EndSubSection
EndSection

Section "ServerLayout"
Option "AIGLX" "true"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection

Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection
////////////////////////////////////////////////////////////////////

I now use Ubuntu Jaunty and i tried changing my xorg.conf to:

///////////////////////////////////////////////////////////////////

Section "Device"
 Identifier "Configured Video Device"
        Option "IgnoreEDID"
EndSection

Section "Monitor"
 Identifier "Configured Monitor"
 DisplaySize 286 214
 Option "DPMS"
 HorizSync 30-70
 VertRefresh 50-160
EndSection

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"

SubSection "Display"
 Modes "1400x1050"
EndSubSection

EndSection
//////////////////////////////////////////////////////////////////

and it doesn't helps me either.

This is my xrandr command output :

///////////////////////////////////////////////////////////////

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1024 x 1024
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768 60.0*+ 60.0
   800x600 60.3 59.9
   640x480 59.9 59.4
S-video disconnected (normal left inverted right x axis y axis)

///////////////////////////////////////////////////////////////

Achim Bohnet (allee) wrote :

Dell Latitude D600 still shows the bug running karmic beta 1: Displaysize is notauto detected and dpi set to 96 dpi instead of the real 124 dpi. With the size im mm adjusted to the artificial 96dpi. xdpyinfo:

...
screen #0:
  dimensions: 1400x1050 pixels (370x277 millimeters)
  resolution: 96x96 dots per inch
...

Workaround: as karmic does not use xorg.conf in the default setup, I've modified /etc/kde4/kdm/kdmrc to
start the xserver with the options -dpi 124.

Sadly, it looks like radeon driver will never get it right :(
Achim

Achim Bohnet (allee) wrote :

Hello,
Maybe you know how I can do your workaround if I use Gnome and not KDE ?

Thanks.

On Tue, Oct 6, 2009 at 6:51 PM, Achim Bohnet <email address hidden> wrote:

> Dell Latitude D600 still shows the bug running karmic beta 1:
> Displaysize is notauto detected and dpi set to 96 dpi instead of the
> real 124 dpi. With the size im mm adjusted to the artificial 96dpi.
> xdpyinfo:
>
> ...
> screen #0:
> dimensions: 1400x1050 pixels (370x277 millimeters)
> resolution: 96x96 dots per inch
> ...
>
>
> Workaround: as karmic does not use xorg.conf in the default setup, I've
> modified /etc/kde4/kdm/kdmrc to
> start the xserver with the options -dpi 124.
>
> Sadly, it looks like radeon driver will never get it right :(
> Achim
>
> ** Attachment added: "Xorg.0.log"
> http://launchpadlibrarian.net/33131409/Xorg.0.log
>
> --
> ati radeon driver does not autodetect displaysize on Latitude D600,
> therefore uses wrong resolution
> https://bugs.launchpad.net/bugs/80940
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “xorg” package in Ubuntu: Invalid
> Status in “xorg-server” package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: xserver-xorg-driver-ati
>
> Since Hoary up to Feisty Herd2, the xorg ati/radeon driver never detected
> the right physical
> dimension of the display. So dpi is set to 75 instead of 125. This
> results
> in fonts that almost half as wide and height as it should be.
>
> Using DisplaySize in Monitor section of xorg.conf fixes it, but that's not
> autodetection
> (as works perfect with i810 on other laptops)
>
> $ grep DisplaySize /etc/X11/xorg.conf
> DisplaySize 286 214
>
> $ xdpyinfo | egrep 'dimens|resolu'
> dimensions: 1400x1050 pixels (287x215 millimeters)
> resolution: 124x124 dots per inch
>
>

mbrijun (mbrijun) wrote :

Hi Arkashkin,

if you are still having a problem, please try the following approach. Add the bellow line to your .bashrc file:

if [ $DISPLAY ]; then xrandr --dpi 124; fi

The suggestion was made on the following bug report thread: https://bugzilla.redhat.com/show_bug.cgi?id=433123

Best regards,
Martin

Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

Hi Achim,

This bug was reported against an earlier version of Ubuntu, can you
test if it still occurs on Lucid?

Please note we also provide technical support for older versions of
Ubuntu, but not in the bug tracker. Instead, to raise the issue through
normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on
Lucid, please run the following command to refresh the report:

  apport-collect 80940

If you are not the original reporter, please file a new bug report, so
we can work with you as the original reporter instead (you can reference
bug 80940 in your report if you think it may be related):

  ubuntu-bug xorg

If by chance you can no longer reproduce the issue on Lucid or if you
feel it is no longer relevant, please mark the bug report 'Fix Released'
or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/80940

Changed in xorg-server (Ubuntu):
status: Triaged → Incomplete
tags: added: needs-retested-on-lucid-by-june
Achim Bohnet (allee) wrote :

Booted with Kubuntu Lucid CD: Bug still exists!

screen dimension correctly detected: 1400x1050
Display size wrong ==> wrong dpi 96 instead of 124

I did run:

ubuntu@ubuntu:~$ apport-collect 80940
The authorization page:
   (https://edge.launchpad.net/+authorize-token?......allow_permission=WRITE_PRIVATE)
should be opening in your browser. After you have authorized
this program to access Launchpad on your behalf you should come
back here and press <Enter> to finish the authentication process.

Package xorg-server not installed and no hook available, ignoring
ubuntu@ubuntu:~$ echo $?
0

Lemme know if you need more info.

Achim

Changed in xorg-server (Ubuntu):
status: Incomplete → Confirmed

Created an attachment (id=35581)
Xorg log

This bug goes back to at least October 2007. For history and more log files, and a reference to a possible patch, see https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/575496

The Radeon driver distributed with Ubuntu 10.04 and earlier distributions does not correctly detect monitor sizes. On Dell Latitude D600s with 14 inch 1400x1050 LCD displays, it incorrectly calculates a panel size of 370x277 mm and a resolution of 96 dpi, instead of the correct 124 dpi. The KDE desktop is misled by this when converting point sizes to pixels, and displays everything in unpleasantly small characters.

Created an attachment (id=35582)
xdpyinfo output

Many more log files for Ubuntu 10.04 at https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/575496

First, xdpyinfo reporting 96dpi by default is expected, see bug 23705.

Also from the xrandr output on the lp bug, it seems we don't get the actual size of your display. Is there an edid file in /sys/class/drm/card0-LVDS-1/? If so please attach it.

Older radeons rarely had edids for the LVDS panel, the vbios lvds table only has the panel modeline, not the physical size.

> Older radeons rarely had edids for the LVDS panel, the vbios lvds
> table only has the panel modeline, not the physical size.

The old radeon driver (back in the xfree86 days) did know that my
laptop’s screen was 12”×9”. I originally added --dpi 133 to my X
startup scripts only because the integer conversions between inch
(for dpi) and mm (for dimensions) led to rounding errors.

To the Reporter: you may need to add --dpi 124 to your startup
scripts to get accurate sizing with the current X server.

(In reply to comment #4)
> I originally added --dpi 133 to my X
> startup scripts only because the integer conversions between inch
> (for dpi) and mm (for dimensions) led to rounding errors.

> To the Reporter: you may need to add --dpi 124 to your startup
> scripts to get accurate sizing with the current X server.

Actually, most scalable fonts work best when DPI is a multiple of 12, so 120 (10.0X) or 132 (11.0X) can be expected to work better than 124 (10.33X) or 133 (11.08X).

(In reply to comment #4)
> > Older radeons rarely had edids for the LVDS panel, the vbios lvds
> > table only has the panel modeline, not the physical size.
>
> The old radeon driver (back in the xfree86 days) did know that my
> laptop’s screen was 12”×9”. I originally added --dpi 133 to my X
> startup scripts only because the integer conversions between inch
> (for dpi) and mm (for dimensions) led to rounding errors.

The driver did not even have support for reading edids from LCD panels at that time so it must have been some different behaviour in the xserver rather than the driver.

"ls -l" says that /sys/card/drm/card0-LVDS-1/edid exists, apparently with 128 bytes in it. However, all other commands I tried say it is empty.

[salver:card0-LVDS-1]$ ls -l /sys/class/drm/card0-LVDS-1/edid
-r--r--r-- 1 root root 128 2010-05-12 22:09 /sys/class/drm/card0-LVDS-1/edid
[salver:card0-LVDS-1]$ wc edid
  0 0 0 edid

I generated an xorg.conf file with "Xorg -configure", and modified it to contain "DisplaySize 285 215" in the Monitor section. (The generated file had "#DisplaySize 290 210", commented out.) Xorg.0.log now contains

  (II) RADEON(0): EXA: Driver will not allow EXA pixmaps in VRAM
  (**) RADEON(0): Display dimensions: (285, 215) mm
  (**) RADEON(0): DPI set to (124, 124)
  (II) Loading sub module "fb"

However, xdpyinfo still says the monitor has 96 dpi, and KDE still uses small lettering.

From bug 23705, I understand that Xorg sets DPI to 96 in the default case (and strongly disagree with the decision!), but when I explicitly set the screen dimensions, you should go along with me. Adding a "--dpi" option in the KDM start-up scripts is just not right.

Note also that, as mentioned in the Launchpad bug, the vesa driver calculates nearly correct dimensions and DPI.

Created an attachment (id=35605)
Xorg log when DisplaySize is set

Created an attachment (id=35606)
xorg.conf that sets DisplaySize

This is an issue with the expected xserver behaviour rather than the driver.

> The driver did not even have support for reading edids from LCD panels
> at that time so it must have been some different behaviour in the
> xserver rather than the driver.

Appologies for the confusion; I'm sure it was getting the info from
the BIOS. It even knew that the panel was an IBM ITUX97.

If my box had that info available, it stands to reason that the
Reporter's box may as well.

(It did format the data in the logs as though it had used edid, but it
had to have used the BIOS to get it.)

Bryce Harrington (bryce) on 2010-05-21
tags: added: hardy
Bryce Harrington (bryce) on 2010-07-10
tags: added: intrepid
Changed in xorg-server:
importance: Unknown → Medium
status: Unknown → Confirmed
Maris Nartiss (maris-nartiss) wrote :

It seems that original issue is replaced with a new problem - #589485 Xorg ignores screen size and sets DPI to 96. Everyone, who's hit by 96DPI, please, move to #589485 and also add Your "mee too" to http://bugs.freedesktop.org/show_bug.cgi?id=23705 as there are no plans to fix this issue because now it's a FEATURE!

Changed in xorg-server:
importance: Medium → Unknown
Changed in xorg-server:
importance: Unknown → Medium

Achim Bohnet, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xorg-xserver REPLACE-WITH-BUG-NUMBER

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

no longer affects: xorg (Ubuntu)
Changed in xorg-server (Ubuntu):
status: Confirmed → Incomplete
tags: removed: needs-retested-on-lucid-by-june

Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please file a new report if you continue to experience issues with a current server.

Changed in xorg-server:
status: Confirmed → Invalid
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 8.10 (intrepid) reached end-of-life on April 30, 2010.
Ubuntu 8.04 (hardy) reached end-of-life on May 12, 2011.
Ubuntu 7.10 (gutsy) reached end-of-life on April 18th, 2009.
Ubuntu 7.04 (feisty) reached end-of-life on October 19, 2008.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in and change the bug status to Confirmed.

Changed in xorg-server (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.