If you have dual graphics cards (intel + amd) and if you have been unable to start steam games using the radeon open source driver, this guide is for you. If you have been using catalyst driver, see this guide.
1. If you don’t have catalyst driver installed, you have to autostart “xrandr –setprovideroffloadsink radeon Intel” command before using DRI_PRIME. In my case, I have a desktop file (driprimestarter.desktop) inside ~/.config/autostart that has following text.
[Desktop Entry] Type=Application Name=Dri prime starter Exec=/home/username/bin/radeon.sh
The radeon.sh inside ~/bin directory has following text (make it executable using chmod +x radeon.sh command).
xrandr --setprovideroffloadsink radeon Intel
Make sure your desktop environment have composting enabled. I did not have great experience playing Dota 2 on Gnome, therefore I had to switch to LXDE. In LXDE you can install xcompmgr and autostart it by adding following text in ~/.config/lxsession/LXDE/autostart file.
@xcompmgr
If you use compton you can add
@compton
2. Rename (or remove) libstdc++.so.6 inside ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu and ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu directory to something else.
$ mv libstdc++.so.6 libstdc++.so.6.bak
3. To run a specific game on steam using radeon graphics driver, execute following commands (you can create a launcher such as dota2.sh to run the game).
DRI_PRIME=1 glxinfo | grep "OpenGL renderer" env DRI_PRIME=1 steam steam://rungameid/570
First command above should show you your particular graphics driver in use (when using DRI_PRIME). It should be AMD radeon graphics driver (not intel).
$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer" OpenGL renderer string: Gallium 0.4 on AMD CAICOS
I hope this guide helps you run steam games using open source radeon driver on Linux.
Hei, did you try to enable dri3?
I just recompiled mesa with it enabled, but every time i add a xorg conf to enable it on intel, xrandr –listproviders doesn’t show radeon anymore.
PS. using debian testing.
I haven’t. May be you don’t have necessary configuration parameters in xorg.conf to enable both drivers.