Video Card Driver Types
- This guide and its subpages describe the driver situation in ubuntu and how to install proprietary binary/restricted drivers where open source drivers are not available.
Please note 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. In addition, older hardware is typically better supported by Open Source drivers. In some cases, there is no proprietary driver for the graphics card (such as non-HD Radeons) and installing such a driver will only prevent the Open Source driver from functioning correctly.
- 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. This is changing however, with the advent of gallium implementations.
If you encounter bugs with these closed-source drivers, developers will not be able or even willing to assist you in resolving your issues. Use at your own risk.
To determine your video card make and model, run this command from terminal:
lspci | grep VGA
More detailed information can be found by running
sudo lshw -C video
For a list of supported video cards, please see https://wiki.ubuntu.com/HardwareSupportComponentsVideoCards.
Basic Installation Instructions
The easiest way to install binary drivers is to use the built in Hardware Drivers manager in Ubuntu.
In Ubuntu 10.04 and 9:10 this is found under System->Administration->Hardware Drivers.
Note:In Ubuntu 10:10 Hardware Drivers is now named Additional Drivers
More Detailed Installation Instructions
Here are some useful links and related pages.
Ubuntu Forums - Ask your questions here.
BinaryDriverHowto/DynamicMultiMonitor - How to dynamically set multiple monitor resolution.
If you have a Matrox based video card, you can also try the pages at the Unofficial Matrox Technical Support Forum
NvidiaManual - How to manually install the NVIDIA restricted drivers
Radeon_9200/9250_(RV280)_and_DVI - How to get DVI output working with ATI RV280 series video cards
Nvidia - How to install both the latest driver and the one in the repositories (also includes a detailed Problems Section)
Nvidia Troubleshooting - How to solve OpenGL Problems with NVIDIA Drivers
Nvidia TV Out - View X simultaneously on your monitor and TV
Nvidia manual drivers installation - How to install the Nvidia accelerated drivers without apt
Multiple monitors with NVIDIA - how to enable dual screens with the NVIDIA driver
For additional troubleshooting resources, please also see the Ubuntu X Team wiki
The xorg.conf.d directory (or xorg.conf file for older versions of Ubuntu) is the place that stores the configuration information 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.
In Ubuntu, the X configuration directory can be found at /usr/lib/X11/xorg.conf.d. Many of the configurations settings in use aren't explicitly set by the files in this directory, but are rather hard-coded into the system. If you want to generate an old-style xorg.conf, you can boot into recovery mode, select root shell, and do:
X -configure cp /root/xorg.conf.new /etc/X11/xorg.conf
In older versions of Ubuntu (through 9.10), the xorg.conf configuration file can be found in the /etc/X11 directory.
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.d directory or 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 optimize your graphics driver and monitors.
Also it helps if you become familiar with <ctrl>+<alt>+F1 and similar key combinations. In older versions of Ubuntu, F1 to F6 were full screen terminals like the old terminals. F7 was the first x-window, F8 the second, F9 the third, etc. If you pressed <ctrl>+<alt>+F1 to F6 you would go into a terminal screen and then if you were to press <ctrl>+<alt>+F7 you would return to your graphical user interface. In newer versions of Ubuntu, <ctrl>+<alt>=F3 now takes you back to your graphical user interface.
The information below was written about pre-9.10 versions of Ubuntu, but can be analogous information for newer versions still applies:
When you restart your machine you should 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. This command will not function in Ubuntu 9.10 (Karmic Koala) due to bug #474455.
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 (left button) 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
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 similar examples and then the linux forums may yield results.
Twin View or Dual Head displays
Try using the GUI found in System->Preferences->Monitors, or for NVIDIA users check the solutions found in NvidiaMultiMonitors before you use the following approach. Most users will not need to edit xorg.conf in order to use multiple monitors.
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 is 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.
How to recover a non-booting system due to driver malfunction
If your computer does not boot when you have upgraded drivers, press escape at the GRUB bootloader, then choose "recovery mode" for your latest kernel. Drop down to "root shell" and then run the ATI uninstaller:
NOTE: Please, please, please be careful with the "rm -rf" command - if you get this wrong, it could break your system!! Proceed with caution.
cd /usr/share/ati/ sh ./fglrx-uninstall.sh cd ~ rm -rf /etc/ati/ apt-get remove -purge xorg-driver-fglrx fglrx-amdcccle
Then run this to restore your xorg.conf file to default:
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:
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.
Graphics card not working correctly? Please follow the procedure in GraphicsTroubleshootingProcedure in order to get help from the Ubuntu community.