Tag/tag.png

Duplicate Article
This article covers the same material as another article. More info...

Introduction

There are two types of drivers that we can use: Open Source and Proprietary drivers. This guide and its subpages describe how to install the proprietary binary / restricted drivers provided by video card manufacturers.

IconsPage/info.png 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.

A note on open source 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 stop 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.

Identifying Your Video Card

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 Additional Drivers manager in Ubuntu.

Without X / from the console

If you need to change drivers without the use of the X GUI, perhaps because those drivers are not installed, you can with the following commands:

  • Ubuntu 14.04 LTS and newer releases, this command will show all devices which need drivers, and which packages apply to them:

    sudo ubuntu-drivers devices
  • Ubuntu 12.04 LTS, use the jockey-text command:

    jockey-text --help
    jockey-text -l
    jockey-text -e xorg:nvidia_current

More Detailed Installation Instructions

IconsPage/resources.png Here are some useful links and related pages.

Help!

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

Xorg.conf.d

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 type:

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 by typing:

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 has been taken by your fellow user to ensure that everything will work, things often 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.

Note: The information below was written about pre-9.10 versions of Ubuntu, but can still be applied to newer versions:

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 copy commands above (backup and revert) before you modify xorg.conf. That way, the commands will be in your terminal history. You can then simply press the up arrow on your keyboard to retrieve these commands.

If you have changed your xorg.conf file before having backed it up and are experiencing problems, you can copy the /etc/X11/xorg.conf file from the Ubuntu LiveCD to /etc/X11/xorg.conf on your hard disk. (Remember to back up the file on your hard disk first, 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 are before you start. It is a good idea to find out the 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 you're using a CRT monitor you will 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 or pico from the command line:

sudo vi /etc/X11/xorg.conf

If you are not familiar with vi or pico, you can use a graphical editor 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 around.

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 as it may cause permanent damage.

There are other approaches that require substantial editing and understanding of the xorg.conf file format. 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 get 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 monitor and detailed information will be presented for each proprietary driver at some later date here.)

Similar to configuring a single monitor above, 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 can 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 and video card vendor handles xorg.conf files slightly 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".

Note: The following instructions are for running the ATI uninstaller.

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, edit the xorg.conf file manually:

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

BinaryDriverHowto (last edited 2017-09-06 21:48:35 by ckimes)