Thursday, November 8, 2012

How to Install (or reinstall) Linux AMD / ATI Proprietary Video Drivers

If you are running Linux on a machine with an ATI / AMD video card, such as the Radeon HD series of cards, getting the most out of your video card can be a major pain. The open source fglrx driver that comes with many distributions works very well for most people - but often will let you down when it comes to using non-standard monitors such as an HDTV.

In my case, the open source driver could not detect my HDTV properly, and as a result, my screen stretched far beyond the edges of the display. Without the Catalyst Control Center application, I couldn't adjust for overscan. Additionally, when the HDTV was turned off and then on again, sound output would fail, requiring a restart. Installing the proprietary driver fixed both these issues.

Here's how to install the AMD / ATI proprietary driver. As always, backup any important data before making any major system changes. If you break your system, you have no one to blame but yourself.

1. Visit this page and enter the information about your system.

If you don't know your video card model, open a terminal and enter:
lspci | grep Display
2. Download the driver package. Save it wherever you like.

3. Extract the driver package.

4. Change permissions to allow the .run file to execute. In Ubuntu 12.04, right-click, select Properties, select Permissions tab, and check the box for "Allow executing file as program". Alternatively, open a terminal and manually change the file permissions:
chmod +x yourfilenamehere
5. Run the installer. If you get a message about fglrx not being uninstalled, you'll need to open a terminal and run the following command:
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
Restart your system and run the installer again. Assuming it is successful, run Catalyst Contol Center and adjust the video settings to your needs.

If you've already installed the ATI / AMD drivers, and suddenly they are broken, you'll need to do a removal and reinstall. This happened to me following a system update that affected the linux kernel. The most common symptom of this seems to be that the Catalyst Control Center application simply will not run. If you are running Ubuntu's Unity desktop, it may always load in 2d mode even if you choose 3d upon logging in. You can check what mode Unity is running in by running the following in a terminal:
echo $DESKTOP_SESSION
If the result is "ubuntu", it's running in 3d mode. 

To reinstall the drivers, do the following:

1. Open a terminal and run the following commands, one line at a time:
sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo sh /usr/share/ati/amd-uninstall.sh
If either command gives you a message about files having changed and the uninstall failing, run them again with a --force option. Running the first command may not be necessary, but should cause no harm.

2. Reinstall the driver as per the steps above.

Tested on Ubuntu 12.04.

No comments: