Ubuntu – Hybrid graphic card drivers (AMD® Radeon HD 8570 + Intel HD Graphics 4000)

14.04atihybrid-graphicsintel graphics

I am always trying to find answers for my problems with Google, but this time I give up. I've read almost every topic on every discussion board, blog posts etc. about my problem. I've tried many tips, but nothing seems to work. I've even changed Linux distribution from Ubuntu to Mint, nothing.

I'am trying to install drivers for my hybrid graphic card. Right now I have default drivers (xserver-xorg-video-ati) but there is major problem with that. When I'm trying to open few tabs in my browser (Chromium/Firefox) everything is slowing down and I have to wait until somehow it unfreezes itself. Installing fglrx or fglrx-update crashes my system. I really don't know what to do, I don't want to go back to Windows 7.

My laptop parameters:
Lenovo Essential G500H i3-3110 4GB 1TB HD8570:

  • Intel® Core™ i3 3gen 3110M 2,4 GHz
  • AMD® Radeon HD 8570 + Intel HD Graphics 4000
  • 4 GB, DDR3, 1333 MHz

Sorry for my bad English, but it's not my native language. Please help. 🙂

Best Answer

For mesa, This is the best documentation right now in the web. The quick howto is to update the drivers and kernel, the more recent the better. If possible, update the distro or use oibaf PPA. Then do this:

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x79 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 4 associated providers: 0 name:Intel
Provider 1: id: 0x53 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 0 associated providers: 0 name:radeon

$ xrandr --setprovideroffloadsink 0x53 0x79

Newer versions can also do this:

$ xrandr --setprovideroffloadsink radeon Intel

I suspect the case is important, but never tested

After this config, if you setup the DRI_PRIME=1 environment variable, new applications started on that terminal will use the AMD card instead of the intel. Without this variable, apps will use intel, so make sure your 3D apps are really using this variable. Examples:

$ DRI_PRIME=1 glxinfo | grep -i opengl
$ DRI_PRIME=1 glxgears -info

Compare with

$ DRI_PRIME=0 glxgears -info
$ glxgears -info

If you get an "empty" window, first try if this gets resolved by resizing it. If not, then it may be because you don't have "compositing" enabled. Check your window manager or install and start xcompmgr before starting the application (you can kill it after if you want). Please note that some window managers disable compositing when applications run full screen.

I use this small script, named radeon.sh:

 #!/bin/bash
 xrandr --setprovideroffloadsink radeon Intel
 xcompmgr &
 xcpid=$!
 DRI_PRIME=1 $*
 kill $xcpid

Then put it in /usr/local/bin and run radeon.sh steam or radeon.sh warsow to play using the radeon card

Have fun!