You are not logged in.

#1 2007-10-26 22:17:21

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

X/fglrx ignores DisplaySize [SOLVED]

Hello all,

It seems that recently Xorg/fglrx started ignoring the DisplaySize setting I have in my xorg.conf file. This is causing the font rendering to be a bit off. Previously this worked fine.

In my xorg.conf I have the following line:

Section "Monitor"
        Identifier   "Monitor0"
        DisplaySize  508        318
        Option      "DPMS" "true"
EndSection

This keeps the display at around 96 DPI for my 17" 1920x1200 display. When I am using the Xorg ATI driver,
xdpyinfo
reports the following:

screen #0:
  print screen:    no
  dimensions:    1920x1200 pixels (513x321 millimeters)
  resolution:    95x95 dots per inch

It's a bit odd that the reported dimensions don't match what I have in xorg.conf, but at least it is close and
the font rendering is OK. When I try xdpyinfo while running the proprietary ATI (fglrx) drivers, I get
the following output:

screen #0:
  print screen:    no
  dimensions:    1920x1200 pixels (403x302 millimeters)
  resolution:    121x101 dots per inch

Apparently, in addition to completely ignoring my DisplaySize setting, Xorg thinks that my monitor has a 4:3 aspect ratio.

I am running the following software:

* core/kernel26 2.6.23.1-4
* extra/fglrx 8.40.4-2

If I recall correctly this started either after the update to the 2.6.22 kernel or the update to flgrx 8.40. Has anyone else seen this problem? Does anyone have any suggestions for fixing it, other than going back to the open ATI driver?

Thanks and regards.

Last edited by jbromley (2007-10-27 21:20:41)

Offline

#2 2007-10-27 19:33:45

Trixie
Member
From: New York, N.Y.
Registered: 2007-10-27
Posts: 8

Re: X/fglrx ignores DisplaySize [SOLVED]

I had a similar problem with another distro, albeit with the radeon driver. I fixed it by adding:

1: Option "PanelSize" "1400x1050" to the /etc/X11/xorg.conf Device section

2: -dpi 124.1 to /etc/X11/GDM/custom.conf like this:

StandardXServer=/usr/bin/X -dpi 124.1
command=/usr/bin/X -audit 0· -dpi 124.1

Offline

#3 2007-10-27 21:13:40

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: X/fglrx ignores DisplaySize [SOLVED]

Thanks! The flgrx driver didn't like the PanelSize parameter, but adding the -dpi parameter to my X startup line in my slim.conf did the trick. Oddly enough, the difference in font rendering is much smaller than I thought it was.

Anyway, thanks again for the tip!
Regards.

Offline

#4 2007-10-29 12:58:38

Trixie
Member
From: New York, N.Y.
Registered: 2007-10-27
Posts: 8

Re: X/fglrx ignores DisplaySize [SOLVED]

I'm glad you have it working but I have to ask you why you have your dpi set to 96. The proper dpi for a 17" 1920x1200 monitor should be 133.

Offline

#5 2007-10-29 18:09:19

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: X/fglrx ignores DisplaySize [SOLVED]

It seems that the font rendering is slightly more clean and uniform in size if I use 96 dpi. When I use the native 133 dpi, some applications, like Opera, have miniscule fonts in spite of using a fairly standard default font like DejaVu Sans 12. Other apps like most Qt and GTK apps have huge fonts with 133 dpi. Using 96 dpi gives something more reasonable. As I do not use a DE that controls the fonts, setting DPI to 96 seems to be the best way of getting somewhat uniform sizes and fairly good font rendering. If you've got any suggestions on font sizing and rendering in general, I'd be more than willing to hear them.

Thanks again and regards.

Offline

#6 2007-10-30 19:10:41

Trixie
Member
From: New York, N.Y.
Registered: 2007-10-27
Posts: 8

Re: X/fglrx ignores DisplaySize [SOLVED]

Here are a couple of decent guides, but their info on dpi needs to be expanded on:

http://wiki.archlinux.org/index.php/XOr … figuration
http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts

A good way to see the importance of using the proper dpi is looking at a site with an onscreen ruler, like this:

http://www.dkgoodman.com/ruler.html

You will undoubtedly not see it at the correct size with your current settings. Font sizes should always be set with the right dpi, otherwise you're putting the cart before the horse. GNOME has caused much confusion on this with their Appearance control panel, where the "dpi" setting doesn't actually have anything to do with dpi.

Last edited by Trixie (2007-10-30 20:13:53)

Offline

#7 2007-10-30 20:36:45

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: X/fglrx ignores DisplaySize [SOLVED]

Trixie,

I actually agree with you. For me, I should set my screen to the proper DPI and the font rendering should take that DPI into account when rendering fonts. However, there seems to be a lot of confusion about configuring fonts. I've seen the links you posted and some others for different distros (openSUSE, Ubuntu) and many of them recommend setting the DPI to 96 dpi. Apparently, certain (MS, ahem!) fonts are designed to render best at this DPI, so many people recommend using those fonts with the 96 dpi setting. Even the Arch Linux wiki article you linked says most people "recommend/use" 96 or 100 dpi.

Oh well, it seems that font rendering (along with power management and wireless networking) is one of those areas in Linux that still needs polishing. Perhaps when XFT2 comes out things will get better. In the meantime, I'll be setting things up to the proper DPI and going from there.

One question - does fontconfig not take into account X's DPI? It seems that it should. I guess I'll have to try with a DPI setting in local.conf and then without a DPI setting to see what happens.

Thanks again and regards.

Offline

#8 2007-11-08 13:45:18

Trixie
Member
From: New York, N.Y.
Registered: 2007-10-27
Posts: 8

Re: X/fglrx ignores DisplaySize [SOLVED]

I've been running X without an xorg.conf as an experiment. Everything appears to be set up properly with the vesa driver. I have dpi set in the KDM config as well as in local.conf and it's being used. Next I'll install the radeon driver, then eventually fglrx. Eventually, we'll have to put together a proper Wiki on this. The ones I linked to were helpful in getting me on the right track bit not entirely accurate, as it turns out. The biggest complaint about Linux I hear seems to be ugly font rendering. I'm looking at my screen now and it looks as nice as any Windows or Mac display.

Last edited by Trixie (2007-11-08 14:19:13)

Offline

#9 2007-11-08 15:02:36

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: X/fglrx ignores DisplaySize [SOLVED]

jbromley wrote:

One question - does fontconfig not take into account X's DPI? It seems that it should. I guess I'll have to try with a DPI setting in local.conf and then without a DPI setting to see what happens.

Fontconfig is used together with freetype and Xft. I believe dealing with X's dpi is rather Xft job, which must be the link between freetype and X or something.
So I think that by default, Xft uses X dpi. And this can be overriden using the Xft.dpi X resource.
For example, you can put this in ~/.Xdefaults :

Xft.dpi: 96

I don't specify any dpi, neither in xorg.conf, nor in Xdefaults, and it works fine for me.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB