LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Using Xubuntu 7.10 gusty, want to create own monitor section in xorg.conf (https://www.linuxquestions.org/questions/ubuntu-63/using-xubuntu-7-10-gusty-want-to-create-own-monitor-section-in-xorg-conf-626901/)

rngetter 03-09-2008 09:53 PM

Using Xubuntu 7.10 gusty, want to create own monitor section in xorg.conf
 
I'm using Xubuntu 7.10 and I would like to create my own monitor section under xorg.conf.

I will try to give as many details as possible and try to remain as organized as possible at the same time.

WHAT I WOULD LIKE TO DO AND WHY:


I'm using Xubuntu 7.10 and I would like to create my own monitor section under xorg.conf.

You're probably thinking to yourself something like, "Why doesn't he just go to Screens and Graphics and play around till he finds one that works?". Well that answer to that simply is that none of them have the DPI I require with said resolution: 1024 X 768. I cannot find a simple guide on editting my DPI. The following link seems to work for most people:

Ubuntu/Xubuntu Linux notes and tips: Ubuntu: set correct DPI for X server

Compared to how it loked before (which you'll see if you click any of the links in the History section of this post) the DPI really isn't that bad. Allow me to take you a screenshot:

http://www.geocities.com/lookin4buss...fthissucks.jpg

It's just that I have a mother who has to use this computer as well, and her eyesight isn't the greatest. It also gives her more ammunition as to why I should put Windows back on the computer and I'm sure we all know that I don't need that.

HISTORY:

I suppose you're wondering how I wound up in this predicament. Well, I installed Xubuntu 7.10 on my little brother's MPC Client Pro 345. I doubt any other details of the computer are really that important. Everything looked great on it, however, I decided to install my NVIDIA GeForce 4 MX-SE so that he could play games on his computer. I went through what I thought was a successful install untill I discovered that I could not utilize 3d accelleration for the life of me. More details really aren't that important, but if you would like to know the full story feel free to click here:

GeForce4 MX 440-SE cannot use 3d acceleration - Ubuntu Forums

which then led to:

Small text after installing NVIDIA GeForce4 MX 440-SE - Ubuntu Forums

and finally:

Cannot get my DPI set correctly!!!! - Ubuntu Forums

After I finally got the driver to install correctly with 3d acceleration an option what I thought was that hmmm the system font is now way too small, however, everyone keeps telling me that its actually my DPI that is too small. Thus, the quest for the ability to reset my DPI and discover what I should set it at has begun, and I've since decided that writing my own "driver" or "monitor section" in xorg.conf would be a lot easier.

MY UNDERSTANDING OF THE DPI GUIDES:

The following guide seems to be working for most people:

Howto: Fix Xfce fonts « Xubuntu Blog

I followed it with out an issue until I got to the thid step which is a link to another guide:

Ubuntu/Xubuntu Linux notes and tips: Ubuntu: set correct DPI for X server

Let's try to follow my thoughts as I followed this guide:

First off, it said there was a screenshot for an example.... either I've got a browser issue or there isn't one at all... no worries, let's continue.

Okay, paste a specific command at the end of mousepad ~/.config/xfce4/Xft.xrdb? You got it! Save, exit.

Step two, add a couple more commands under the "files section of my /etc/X11/xorg.conf. You got it! I already got familiar with this file do to the trials and tribulations of my graphics card endeavours. Save, exit.

Step three, Configure my DPI settings in /etc/X11/xorg.conf? .... hmmm well no one told me where that was, and I can't seem to find "DPI" when I search the file.... okay here's a link to another guide... perhaps this one will actually do something!

Okay so I can use

Code:

xdpyinfo | grep resolution
and

Code:

xrdb -query
to get current DPI value.

Oh can I?

Fine, first one gave me:
Code:

resolution:    80x80 dots per inch
(actually the first time I did this it gave me 50X50 I suppose when I messed around with Screens and Graphics it changed that, for a report of what my Monitor section looked prior to messing with Screens and Graphics, you can either check my past threads or scroll on down to the "WHAT I DO KNOW:" section.)

is that my DPI? I suppose dots per inch would stand for that... so how do I know what DPI I'm supposed to use? What is that default setting that looked so good on the other computers I've put Ubuntu and Xubuntu on? Too bad I don't have any of them readily available.

The next command, lets see what that gives us:

The first time I did it all it gave me was

Code:

*customization: -color
Due to some steps that are soon to come up mine now says:


Code:

*customization: -color
Xft:    dpi: 96

Then it says:

To change DPI values create a file ~/.Xresources or edit ~/.config/xfce4/Xft.xrdb

Okay I created Xresources... logged out logged back in... nothing... still the same

Lets edit Xft.xrdb

okay lets open it to edit it

okay the contents are:


Code:

Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: none

Yeah, like I really know what to do with that.

Then it said to try adding this to the monitor section of my xorg.conf

Code:

DisplaySize XXX XXX (in my case it's 270 203)
The formula it gives to figure out what XXX XXX is:

XXX is calculated by using formula 25.4 * pixels (height or width) / DPI.

I have absolutely no clue how to find how many pixels 323mm or 245mm is, I googled around and found several different explanations as to how to find it with all different results so I can't finish the equation.

The last thing says:

Note: X Window System has it's own DPI value set in /etc/X11/xorg.conf

Well, we already know I can't find a DPI section anywhere in xorg.conf, so that's out of the question.

...this guide sucks.

WHAT I DO KNOW:

Here are my monitor's stats.

To be breif, it is a MPC CM720F 17" Flat CRT OSD Monitor (98kHz) Dark.

To be more detailed:

MPC Computers Support Site

or

Part no.: MNN001193-00
Automatic Recovery Time -- Off/Sleep Mode: < 10 Seconds
CRT Dot Pitch: (Diagonal) 0.25 mm
CRT Size: 17in (16.0in Viewable)
CRT Technology: Invar Shadow Mask Flat Color CRT
Maximum Resolution: 1600 x 1200
Number of Display Colors: True Color - 16.7 million colors
Physical Dimensions (H x W x D): 402 x 410 x 420mm
Power Consumption -- Normal Operation: < 120 Watts typical (Green LED)
Power Consumption -- Off/Sleep Mode: < 5 Watts (Orange LED)
Scanning Frequency -- Horizontal: 30 - 98 kHz
Scanning Frequency -- Vertical: 50 - 160 Hz
Scanning Frequency: Maximum Pixel Clock: 202.5 MHz
Signal Connector Cable: Black Captive cable with DB-15 Type video connector (Blue - Pantone #661C)
Signal interface: Analog
Weight (Kg): 21.0 Kgs

While following the guide I have measured the area of the computer screen in mm which comes to:

323 X 245

Here is what the monitor section of my xorg.conf looks like now:

Code:

Section "Monitor"
        Identifier        "Failsafe Monitor"
        Vendorname        "Generic CRT Display"
        Modelname        "Monitor 1024x768"
        Horizsync        31.5-61.0
        Vertrefresh        50-75
  modeline  "640x480@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync
  modeline  "640x480@72" 31.5 640 664 704 832 480 489 491 520 -vsync -hsync
  modeline  "640x480@75" 31.5 640 656 720 840 480 481 484 500 -vsync -hsync
  modeline  "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
  modeline  "800x600@72" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
  modeline  "800x600@75" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
  modeline  "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
  modeline  "832x624@75" 57.284 832 864 928 1152 624 625 628 667 -vsync -hsync
  modeline  "1024x768@75" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
  modeline  "1024x768@70" 75.0 1024 1048 1184 1328 768 771 777 806 -vsync -hsync
  modeline  "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync
  modeline  "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
        Gamma        1.0
EndSection

Here is what it looked like before I messed around with Screens and Graphics:

Code:

Section "Monitor"
    Identifier    "Failsafe Monitor"
    VendorName    "Plug 'n' Play"
    ModelName      "Plug 'n' Play"
    Gamma          1
    ModeLine      "640x480@60" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync
    ModeLine      "640x480@72" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync
    ModeLine      "640x480@75" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
    ModeLine      "640x480@85" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
    ModeLine      "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
    ModeLine      "800x600@72" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
    ModeLine      "800x600@75" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
    ModeLine      "800x600@85" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync
    ModeLine      "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
    ModeLine      "832x624@75" 57.3 832 864 928 1152 624 625 628 667 -hsync -vsync
    ModeLine      "1024x768@85" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync
    ModeLine      "1024x768@75" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
    ModeLine      "1024x768@70" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync
    ModeLine      "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
    ModeLine      "1024x768@43" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync interlace
    ModeLine      "1152x864@75" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
    ModeLine      "1280x1024@75" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
    ModeLine      "1280x960@60" 102.1 1280 1360 1496 1712 960 961 964 994 -hsync +vsync
    ModeLine      "1280x960@85" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync
    ModeLine      "1280x1024@85" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync
    ModeLine      "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
    ModeLine      "1280x960@75" 129.9 1280 1368 1504 1728 960 961 964 1002 -hsync +vsync
    ModeLine      "1400x1050@60" 122.6 1400 1488 1640 1880 1050 1051 1054 1087 -hsync +vsync
    ModeLine      "1400x1050@75" 155.8 1400 1496 1648 1896 1050 1051 1054 1096 -hsync +vsync
    ModeLine      "1600x1200@65" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
    ModeLine      "1600x1200@60" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
    ModeLine      "1600x1200@75" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
    ModeLine      "1600x1200@70" 189.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync
    ModeLine      "1792x1344@60" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync
    ModeLine      "1856x1392@60" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync
    ModeLine      "1920x1440@60" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync
    ModeLine      "2048x1536@60" 266.9 2048 2200 2424 2800 1536 1537 1540 1589 -hsync +vsync
EndSection

If anyone needs anymore detail please feel free to ask, I'm not sure what else I can tell you.

jolphil 03-10-2008 07:48 AM

Wow.. You sure get an award for trying..
First thing I would do is make a backup of your working xorg.conf file..just in case you can always get it back again.. to backup do a
cp(present xorg.conf xorg.conf.backup)
Second is just a suggestion but I would set both the horizontal and vertical frequencies much higher but do not exceed mfgr. specs.. That should allow better DPI's after tweaking more..Thats about all i can suggest for now..I will look around for more info..I know i stored it somewhere..
goodluck:twocents:
jolphil
EDIT: I just looked up the helper package for getting a correct modeline
by installing my KUBUNTU not exactly the same as your xbuntu but try as root
say "gtf 1024 768 75" no quotes and see if it comes up with a modeline note the pixel clock required and see if both you graphics card and monitor will support it.. You may want to google gtf and see how best how to use it to help your situation

cmnorton 03-10-2008 01:01 PM

Helpful post
 
http://ubuntuforums.org/showthread.php?t=718103

hex1a4 03-10-2008 07:04 PM

To set the correct DPI:

Calculate the proper screen size like so:

25.4 * screen_width / 96 = w (rounded down)
25.4 * screen_height / 96 = h (rounded down)

Set DisplaySize in "Monitor" section in your /etc/X11/xorg.conf to w h as calculated above.

Set the following options in your "Screen" section:

Option "UseEdidDpi" "false"
Option "DPI" "96 x 96"

"UseEdidDpi" MUST be set above "DPI"

Restart X

sudo /etc/init.d/gdm restart

johnsfine 03-10-2008 08:23 PM

Look in /var/log/Xorg.0.conf to see what dpi it is selecting and maybe where it is coming from.

I tried many of the ways of specifying the dpi in xorg.conf and none of them made any difference. I forget now how I finally figured out where my DPI was coming from. It wasn't easy to find. When I read this thread, I was very upset with myself, because I had figured it out, and set it the way I wanted and totally forgot how. I should have left myself a note somewhere.

Anyway, I did a grep through my whole disk and found it.

I'm using the Mepis distribution. IIUC, the way dpi is set on my system is something set up by Mepis. In some other distribution it may be done some other way.

The line I edited when I first figured this out (that I just found with GREP) now says
Code:

ServerArgsLocal=-dpi 82 -nolisten tcp
That used to be a 96 instead of 82. I have a very big LCD for which 82 is correct.
It is in the section [X-:*-Core] of the file /etc/kde3/kdm/kdmrc

Quote:

Originally Posted by rngetter (Post 3083570)
none of them have the DPI I require with said resolution: 1024 X 768.

Quote:

CRT Technology: Invar Shadow Mask Flat Color CRT
Maximum Resolution: 1600 x 1200
I think 1024 may look pretty bad even after you get the dpi correct. It certainly would take a lot of effort to get the fonts decent in low res.

If I understand correctly, you really want things to display larger, rather than low res.

Not everything obeys dpi, so some things will be smaller at higher res. But most of that should be manageable with a few program specific tweaks and give much better results than trying to make the fonts look decent at 1024x768

Once you figure out how to control dpi, you just need to intentionally give it a wrong dpi. Set the resolution much higher than 1024x768, maybe all the way to 1600x1200. Then make the dpi number higher than the correct value (if you use 1600x1200 probably you'll want dpi 1.5 times the correct value). That should give you many more dots per character at standard point sizes and a much more readable display.

Quote:

16.0in Viewable
A 16.0 in diagonal in a 4:3 CRT means the viewable area is 16*4/5 = 12.8 in wide
1024 pixels in 12.8 inches would be 80 dpi (most fonts look terrible at 80 dpi).
1600 pixels in 12.8 inches would be 125 dpi. The fonts would look a lot better, but still be too small.
1600 pixels in 12.8 inches with fonts magnified by 1.5 would be 188 dpi. Try it. See what things look like. You'll probably need to tweak a few icon and font config choices but I bet that's less effort than fixing the fonts for 1024x768.


All times are GMT -5. The time now is 11:10 AM.