How do I get AMD/Intel Hybrid Graphics drivers to work?

For 13.04:

Pre-Install:

Three terminal-commands:

sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6
sudo apt-get install dkms libqtgui4 wget execstack libelfg0 dh-modaliases
sudo apt-get install linux-headers-generic xserver-xorg-core libgcc1

Additional two terminal-commands for 64-bit:

sudo apt-get install ia32-libs lib32gcc1 libc6-i386
cd /usr ; sudo ln -svT lib /usr/lib64

(Note: The second command shouldn't be necessary if there is already such a symbolic link named lib64 pointing to folder lib there. And if there is already a real folder by that name (determined with ls -l /usr/lib64), you should ensure that its contents are safely moved into folder /usr/lib and then delete --the now empty-- folder /usr/lib64 before executing this command).

Download from these direct-links: libudev0_175-0ubuntu13_amd64.deb.

and (the older intel driver - xserver-xorg - see also section "Important" on answer for 12.10. I think this would also be very important here.)

https://docs.google.com/file/d/0B0tTaH4qTIIXdDF3NThFWUtrYlU/edit?usp=sharing

Copy these files (two .deb packages) into an empty folder.

Remove the old drivers:

sudo apt-get remove fglrx*
sudo apt-get remove xserver-xorg-video-intel

Execute the following two terminal-commands in the folder with downloaded .deb files:

sudo dpkg -i libudev*
sudo dpkg -i xserver-xorg-video-intel_2.21.6-0ubuntu4_amd64.deb

Prevent xserver-xorg-video-intel from being upgraded:

sudo apt-mark hold xserver-xorg-video-intel

Installation:

Get the current ATI Catalyst driver e.g. 13.04 (I have tested it with this release) from the official website: www.amd.com/drivers

Unzip the .zip and make it executable. Then go to the folder with the unzipped .run-file in terminal and type:

sudo sh ./amd-catalyst-XX.X-linux-x86.x86_64.run --buildpkg Ubuntu/raring

Replace XXX with the correct name of the file.

Install the created .deb-files with the following terminal-command in the current directory:

sudo dpkg -i fglrx*.deb

Post-Install:

Enter the terminal command

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo aticonfig --initial -f

(Note: If you use multiple AMD graphics cards or AMD dual graphics, you can use sudo aticonfig --adapter=all --initial -f instead, and/or if you use a dual monitor display, you can also use this additional third command: sudo aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE")

Select the discrete GPU

sudo aticonfig --px-dgpu

Reboot your system

sudo reboot

Links:

http://ubuntuforums.org/showthread.php?t=1930450

My Scripts for Switching

Script for High-GPU-Mode:

#!/bin/bash
# Activate discrete GPU (High-Performance mode), must re-start X to take effect
sudo aticonfig --px-dgpu
sudo restart lightdm

Script for Low-GPU-Mode:

#!/bin/bash
# Activate integrated GPU (Power-Saving mode), must re-start X to take effec
sudo aticonfig --px-igpu
sudo restart lightdm

Script for showing current GPU-Mode:

#!/bin/bash
#Show current GPU (High- or Low-Performance mode) as notification
aticonfig --pxl | while read SPAM_OUT; do notify-send "$SPAM_OUT"; done

Note: If you always have problems after the execution of a Switching-Script, make a restart of your system (and not only a re-login).

New!!! INDICATOR for Switching:

To switch between Discrete (AMD) and Integrated (Intel) GPUs nice and easy way, go to https://github.com/beidl/amd-indicator, and then download and install the DEB file there. enter image description here


For 12.10:

It works for me!! And here is the how-to which I created for you:

Pre-Install:

Three terminal-commands:

sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6
sudo apt-get install dkms libqtgui4 wget execstack libelfg0 dh-modaliases
sudo apt-get install linux-headers-generic xserver-xorg-core libgcc1

Optional if 64 Bit - two terminal-commands:

sudo apt-get install ia32-libs lib32gcc1 libc6-i386
cd /usr ; sudo ln -svT lib /usr/lib64

Download from this direct-link: https://launchpad.net/~andrikos/+archive/ppa/+sourcepub/2755647/+listing-archive-extra the files and this two .deb packages into an empty folder

xserver-xorg-video-intel-dbg_2.20.0-0~andrik1_XXX.deb
xserver-xorg-video-intel_2.20.0-0~andrik1_XXX.deb

where XXX should be your architecture identifier (x86 or amd64)

Execute the following two terminal-commands in the folder with downloaded .deb files:

sudo dpkg -i xserver-xorg-video-intel*.deb
sudo dpkg-reconfigure Xorg

Then reboot your machine

Note - this is from the PPA: https://launchpad.net/~andrikos/+archive/ppa/+packages?field.name_filter=&field.status_filter=published&field.series_filter=quantal

Important - Today I got a security-update for "xserver-org" form the official Ubuntu repositories which crashed my system again (no login screen). Then I installed the newest two xserver-org-video-intel*.deb's (downloaded and installed as described above) from the PPA https://launchpad.net/~andrikos/+archive/ppa/+packages?field.name_filter=&field.status_filter=published&field.series_filter=quantal again. You can also add this PPA on your system for preventing this issue. For me, this PPA has too much other packages, so I will do it (downloading the two .deb-files and installing them) manually. An other solution is, to de-select the "xserver-org"-packages if there are official Ubuntu security updates available.

Installation:

Get the current ATI Catalyst driver e,g 12.11 Beta (I have tested it with this release):

wget -c http://www2.ati.com/drivers/beta/amd-driver-installer-catalyst-12.11-beta-x86.x86_64.zip -O catalyst-12.11-beta-x86.x86_64.zip

Unzip the .zip and make it executable. Then go to the folder with the unzipped .run-file in terminal and type:

sudo sh ./amd-driver-installer-XXX.run --buildpkg Ubuntu/quantal

Replace XXX with the correct name of the file

Install the created .deb-files with the following terminal-command in the current directory:

sudo dpkg -i fglrx*.deb

Post-Install:

Enter the terminal command

sudo aticonfig --initial -f

Reboot your system

sudo reboot

optional - fixing the bug for direct rendering on the integrated card:

gksu gedit /etc/X11/Xsession.d/10fglrx

Add the string "/usr/lib/x86_64-linux-gnu/dri/" on your 64Bit system that the line finally looks like this:

LIBGL_DRIVERS_PATH=${LIBGL_DRIVERS_PATH}:/usr/lib32/fglrx/dri:/usr/lib/x86_64-linux-gnu/dri

Add the string "/usr/lib32/dri/" on your 32Bit system that the line finally looks like this:

LIBGL_DRIVERS_PATH=${LIBGL_DRIVERS_PATH}:/usr/lib32/fglrx/dri:/usr/lib32/dri

Links:

http://ubuntuforums.org/showthread.php?t=1930450

http://ubuntuforums.org/showthread.php?t=1930450&page=51

http://www.upubuntu.com/2012/10/install-amd-catalyst-1211-beta-driver.html

My Scripts for Switching

Script for High-GPU-Mode:

#!/bin/bash
# Activate discrete GPU (High-Performance mode), must re-start X to take effect
sudo aticonfig --px-dgpu
sudo restart lightdm

Script for Low-GPU-Mode:

#!/bin/bash
# Activate integrated GPU (Power-Saving mode), must re-start X to take effec
sudo aticonfig --px-igpu
sudo restart lightdm

Script for showing current GPU-Mode:

#!/bin/bash
#Show current GPU (High- or Low-Performance mode) as notification
aticonfig --pxl | while read SPAM_OUT; do notify-send "$SPAM_OUT"; done

Note: If you have always problems after the execution of a Switching-Script, make a restart of your system (and not only a re-login).


For 13.10

it works without tweaking on a fresh Ubuntu 13.10 install:

1) Open the terminal and type

sudo apt-get install fglrx fglrx-pxpress

2) and reboot