Side note about wrong monitor size [was Re: New monitor, pink vertical line ...]

Dave Witbrodt dawitbro at sbcglobal.net
Mon Mar 1 19:03:19 PST 2010


Alex Deucher wrote:
[...]
>>> Apparently 'xdpyinfo' has a mind of its own!  ;)
>> Culprit is something in 'radeon':
>>
>> # grep 'Image Size:' /var/log/Xorg.0.log | uniq
>> (II) RADEON(0): clock: 154.0 MHz   Image Size:  593 x 371 mm
>>
> 
> This is from the edid.
> 
>> # grep 'screen physical' /var/log/Xorg.0.log
>> (II) RADEON(0): Setting screen physical size to 508 x 317
> 
> This is from the xserver.  The display size is all handled in the
> xserver rather than the driver.  All the driver does is pass the edid
> along.  Recent xservers default to 96 dpi.

Funny you should say that!  The HDMI cable arrived in the mail today. 
When I got home from work, I replaced the DVI-to-HDMI converter cable 
and booted.  I currently have the HD 4850 installed, but will give the 
HD 5750 a try after sending this message.

When radeondrmfb came up, no pink line.  (That is as expected:  the HD 
4850 works fine with any connector cable I use, including VGA-Dsub-KVM.) 
  When X came up, the screen was using the correct resolution 
(1920x1200, according to monitor OSD info), but the fonts were all Bad 
and Wrong.

Here is a further clue:

     $ xdpyinfo | grep -A 2 "screen #0"
     screen #0:
       dimensions:    1920x1200 pixels (593x371 millimeters)
       resolution:    82x82 dots per inch

The behavior of my X server with respect to screen size settings altered 
with the new cable!  None of the installed software has changed since my 
earlier posts which were quoted above, nor have any of the config files.

In the previous Xorg.0.log, "radeon" was setting the DPI to 82 (which is 
correct for my monitor:  82.3 dots/in):

     (**) RADEON(0): DPI set to (82, 82)

For reasons I don't understand the physical size of the monitor was 
being altered when I used the DVI-to-HDMI cable, and now that I am using 
a real HDMI cable the server is _not_ altering the physical size 
settings.  Is this a bug in the X server?

I have attached a diff file showing what changed in Xorg.0.log when I 
used the HDMI cable for the first time tonight.


I believe that the X server defaults you mention are not built into the 
source code, but instead are enforced by the various distributions.  As 
I learn things about Linux, I keep a repository of text files with 
voluminous notes; here is the contents of one file I have written, which 
explains what I learned about DPI settings on Debian:

     DPI issues.txt
     ==============

     I found that default configurations in packages for X in Debian
     force the DPI settings to 100 dpi instead of allowing the server to
     calculate a more accurate figure according to the system's
     characteristics.  Historically, this made sense.  But modern X
     servers now have the ability to deal with DPI reliably over a wide
     range of settings.

     No changes to /etc/X11/xorg.conf would allow accurate DPI settings
     to be used by the X server, and 100 dpi was selected instead.
     Defeating the forced-100 dpi setting involved 2 files:

       xinit:  /etc/X11/xinit/xserverrc

       # diff xserverrc.orig xserverrc
       5c5
       < exec /usr/bin/X11/X -dpi 100 -nolisten tcp
       ---
       > exec /usr/bin/X11/X -nolisten tcp


       xdm:  /etc/X11/xdm/Xservers

       # diff -s Xservers.orig Xservers
       35c35
       < :0 local /usr/bin/X vt7 -dpi 100 -nolisten tcp
       ---
       > :0 local /usr/bin/X vt7 -nolisten tcp

This text file was written several years ago.  As I look at it now, I 
think I probably changed one file, had no luck, changed the other file, 
and when it worked concluded (mistakenly) that both files had to be 
changed.  I am not going to take the time to test it out right now, but 
I imagine that only one of those files (I use XDM, so probably the 
second file) had to be edited to defeat the Debian-enforced 100 DPI setting.

Since that time, I have expected my X software to adjust to my hardware, 
and not enforce arbitrary settings.

I'll see what happens with the HD 5750 now.  I will probably _not_ keep 
the HD 5750 installed -- I rather prefer the acceleration I get with the 
HD 4850 -- but as new Evergreen code appears in the DRM, the "radeon" 
driver, or [someday] Mesa, I will swap cards and test it.  I watch LKML, 
Phoronix, and the git repos for DRM, xf86-video-ati, and mesa each day. 
  Someday I'll _want_ to leave the HD 5750 installed!  The sooner the 
better....)


Thanks Alex,
Dave W.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HD4850.DVI-to-HDMI.HDMI-only.Xorg.0.log.diff
Type: text/x-patch
Size: 9810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-driver-ati/attachments/20100301/5730b7f3/attachment.bin>


More information about the xorg-driver-ati mailing list