Xorg and DPI

Hello I am having problems with my 24" Samsung monitor and opensuse 11.1. The problem is that no matter how much I try ti, I am unable to change my xorg DPI value.
xdpyinfo gives me the following

xdpyinfo | grep resolution
resolution: 90x90 dots per inch

I have configured KDE to use 120 DPI but at the present I am not happy with my fonts.

Is there an easy way to change the DPI value that Xorg uses? Any help is greatly appreciated.

I don’t think you can change the ACTUAL dpi. When you change the dpi value for the font, you only change the font matrix. At least that’s my understanding and I may, of course, be totally wrong.

Well I have trie d varius ways to change the dpi, including setting a new modeline in xorg.conf and adding -dpi argument to /usr/bin/X. But sofar nothing works, I am wondering if it has anything to do with sax2? This is rather frustrating as I have an ATI video card and nvidia users seem to have it easy, they just have to add two options to xorg.conf to get better looking fonts :slight_smile:

And which options are those? Although happy with my fonts (and I work a lot with typography and graphic design) I’d love to know what xorg.conf can do for NVIDIA owners in this respect…
But think about it: dpi means “dots per inch”. LCD monitors have effectively a fixed resolution, and of course a fixed screen area. You can, of course, change their default resolution but the image will get worse, not better, and you certainly cannot increase the effective number of dots per inch. You’re barking up the wrong tree if you want to improve the quality of your on-screen font rendering.

Have a good read here:

Optimal Use of MS TrueType Core Fonts for a KDE Desktop on SuSE
Link 1

Subpixel Hinting
Link 2

May be better to install the packages from Link 2, it helped to improve display in openSUSE 11.1 in my case.

Yes I already have truetype fonts and subpixel packages installed from opensuse community. The problem seems to be systemwide, i.e. I get good fonts in some application where I can force the dpi value, such as in firefox and opera. However my systemvide dpi is 90x90 wich is wrong for my widescreen monitor.
I have tried the following with no effect;

  1. addin .Xresources to my home directory with the “X -dpi 120” argument.

  2. Added “exec /usr/bin/X11/X -dpi 120 -nolisten tcp” to xserverrc

  3. Added -dpi 120 argument to Xservers

  4. Modyfied my xorg.conf with the options
    “UseEdidDpi” “false” and “DPI” “120 x 120”

  5. Created a custom modeline for my monitor in xorg.conf that was simply commented out after I restarted my session.

People have been complaining about the quality of fonts in opensuse and I dont understand why it seems so straightforward to change your dpi in other distro’s but it seems ti be a huge problem in opensuse :confused:

@gminnerup

The options that increase font rendering on nvidia cards are the following

Option “UseEdidDpi” “false”
Option “DPI” “120 x 120”

under the “Device” section.

This tells the system to ignore the default dpi and sets a new one, in this case 120x120. Hope this helps :slight_smile:

No it doesn’t. It tells the system to ignore the EDID values and enables you to enter the correct dpi values for your screen.

Oops, after further research I withdraw that :wink: But the term “DPI” is surely misleading here…

Try adding
Xft.dpi: 120
to your ~/.Xdefaults file.

Also, play with various hinter settings (auto-hinter, slight/medium/full hinting, etc…). Try some other fonts, maybe…

Keep in mind that 120 may not be the best DPI to render the fonts with, try adjusting that gradually.

This is going nowhere. I’ve never had to do things like this to get a monitor working. AFAIK know crappy fonts are mostly due to driver problems, i.e. driver not installed. Just pick the LCD or VESA equivalent with right resolution and it should work.
So, what’s the video card in your machine, and do you have drivers installed for it.

Yes this DPI problem is rather confusing. I am using ati proprietary drivers, version 9.9.
I tried as a last resort to set my own modeline in xorg in the monitor section, but it is automatically commented out when I restart X. I also tried to set the option “MergedDPI” “120 120” in my Device section. Adding Xft.dpi: 120
to my ~/.Xdefaults file had no effect.

xdpyinfo | grep -B1 dot still gives me the following information.

dimensions: 1680x1050 pixels (474x296 millimeters)
resolution: 90x90 dots per inch

I am beginning to think that this problem is related to sax2 or aticonfig perhaps. I will do some more tinkering and post any positive results here. I am not quite optimistic, but there has to be a way to do this on an ati card? Thank you all for all your suggestions and advise.

FWIW, I’ve seen previous attempts to fix font/dpi related issues without much success. I guess you could try adjusting the ‘DisplaySize’ entry in the xorg.conf monitor section. For horizontal and vertical values respectively

displaysize = (resolution/DPI)*25.4

where you input the native resolution and DPI values. (The display values may then differ to the real physical display size of course).

I’m not sure, but you may also need to force Xorg to ignore any reported EDID values with the following device section options as well as the addition of manual modelines etc

Option “NoDDC” “true”
Option “IgnoreEDID” “true”

Well setting Option “NoDDC” “true”,
Option “IgnoreEDID” “true” and adding unser Display
DisplaySize 356 222 # 120 DPI does nothing, that is xdpyinfo still gives 90x90 dpi :confused:

Try configuring the monitor via:

init 3

sax2 -r -m0=fglrx

Pick Change Configuration, go to Monitor properties/details, insert the disk that came with the monitor, run Utility Disk, OK, save and exit. Start X.

Nopes. No matter what I try, I can not set the dpi to a custom value. I think I have tried just about every trick I could find on google but to no avail.
I find this a rather unusual situation, the only logical conclusion I can think of now is that it has something to do with how opensuse uses sax2 to configure the system?

On Wed, 23 Sep 2009 02:56:01 GMT, gbj13
<gbj13@no-mx.forums.opensuse.org> wrote:

>
>Nopes. No matter what I try, I can not set the dpi to a custom value. I
>think I have tried just about every trick I could find on google but to
>no avail.
>I find this a rather unusual situation, the only logical conclusion I
>can think of now is that it has something to do with how opensuse uses
>sax2 to configure the system?

Gosh, after all this you still cannot figure out that the correctly
functioning drivers will not let you set the resolution to other than
physical resolution of the display device?

I’m not sure what the OP was trying to achieve, but as an experiment I edited my screen size in xorg.conf from

Section “Monitor”
Option “CalcAlgorithm” “XServerPool”
DisplaySize 331 207
HorizSync 40-60
Identifier “Monitor[0]”
ModelName “THINKPAD TFT”
Option “PreferredMode” “1280x800”
VendorName “IBM”
VertRefresh 50-65
UseModes “Modes[0]”
EndSection

to

Section “Monitor”
Option “CalcAlgorithm” “XServerPool”
DisplaySize 271 169
HorizSync 40-60
Identifier “Monitor[0]”
ModelName “THINKPAD TFT”
Option “PreferredMode” “1280x800”
VendorName “IBM”
VertRefresh 50-65
UseModes “Modes[0]”
EndSection

and then restarted the X-server. I left the display resolution (1280x800) unchanged, but this effectively changed the system-calculated from 98x98 DPI to 120x120 DPI. (The actual native DPI of my display is 98x98 DPI). The result was larger system fonts, although the icon sizes stayed the same size. This tells me that (for KDE at least), font sizes chosen depend on DPI (calculated from screen size and resolution), while icon sizes are set as absolute size.

Thank you deano_ferrari :slight_smile: I will try this as soon as I can and post the results here…hopefully with a solved tag :slight_smile:

Monitor DPI and font DPI are two different things.

For example, I use XFCE and in it there is special value, called “FONT DPI”
The same in GNOME and KDE, just change it.

On Thu, 24 Sep 2009 05:06:01 GMT, deano ferrari
<deano_ferrari@no-mx.forums.opensuse.org> wrote:

>
>I’m not sure what the OP was trying to achieve, but as an experiment I
>edited my screen size in xorg.conf from
>
>> Section “Monitor”
>> Option “CalcAlgorithm” “XServerPool”
>> DisplaySize 331 207
>> HorizSync 40-60
>> Identifier “Monitor[0]”
>> ModelName “THINKPAD TFT”
>> Option “PreferredMode” “1280x800”
>> VendorName “IBM”
>> VertRefresh 50-65
>> UseModes “Modes[0]”
>> EndSection
>
>to
>
>> Section “Monitor”
>> Option “CalcAlgorithm” “XServerPool”
>> DisplaySize 271 169
>> HorizSync 40-60
>> Identifier “Monitor[0]”
>> ModelName “THINKPAD TFT”
>> Option “PreferredMode” “1280x800”
>> VendorName “IBM”
>> VertRefresh 50-65
>> UseModes “Modes[0]”
>> EndSection
>
>and then restarted the X-server. The actual display resolution was
>unchanged, but this effectively changed the system-calculated from 98x98
>DPI to 120x120 DPI. (The actual native DPI of my display is 98x98 DPI).
>The result was larger system fonts, although the icon sizes seemed to
>stay the same.

If font size is the issue, there are ways to get to that. Don’t
clearly remember just what i did but all my system fonts are serif
now.