Настройка Xorg

Сохраните ваш конфигурационный файл

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

Помните, что автоопределение устройств желательно проводить при незапущенном Xorg.

Остановите Xorg

sudo invoke-rc.d gdm stop (или kdm, если у вас KDE)

Запустите процесс автонастройки Xorg

sudo dpkg-reconfigure xserver-xorg

Запустите Gnome/KDE

sudo invoke-rc.d gdm start (or kdm for KDE)

Как отредактировать конфигурационный файл (xorg.conf) вручную

Запустите в терминале или консоли:

sudo nano /etc/X11/xorg.conf

Вызов справки в nano: Ctrl+g (Ctrl+x выход)

Где находится файл журнала, как произвести отладку? File:


содержит массу бесценной отладочной информации о том, что происходит, когда запускается Xorg. Найдите строки, содержащие EE (errors) и WW (warnings).

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 xconf.org'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 If you know what your monitor can do, for example 1024x768@75Hz, you can use this page to generate a custom Modeline for you xorg.conf:

  • online modeline generator

Copy paste the new Modeline to Monitor section (for example):

 # 1024x768 @ 75.00 Hz (GTF) hsync: 60.15 kHz; pclk: 81.80 MHzModeline "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 60.15, 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 default 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      "1024x768_75.00"

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 nano /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

Problems? Things to try:

  • Check notes concerning your video card in Ubuntu wiki https://wiki.ubuntu.com/HardwareSupp...entsVideoCards

  • Check BIOS settings - eg. amount of shared memory
  • Add to your monitor section line
    • Code: Option "DDC" "False"
  • if you're using kvm (keyboard/video/mouse-switch), try reconfiguring without
  • try vesa driver instead of your graphics card specific driver
  • try nv instead of nvidia
  • try ati instead of fglrx
  • try intel instead of i810
  • try 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
    • o
      •             sudo dpkg-reconfigure xserver-xorg
  • if you have Intel graphics chip, try installing 855resolution
  • if having problems to get very high resolution working with nvidia drivers, try adding some or all of these at your own risk (some of these may be driver specific - check other documentation before using)
  • Which driver should I use? Is my card supported? See list of supported cards / chipsets.
  • Advanced X11 configuration in FreeBSD handbook
  • If you're using nvidia driver, try gksudo nvidia-settings
  • Try booting from Live-CD, if that works, copy /etc/X11/xorg.conf from there

Check FixVideoResolutionHowto https://wiki.ubuntu.com/FixVideoResolutionHowto https://wiki.ubuntu.com/DebuggingXAutoconfiguration https://help.ubuntu.com/community/Fi...esolutionHowto

Miscellaneous resources (may contain outdated information)

Integrated Intel graphics card? http://ubuntuforums.org/showthread.php?t=24923 (855resolution, hoary) http://www.x.org/X11R6.8.2/doc/i810.html

Laptop with Intel graphics and widescreen http://ubuntuforums.org/showthread.php?t=351647

Useful command line tools

  • xresprobe [driver=vesa,ati,nv,nvidia,i810]
  • ddcprobe

Why must I set the correct screen resolution on every startup? http://www.ubuntuforums.org/showpost...55&postcount=5

Online modeline generators: http://sh.nu/nvidia/gtf.php http://www.dkfz-heidelberg.de/spec/linux/modeline/ http://xtiming.sourceforge.net/cgi-bin/xtiming.pl http://koala.ilog.fr/cgi-bin/nph-colas-modelines http://zaph.com/Modeline/

Complete xorg.conf files: http://aleks.vigio.pl/

What all those options do? http://xorg.freedesktop.org/archive/...rg.conf.5.html

Some random links I may need to sort later (mainly about setting widescreen resolution): https://bugs.launchpad.net/ubuntu/+s...org/+bug/67369 http://gentoo-wiki.com/HOWTO_Widescr...lutions_(WSXGA) http://thoughtworker.in/2007/04/24/k...ht-resolution/ https://bugs.launchpad.net/ubuntu/+s...69/comments/21

RussianDocumentation/Xorg (last edited 2008-08-06 16:15:27 by localhost)