Revision 57 as of 2009-09-23 23:43:40

Clear message

Graphics Cards

PCs can have many different video card manufacturers and models, just as cars can have many different types of makes and models. There are primarily two large video card manufacturers, ATI and nVidia along with Intel following closely. For the most part, ATI, nVidia and Intel drivers are very simple and fast to install.

Quick Links to the Binary Driver Installation Guides:

For additional troubleshooting resources, please also see the Ubuntu X Team wiki

Xorg.conf

The xorg.conf file is the configuration file for your input devices and output devices such as video cards and monitors, as well as mice, keyboards, and tablets. This section focuses on the video card and monitor set-up.

The X configuration file can be found at /etc/X11/xorg.conf. You can back it up:

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

To revert to the backup you simply reverse the order like this;

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

Before you start modifying your xorg.conf file it is strongly suggested you print out this page. While care is taken by your fellow user to ensure that everything will work, it is more often than not likely the case. Things do go wrong as you try to optimise your graphics driver and monitors.

Also it helps if you become familiar with <ctrl>+<alt>+F1 key combinations. F1 to F6 are full screen terminals like the old terminals. F7 is the first x-window, F8 is the second, F9 the third, etc. If you press <ctrl>+<alt>+F1 to F6 you will go into a terminal screen and then if you press <ctrl>+<alt>+F7 you will return to your graphical user interface. So when you restart your machine you will be able to recover quickly by simply restoring your xorg.conf file. Another good idea is to perform the two above copy command before you modify xorg.conf. That way the commands will be in your terminal history. You can then simply press up arrow on your keyboard to recover the key combinations.

If you have changed your xorg.conf file before having backed up and are experience problems, you can copy the /etc/X11/xorg.conf from the Ubuntu LiveCD to your hard disk /etc/X11/xorg.conf file (before this, backup the file as described before).

If reverting back to the original xorg.conf file does not work for whatever reason and you are stuck in the terminal, you can execute the following command:

sudo dpkg-reconfigure -phigh xserver-xorg 

This will reconfigure your X server. Note: This will overwrite your current xorg.conf file.

Before you start modifying xorg.conf

It is important to know what the capabilities of your hardware is before you start. It is a good idea to find out maximum resolution, vertical and horizontal sync ranges and have them close at hand for both the monitor and video card. Without that information it will be difficult to configure your hardware correctly.

Monitors running at low resolution

Often if your running CRT monitors you find that the video card only seems to have options to display in low resolution mode. The trick to this is being able to edit the xorg.conf file in low resolution mode. There are two ways this can be done. Either in one of the terminal text editors or in the GUI (graphical user interface). You can use programs like vi, pico, with a command line like for terminal;

sudo vi /etc/X11/xorg.conf

If you not familiar with vi or pico the you could use a GUI like this;

gksu gedit /etc/X11/xorg.conf

Remember if the editor window is too large in the GUI you can hold down the <alt>+Button1 on your mouse to move the window about.

The method shown here is not foolproof. Configuring xorg.conf can be very tricky. But starting with the simplest method is sometimes the best. The first approach is to look for and modify a line that looks like one of these

Option         "metamodes" "CRT-0: nvidia-auto-select

or

Option         "metamodes" "CRT-0: 800x600

and change it to something that looks like this;

Option         "metamodes" "CRT-0: 1600x1200

You should aim to only go up one resolution step at a time and be prepared to use the <ctrl>+<alt>+F1 key combination. It is not a good idea to drive a monitor out of range for too long, it may cause permanent damage.

There are other approaches to that require substantial editing and understanding of xorg.conf files formats. A search of the Ubuntu forums first for similiar examples and then the linux forums may yield results.

Twin View or Duel Head displays

The approach to getting Twin view or two monitors working in Ubuntu is much the same as getting a low resolution monitor working as described above.

The first step to to enable the proprietary drivers and getting them to work. Once you have the driver working you need to try and enable the second monitor. So long as you can enable the second monitor you have an easier chance of getting the second monitor working. (Note:- Different video manufactures have different ways of enabling the second monitors and detailed information will be presented for each proprietary driver at some later date here.)

Like in the single monitor you are looking for a line in the xorg.conf file that looks something like this;

 Option         "metamodes" "CRT-0: nvidia-auto-select +1280+0, CRT-1: 1280x1024 +0+0"

which could be changed to this;

 Option         "metamodes" "CRT-0: nvidia-auto-select +1600+0, CRT-1: 1600x1200 +0+0"

What is interesting about this approach is that it seems to activate all the other resolutions as well.

You may also need to add other sections to your xorg.conf file such as this example;

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "STAC Electronics  Sampo Tech.KM-800U"
    HorizSync       30.0 - 95.0
    VertRefresh     50.0 - 160.0
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Sony"
    ModelName      "MultscanG400"
    HorizSync       30.0 - 107.0
    VertRefresh     48.0 - 120.0
EndSection

It can be frustrating to configure xorg.conf because there is little information and each linux distro video card manufacture handles xorg.conf files sightly differently.

Video Card Driver Types

There are two types of drivers that we can use: Open Source and Proprietary drivers. Open Source drivers have been created by the Linux community to function with certain video cards, and most video cards have an Open Source driver available. These types of drivers are usually licensed with the GPL and we can use these drivers freely. The advantages of using the Open Source drivers are that they are community supported and bugs can be fixed by the community programmers. The disadvantages are that the Open Source drivers sometimes do not provide full support for all of the video card's features.

Proprietary drivers are drivers written by the manufacturer. The Ubuntu development community has no access to the source code, so cannot fix bugs in these drivers. Users are allowed to use these drivers if they agree to the licensing terms. The advantages of using the Proprietary drivers are that they have been written by the manufacturer of the video card and they sometimes implement a larger set of features for the graphics card. The disadvantages are that bug fixes are usually slow and the drivers may have broken/not-fully-implemented features.

Some video cards may require the proprietary drivers, even though these drivers are not part of the open source community and cannot be fixed by open source software developers. If you encounter bugs with these closed-source drivers, developers will not be willing or even able to assist you in resolving your issues. These are the drivers that you use at your own risk.

If this is your first time here and you already know the information above along with your graphic card information, then you may skip the next section.

How do I determine my Video Card manufacturer and model?

To determine your video card manufacturer, execute the following in the console or a terminal window:

lspci | grep VGA

This will return information about the video card such as its manufacturer, model and revision number. Example:

tripp@eclipse-desktop:~$ lspci | grep VGA
02:00.0 VGA compatible controller: ATI Technologies Inc RV350 AR [Radeon 9600]

From this line we can see that ATI Technologies is the video card manufacturer and that Radeon 9600 is the video card model. With this information, we can determine next step we need to take.

Video Card Manufacturers

ATI

nVidia

Matrox

Via

Sis

  • Silicon Integrated Systems (SiS) and XGI Volari are supported by an open-source video driver available in Ubuntu. Do not use proprietary drivers which are outdated. More information is available from the developer.

Trident Microsystems

Webcams

  • Webcam - Guides on installing and managing Webcams.

Ports

Firewire (IEEE1394)

  • Firewire - Hardware, drivers and software for getting ieee1394 (Firewire) to work

TV-cards

DVB

Help!

If you have a question that is unanswered, please visit the Ubuntu Forums and feel free ask questions! Try some of the following threads:

  • Beginner Talk - Where you can ask any kind of question.

  • Hardware & Laptops - Where you can see if your video card/hardware is supported. On this thread, you can ask questions about installations of video cards/hardware that are not mentioned here. Please refer to this section while in discussion on the forum so that this page may be updated if needed.

A note on the different types of drivers available for ATI cards

At present, there are two types of drivers available for ATI graphics cards.

1) The community-maintained open source xserver-xorg-video-ati or xserver-xorg-video-ati driver (sometimes referred to as "radeon")

and

2) The proprietary (closed source) driver from ATI themselves (referred to as fglrx).

There are several pros and cons for each type of driver. The most prominent are that the fglrx driver supports better 3D and OpenGL, as well as better Hardware processing as it is developed by the ATI engineers themselves and often has better features. It also supports Xinerama for dual-screen setups. On the other hand, the open-source driver supports older graphics cards, and is open source for those wanting a complete "free" system. It supports limited 3D, but full 2D acceleration and is suitable for most people, and some argue that it has better dual screen support that ATI fglrx drivers - although in recent driver versions (Catalyst 9.5 and above), ATI have made many bug fixes that address dual screen issues in previous versions.

With that in mind, there are presently FOUR ways to install these drivers:

1) By default on a fresh install of Ubuntu, the open source "radeon" driver is installed. This provides 2D acceleration and limited 3D acceleration for newer cards. In Synaptic Package Manager, this driver is called "xserver-xorg-video-ati" or "xserver-xorg-video-radeon".

2) In "Hardware Drivers" (found in System > Administration), Ubuntu will suggest an often OLDER version of the proprietary drivers to install. These are not the latest drivers from ATI, as they have been tested by Ubuntu developers which takes time. These drivers are often quite reliable and very easy to install, but will not provide the cutting edge new features and bug fixes from ATI. They are automatically updated with Update Manager, but updates for this driver infrequently come out. At the moment, it is not possible to see what version of Catalyst drivers are being installed by Hardware Drivers until after you install them... making it difficult to compare with the ones available on ATI's site.

3) The fglrx drivers can also be installed/uninstalled in Synaptic Package Manager. The relevant packages are:

xorg-driver-fglrx fglrx-amdcccle

This installs the fglrx driver and the Catalyst Control Center. As in 2), it is not possible to see what version of the Catalyst drivers are being installed until after you install them (and then you can run fglrxinfo in a terminal window to check, or go to the Catalyst Control Center). These drivers share the same properties as the ones in 2). PLEASE NOTE: If you install the open source drivers, you do NOT need these drivers installed. Also, If you install the drivers from the ATI website (4), then you do NOT need these drivers installed. This prevents unnecessary conflict of drivers.

4) The final way to get drivers is from the ATI website (www.ati.amd.com). These are the most recent and full-featured drivers, but are also the most complicated to install, are not fully tested by the Ubuntu developers, and are not automatically updated by Ubuntu. These drivers are released once a month, with the current release being Catalyst 9.10 (as at October 2009). From Ubuntu Karmic Koala, the 9.10 drivers are INCLUDED, so the drivers available in numbers 2) and 3) will be the latest Catalyst drivers. Please note these will get out-of-date over time until the next Ubuntu release, in April 2010. Please see the binary HowTo to get the ATI drivers installed. Here is a quick guide on how to install/upgrade the proprietary drivers from ATI:

Open a terminal window and issue these commands:

First, uninstall the old ATI drivers:

cd /usr/share/ati/
sudo sh ./fglrx-installer.sh
cd ~
sudo rm -rf /etc/ati/
sudo apt-get remove -purge xorg-driver-fglrx fglrx-amdcccle

Change the ownership of the installer downloaded from ATI and run the installer. This presumes you downloaded to your HOME directory. Please remember to change the filename depending on driver version.

sudo chmod +x ati-driver-installer-9-9-x86.x86_64.run
sudo sh ati-driver-installer-9-9-x86.x86_64.run

Now, reconfigure the xorg.conf file (READ: DON'T DO THIS IF YOU HAVE A SPECIAL SETUP, eg. DUAL MONITORS.) The backup is created automatically.

sudo aticonfig --initial -f

Then reboot your computer:

sudo reboot now

Your computer should boot up with the new drivers. To check what version you have, either run the Catalyst Control Center (if it is not in the Application menu, right click and go "edit menus" and check the option to display it), or you can run this:

fglrxinfo

NOTE: If your computer does not boot when you have upgrade drivers, press escape at the GRUB bootloader, then choose "recovery mode" for your latest kernel. Drop down to "root shell" and then run the uninstaller instructions listed above to remove the ATI driver.

Then run this to restore your xorg.conf file to default:

sudo dpkg-reconfigure -phigh xserver-xorg

The computer should boot now using the open source "radeon" drivers, (it is important to keep these installed for a backup for this exact reason). If it doesn't boot with the radeon drivers automatically, go:

nano /etc/X11/xorg.conf

Where it says "Device" you want to type "radeon" or "ati" in the "Driver" field, so it looks like this:

Section "Device"
        Driver      "radeon"
EndSection

Once you have booted back into Ubuntu, revert to an older version of the fglrx drivers, or continue to use the open source drivers if you like.


CategoryHardware CategoryX

(i) Video is part of the UserDocumentation series of index pages. Please read the WikiGuide prior to making changes.