I'm posting this here because most of the information you can find is either obsolete or hard to find, and info about muxless systems is mostly buried within endless pages of discussions about Nvidia cards or muxed systems.
First of all, you might wonder (if you don't already know) what is the difference between muxless and muxed hybrid graphics.
Muxed systems are older and generally easier to get running. In both cases you have two GPUs in your machine, either Intel (mostly on an i3 or i5 CPU) + ATI or ATI (on AMD CPU) + ATI. On a muxed system both of these GPUs are connected directly to your display and work independently. Sadly, there is still (to my knowledge) no way to have these switch dynamically for more battery life or better performance on Linux. However, using vgaswitcheroo (mentioned later in tutorial) on it's own without any additional steps should work for you.
Muxless systems are trickier. Only the integrated GPU is connected to your display, but it can offload intensive graphics calculations on to your ATI card and forward the results to your screen. Up until recently this was not possible without using the proprietary fglrx driver.
Note that fglrx has it's own mechanism for switching between cards in CCC and in both cases it requires a X restart. This tutorial deals with using the open source radeon driver instead.
Before you start you should check if you have a muxed or muxless system. Unfortunately I don't know a good way of checking this other than extensive googling. If you know of another reliable method please post it and I will update the tutorial. Generally, laptops produced from 2011 and onwards seem to be mostly muxless.
If you have a muxed system and you have all of the drivers already installed, you can skip ahead to step 4. In case of a muxless systems, just keep reading.
[2] Remove fglrx
If you already have fglrx installed you should remove it first.
If installed from driver manager/repository:
Code: Select all
$ sudo apt-get remove --purge fglrx*Code: Select all
$ sudo sh /usr/share/ati/fglrx-uninstall.shCode: Select all
$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.fglrx[3] Xorg 1.14
In order to use the radeon driver with a muxless system you will need to upgrade your X server to 1.14. Fortunately, there's a ppa that will help you do it the easy way. It should also be installed in Ubuntu 13.10 (and, hopefully, by extension in LM 16) making this even easier. You can find the ppa at https://launchpad.net/~canonical-x/+archive/x-staging
Code: Select all
$ sudo apt-add-repository ppa:canonical-x/x-staging
$ sudo apt-get update
$ sudo apt-get dist-upgradeCode: Select all
$ sudo apt-get install xserver-xorg-video-ati
$ sudo apt-get install xserver-xorg-video-intel[4] vgaswitcheroo and PRIME
First thing you should check is if your discrete GPU is even turned on. By default it should be off.
Code: Select all
$ sudo su
# cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Pwr:0000:01:00.0For more info on vgaswitcheroo see https://help.ubuntu.com/community/HybridGraphics
MUXED SYSTEMS:
WARNING: I did NOT test this. Please report if it worked/didn't work and I will update this section of the tutorial.
At this point you should be able to just turn your discrete graphics on, restart X and have it working:
Code: Select all
# echo DDIS > /sys/kernel/debug/vgaswitcheroo/switchIf you want to disable your discrete GPU to get more battery life from your laptop:
Code: Select all
# echo OFF > /sys/kernel/debug/vgaswitcheroo/switchMUXLESS SYSTEMS
First thing you need to do is turn on your discrete GPU if it's not turned on already:
Code: Select all
# echo ON > /sys/kernel/debug/vgaswitcheroo/switchCode: Select all
# cat /sys/kernel/debug/vgaswitcheroo/switchCode: Select all
$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 108 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 2 name:Intel
Provider 1: id: 69 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeon
Provider 2: id: 69 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeonLast thing we need it to tell X to use your discrete GPU for rendering:
Code: Select all
$ xrandr --setprovideroffloadsink 69 108Code: Select all
$ DRI_PRIME=1 glxinfo | grep renderer
OpenGL renderer string: Gallium 0.4 on AMD TURKSThis has been tested on a Radeon HD 7670M and a i5 IvyBridge CPU. I have experienced similar or even better performance in both native games and wine compared to using the proprietary fglrx driver.
If you have any additional info, helpful scripts or any other feedback please post and I will update this tutorial.
Happy gaming
EDIT: Whoops, wrong section... can a mod please move this to proper subforum? Thanks.