How do I fix my installation of ATI Catalyst Video Driver in 12.04 LTS? [duplicate]

Update of the solution (18 nov 2012)

because new drivers are available in ATI website. Solution in 12.04LTS is then:


Uninstall ATI driver

$ sudo sh /usr/share/ati/fglrx-uninstall.sh --force   (if file is existing)
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

Install free driver

$ sudo rm /etc/X11/xorg.conf
$ sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 xserver-xorg-core
$ sudo dpkg-reconfigure xserver-xorg

Reboot

$ sudo reboot

Download ATI driver

Check what is your Graphic Card: lspci -v | grep -A 12 VGA

Download the appropriate driver for your machine here from the AMD/ATI Website .
File should be something like amd-driver-installer-12.6-legacy-x86.x86_64.run

If you are looking for old driver 12.6, today (Jan 2015) it is not available anymore in AMD website. Solution is to to search it in mirror websites.

Create a folder

$ mkdir ~/catalyst12.6/
$ cd ~/catalyst12.6/

And move your downloaded driver in it. Unzip it if needed.

$ unzip amd-driver-installer-12.6-legacy-x86.x86_64.zip

Install ATI driver

$ sudo apt-get install build-essential cdbs dh-make dkms execstack dh-modaliases fakeroot libqtgui4
$ sudo chmod +x amd-driver-installer-12.6-legacy-x86.x86_64.run
$ sudo sh ./amd-driver-installer-12.6-legacy-x86.x86_64.run --buildpkg Ubuntu/`lsb_release -sc`
$ sudo dpkg -i fglrx*.deb
$ sudo amdconfig --initial -f

Reboot and Check if installation is successful

$ sudo reboot
$ sudo fglrxinfo
   display: :0  screen: 0
   OpenGL vendor string: Advanced Micro Devices, Inc.
   OpenGL renderer string: ATI Radeon HD 4200 Series 
   OpenGL version string: 3.3.11653 Compatibility Profile Context

It is all good, as you can see, after last reboot, fglrxinfo displays my ATI Graphic card correctly.

Thanks

I found this solution thanks to Pavel and his link

Note

I applied successfuly this solution on 3 PCs on 12.04LTS :
- one with a ATI Radeon HD 3400
- one with a ATI Radeon HD 4200
- one with a ATI Radeon HD 4350

Successfully on hybrid ATi Radeon HD 5650/Intel with driver version 12.10, Precise Pangolin 12.04.02 with configuration in BIOS select 'discrete' graphic. (Acer aspire 4745G)


EDIT: Old solution (valid from April to August 2012)

The solution described in this answer is based on ATI drivers v12.4 +patch.
Now, since August 2012, ATI drivers v12.6 are available, the way to install these drivers is described in this answer


The error occurs because Catalyst has not been updated to work with recent 3.2 kernels.

Check this link:

  • http://ubuntuforums.org/showthread.php?t=1969827

and do:

  1. Uninstall ATI driver
  2. Install free driver
  3. Reboot
  4. Install ATI driver with the patch
  5. Reboot

In detail (for 32bit):

$ sudo sh /usr/share/ati/fglrx-uninstall.sh
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
$ sudo rm /etc/X11/xorg.conf
$ sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 xserver-xorg-core
$ sudo dpkg-reconfigure xserver-xorg
$ sudo reboot
$ mkdir ~/catalyst12.4/
$ cd ~/catalyst12.4/

Download the appropriate driver for your machine here from the AMD/ATI Website and move it in ~/catalyst12.4/ . File should be something like amd-driver-installer-12-4-x86.x86_64.run

$ chmod +x amd-driver-installer-12-4-x86.x86_64.run
$ ./amd-driver-installer-12-4-x86.x86_64.run --extract driver
$ cd ~/catalyst12.4/driver/common/lib/modules/fglrx/build_mod/
$ wget -O fglrx.patch http://ubuntuone.com/5gNgEmVfzs3ytD5QZ2YGCi
$ patch -p1 < fglrx.patch
$ cd ~/catalyst12.4/driver/
$ ./ati-installer.sh 8.961 --buildpkg Ubuntu/precise
$ cd ~/catalyst12.4/
$ sudo dpkg -i fglrx*.deb
$ sudo amdconfig --initial -f
$ sudo reboot
$ fglrxinfo
   display: :0.0  screen: 0
   OpenGL vendor string: Advanced Micro Devices, Inc.
   OpenGL renderer string: ATI Mobility Radeon HD 4200 Series
   OpenGL version string: 3.3.11631 Compatibility Profile Context

I found that the provided answers would not work for me until I did an additional step. If you are following the detailed instructions and still getting the badrequest error, try the following in terminal:

sudo gedit /etc/modprobe.d/blacklist-local.conf

In my case this file contained a single entry:

blacklist fglrx

This seems quite diabolical and I don't know what the cause is, but after commenting out this line

#blacklist fglrx

and rebooting, fglrxinfo now gives the correct output and fgl_glxgears works properly.