Results 1 to 10 of 51

Thread: HOWTO: Screen Resolution in Hoary 5.04

Threaded View

  1. #11
    Join Date
    Apr 2005
    Hardy Heron (Ubuntu Development)

    Re: HOWTO: Screen Resolution in Hoary 5.04

    Howto solve some of the resolution problems

    This HOWTO is not maintained, the current one (for Breezy Badger) is at:


    Integrated Intel graphics card?

    Problems with login screen refresh rate?

    Backup your configuration file
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

    How to edit xorg.conf file

    Run in terminal or console:
    sudo nano /etc/X11/xorg.conf
    online help in nano: ctrl+g (ctrl+x exits)

    How to edit or add HorizSync and VertRefresh lines
    Find your monitors manual (manufacturers website and Google are useful).
    Look for hozizontal sync and vertical refresh rates, also if bandwidth or maximum dot clock / pixel clock is mentioned, write it down.

    Edit xorg.conf and put correct values to your's Monitor section. Something like this:
    Section "Monitor"
        Identifier    "CM752ET"
        HorizSync     31-101
        VertRefresh    60-160
    Be sure that Identifier is same as the Monitor line in Screen section.

    Adding custom modeline
    Now, if you know what your monitor can do, for example 1024x768@75Hz (edit: choose decent resolution / refreshrate), you can open another terminal window (keep xorg.conf open in gedit) and enter:

     gtf horizontalresolution verticalresolution refreshrate
    for example:
    gtf 1024 768 75
    Copy paste the output to your Monitor section.

      # 1024x768 @ 75.00 Hz (GTF) hsync: 60.15 kHz; pclk: 81.80 MHz
      Modeline "1024x768_75.00"  81.80  1024 1080 1192 1360  768 769 772 802  -HSync +Vsync
    Watch that the hsync is in range with the HorizSync on the same section (in this example the range is 31-101 and this modelines hsync is 37.65, so we're safe). Also the VertRefresh and the refresh rate you selected (75Hz in this example) should match - in this example VertRefresh is 60-160 and modeline is 75Hz, so that's all good.

    Now you can select the defaul resolution and colordepth by tweaking the Screen section. It should look something like this:

    Section "Screen"
        Identifier    "Default Screen"
        Device        "NVIDIA Corporation NV34 [GeForce FX 5200]"
        Monitor        "CM752ET"
        DefaultDepth    16
        SubSection "Display":
            Depth        16
            Modes      "1280x1024" "1024x768"
    Monitor name here (CM752ET) matches the Identifier on your Monitor Section. Device line here matches the identifier on your Device section - you get the idea? It ties together some settings for your screen - the graphics card and your monitor. You may have more Subsections here, but only one is needed.

    Change the DefaultDepth to what you would want it to be, 16 (65536 colors) or 24 (16M colors). Change the Modes line to match the resolutions you want to use - Depth must match DefaultDepth (here it's 16).

    Save the config. If you're in X, hit CTRL+ALT+BACKSPACE to restart X (if you're running logon manager like xdm, kdm or gdm). Change between virtual consoles with CTRL + F1 F2 F3 and so on - your X should be on F7.

    Starting the X:
    startx OR sudo /etc/init.d/gdm start (in KDE it's kdm)

    If that doesn't work, try fixing the xorg.conf or get back to your original by copying the backup over your changed one with:
    sudo cp /etc/X11/xorg.conf_backup /etc/X11/xorg.conf
    When you're back in X, you can cycle through different modes by pressing CTRL+ALT++ (plus sign on numpad), or go to System->Preferences->Screen Resolution.

    How to adjust position of your screen?
    open terminal(Applications->Accessories->Terminal), run xvidtune (type: "xvidtune"), adjust the screen and hit Show-button. You'll see a line with something like this on the terminal screen:
    "1280x1024"   157.50   1280 1332 1492 1728   1024 1025 1028 1072 +hsync +vsync
    Next you should:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
    sudo gedit /etc/X11/xorg.conf
    In Monitor section, add the above line with a prefix "Modeline", like this:
    Modeline "1280x1024"   157.50   1280 1332 1492 1728   1024 1025 1028 1072 +hsync +vsync
    That should do it. There should be no need to restart X if you did make the change (hit Apply in xvidtune), but you should test that this new change works. Hit ctrl+alt+backspace to restart X. If it doesn't work, you can copy back the old configuration file using:
    sudo /etc/X11/xorg.conf_backup /etc/X11/xorg.conf
    and restart X using:
    sudo /etc/init.d/gdm start
    Where is the log file?

    How to reconfigure Xorg
    You can do the whole X configuration process by entering:
    sudo dpkg-reconfigure xserver-xorg

    Why must I set the correct screen resolution on every startup?

    How to ask help
    personally I prefer to help on these problems if the question is asked on correct forum on its own thread, it makes answering a lot easier (than trying to remember everyones nick, GPU, monitor and so on). It will also give more attention to your question as more people will read it.

    Helpful information you can add to your post when asking help on this subject
    • What are the symptoms
      • Do you get only low resolution
      • Do you get only black or distorted screen?
    • which monitor do you have?
      • make and model
      • link to specification sheet or user manual, if possible
    • which graphics card do you have?
      • chipset, amount of memory
    • some parts of /etc/X11/xorg.conf -file
      • Monitor-section
      • Device-section
      • Beginning of Screen-section (~10 lines)
    • resolution you want to use
    • attached /var/log/Xorg.0.log (compressed preferred), *NOT* INLINE
    Things to try:
    • if you're using kvm (keyboard/video/mouse-switch), try reconfiguring without
    • vesa driver instead of your graphics card specific driver
    • nv instead of nvidia
    • 16-bits colors instead of 24-colors
    • adding HorizSync and VertRefresh line in Monitor section with correct values from monitors specification
    • adding custom modeline for your monitor in Monitor section
    • reconfiguring Xorg
      • Code:
        sudo dpkg-reconfigure xserver-xorg
    Thank you!
    Last edited by heimo; October 30th, 2005 at 08:54 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts