In this tutorial, I will list the steps I take to setup AMD catalyst driver under Ubuntu Linux. I hope someone finds it useful.
I will not say, it works for all hybrid graphics setup. So here is my computer’s specification.
Operating System : 64-bit Ubuntu 12.04
Processor : Intel sandy bridge (2nd generation), specifically Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
Graphics Cards: Intel HD 3000 and AMD Radeon HD 6470M
RAM: 4 GB
Step 0 : Do you want longer battery life or faster graphics performance ?
One problem most users with dual graphics cards might notice just after installing Ubuntu, is that the fan continuously runs without slowing down. One even might get to the conclusion of, is Linux worth installing. If it can not handle the graphics cards, what worth it might be after installing. Most users don’t fall into this dual graphics category, if they have bought laptops without AMD cards.
Intel cards are better for longer battery life, and that might be good enough for many people. If they are willing to wait until both cards work seamlessly, it is better to shutdown the AMD card (see Step 1 below on how to that). AMD cards are better for gaming (that is what we are going to setup). If however, you want the dual graphics setup this link (http://ubuntuforums.org/showthread.php?p=11712781) might help.
Step 1: Shutdown that noisy AMD fan
To shutdown the noisy AMD fan you need to login as root and set “OFF” value to /sys/kernel/debug/vgaswitcheroo/switch file. You can do that by executing following commands.
$ sudo su - # echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
Note: After installing catalyst driver, you probably would not have do this. If you however, don’t want to install catalyst driver and just want to get the AMD card shutup, you can copy above text (echo OFF > /sys/kernel/debug/vgaswitcheroo/switch) to /etc/rc.local, before exit 0. Use sudo gedit /etc/rc.local command to open that file.
Step 2: Install catalyst driver
Follow these steps as listed in https://wiki.ubuntu.com/Valve
1. Enable the pre-released updates. You can enable this repository by opening Ubuntu Software Center, selecting Edit | Software sources… and then enabling the Pre-released updates option on the Updates tab.
2. Update your repository to the latest version in the Update Manager.
3. Remove the currently installed drivers.
4. In 12.04, launch the Additional Hardware Drivers dialog from System Settings. In 12.10, launch Software
Properties, then click on the Additional Drivers tab in the Software Sources menu.
5. Install the newest fglrx-experimental-X driver.
Note: If you have just installed Ubuntu and even if you followed numbers 1 and 2 of Step 2 and did not get fglrx-experimental-X driver. You could follow these steps, which might actually bring back that option.
1. Update Ubuntu. Before you start installing software in Ubuntu, it is good to have default packages to its latest version. Execute following command to update Ubuntu.
$ sudo apt-get dist-upgrade
This command will update all the software to their latest version.
2. Install ubuntu-x-swat/x-updates repository anyway. Follow these steps as listed in https://wiki.ubuntu.com/Valve
On the command line, run
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get dist-upgrade
Then log out and back in, or reboot.
Step 3: If it works (Go to Step 4 to find out), close this article and start killing some zombies. Else …
Dual graphics cards on some computers (like mine) might not start in default Ubuntu desktop (Unity Desktop). You may not like Unity anyways (I use Unity), but not being able to login into default desktop is a clear indication that our process of installing catalyst driver has not finished yet.
This section is sort of debugging section, so make sure you keep patience and be ready to explore different combinations, if it still does not work.
a. Check, if following command creates xorg.conf file for your card. If it does (Go to Step 4 to find out), no need to go further in this article. You are good to start killing some zombies that might still be left. Execute following command.
$ sudo aticonfig --initial -f
b. In my case, after I install catalyst driver, first thing I need to do is create a file (/etc/X11/xorg.conf) to get the AMD card to work. Above command worked in the past, but failed on multiple occasions. Content of that file are listed below, but before that, I want to talk about determining proper BusID for that card.
To find out the proper BusID for AMD card execute following command. I have also listed the output of the command along with the command.
$ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Seymour [Radeon HD 6400M Series]
As you can see, I have two cards, and AMD card is in BusID 1:0:0. With this BusID for AMD card, a /etc/X11/xorg.conf file might look like in following text. You can create this file by executing following command and copy and paste the text below that. With correct BusID, offcourse.
$ sudo gedit /etc/X11/xorg.conf Section "ServerLayout" Identifier "aticonfig Layout" Screen 0 "aticonfig-Screen-0" 0 0 EndSection Section "Module" EndSection Section "Monitor" Identifier "aticonfig-Monitor-0" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" EndSection Section "Device" Identifier "aticonfig-Device-0" Driver "fglrx" BusID "PCI:1:0:0" EndSection Section "Screen" Identifier "aticonfig-Screen-0" Device "aticonfig-Device-0" Monitor "aticonfig-Monitor-0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection
Note: Restart the computer after creating above file, and check if it worked
Step 4: Find out if it worked
First thing I do after installing catalyst driver, create xorg.conf file and restart is, execute following command to see if the driver has properly installed.
A spinning cube should appear. If it did not, you have to check all the steps above. If you found any steps confusing, please let me know. If it did not work, even though you did all the steps correctly, make sure you discuss it. Someone with similar issue might get help. After trying all the steps above, if it still did not work, you can either let folks at http://devgurus.amd.com/community/steam-linux know about this or revert back to intel drivers.
Step 5: Return back to intel drivers.
If you could not install catalyst drivers, here are the steps that will set the computer to the stage it was before installing catalyst drivers. Execute following commands to completely remove catalyst drivers and reconfigure intel drivers.
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* $ sudo rm /etc/X11/xorg.conf $ sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 $ sudo dpkg-reconfigure xserver-xorg $ sudo reboot