Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Can't get OpenGL to work on Radeon free drivers (Jessie)

Need help with peripherals or devices?
Message
Author
mashen
Posts: 27
Joined: 2012-05-15 22:41

Re: Can't get OpenGL to work on Radeon free drivers (Jessie)

#20 Post by mashen »

Well. That was a lot of pain getting all the necessary -dev files and mucking around with conflicting libraries and the such, but it finally works!!

Code: Select all

$ glxinfo | grep -i opengl
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE
OpenGL version string: 2.1 Mesa 10.2.0-devel (git-5d0b3ec)
OpenGL shading language version string: 1.30
OpenGL extensions:
All the effects and acceleration seem to be working now, I'll report if I run into any problems.
Getting all the necessary pre-requisites was a pain, so I've compiled all the stuff I had to do. Hope it helps anyone who wants to try this. Many thanks to gradinaruvasile and his awesome scripts. I'm copy-pasting the scripts and commands he posted so everyone can have all the necessary steps in one post.

First of all, these are the necessary packages that have to be installed in order to have mesa, glamor and xf86-ati compile:

Code: Select all

# aptitude install automake xutils-dev  libgl1-mesa-dev libegl1-mesa-dev libgbm-dev libgbm1 libtool xserver-xorg-dev checkinstall flex  libvdpau-dev  libxcb-xfixes0-dev llvm-3.3 llvm-3.3-dev llvm llvm-dev llvm-runtime   libelf-dev   libexpat1-dev   libbsd-dev 
Next,
glamor:

Code: Select all

$ git clone git://anongit.freedesktop.org/xorg/driver/glamor
$ cd glamor
$ ./autogen.sh --prefix=/usr --enable-glx-tls --enable-xv
$ make
$ fakeroot checkinstall --install=no --pkgarch=amd64 --backup=no --pkgname=glamor --pkgversion=5.1-`git describe` --default
$ sudo dpkg -i glamor*.deb
xf86-ati:

Code: Select all

$ git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
$ cd xf86-video-ati
$ ./autogen.sh --prefix=/usr
$ fakeroot checkinstall --install=no --pkgarch=amd64 --backup=no --pkgname=xf86-video-ati --pkgversion=7.3-git-`git describe` --replaces=xserver-xorg-video-radeon,xserver-xorg-video-ati --default
$ sudo dpkg -i xf86-video-ati*.deb
mesa

Code: Select all

git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa/
Save the following as mesa-build.sh and put it in that mesa/ directory.

Code: Select all

#!/bin/bash
#--with-llvm-shared-libs \
PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/local/share/pkgconfig ./autogen.sh --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu \
--enable-debug \
CPPFLAGS="-m64" \
CXXFLAGS="-m64" \
--enable-64-bit --disable-32-bit \
--enable-texture-float \
--with-gallium-drivers=r600,swrast,radeonsi \
--with-dri-drivers="" \
--enable-vdpau \
--enable-egl --enable-gles1 --enable-gles2 \
--enable-glx-tls \
--with-egl-platforms=x11,drm \
--enable-gbm \
--enable-gallium-egl \
--enable-gallium-osmesa \
--with-osmesa-bits=32 \
--disable-dri3 \
--disable-opencl \
--enable-shared-glapi \
--disable-r600-llvm-compiler \
--enable-gallium-llvm
Save the following as mesa-build-deb.sh and put it in that mesa/ directory.

Code: Select all

#!/bin/bash
fakeroot checkinstall --install=no --replaces libgles1-mesa:amd64,opencl-headers,libgl1-mesa-dev,libglapi-mesa:amd64,libgles2-mesa:amd64,libgbm1:amd64,libegl1-mesa-dev,libgl1-mesa-dri:i386,libgl1-mesa-dri:amd64,libgl1-mesa-glx:amd64,libegl1-mesa:amd64,libgl1-mesa-swx11:amd64,libegl1-mesa-drivers:amd64,libosmesa6-dev:amd64,mesa-common-dev --pkgname=mesa --pkgversion=`cat VERSION` --pkgarch=amd64 --backup=no --default
Then,

Code: Select all

$ chmod +x mesa-build.sh mesa-build-deb.sh
$ ./mesa-build.sh
$ ./mesa-build-deb.sh
$ sudo dpkg -i mesa*.deb
I'd like to point out here that I had issues installing the mesa package because of conflicting files.
I had to purge some packages in order to get it to install:

Code: Select all

$ sudo aptitude purge mesa-vdpau-drivers
$ sudo aptitude purge libgbm-dev
$ sudo dpkg -i mesa*.deb
After that, you have to edit /etc/X11/xorg.conf so it has these contents:

Code: Select all

Section "Device"
    Identifier "radeon"
    Driver "radeon"
    Option "AccelMethod" "glamor"
EndSection
And /usr/share/X11/xorg.conf.d/glamor.conf so it has these contents:

Code: Select all

Section "Module"
   Load  "dri2"
   Load  "glamoregl"
EndSection
That's all. Restart and you're set. Again, many thanks to gradinaruvasile

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Can't get OpenGL to work on Radeon free drivers (Jessie)

#21 Post by gradinaruvasile »

Glad it works.

Now, if someone does this on 64 bit and wants to use 32 bit applications (Wine, Steam or those precompiled 32 bit only Linux games),

YOU WILL NEED TO DO THE ABOVE FOR 32 BIT MESA TOO (just mesa)!

Which is another joyride. I would suggest creating a 32 bit chroot

https://wiki.debian.org/chroot

and install all the prerequisites there and compile the 32 bit stuff then take the .deb and install on the actual system.
My 32 bit mesa build scrip (removed some custom lines so test it):

Code: Select all

#!/bin/bash
./autogen.sh --sysconfdir=/etc --prefix=/usr \
--disable-64-bit --enable-32-bit \
--libdir=/usr/lib/i386-linux-gnu --enable-debug \
--enable-texture-float \
--with-gallium-drivers=r600,swrast,radeonsi \
--with-dri-drivers="" \
--enable-vdpau \
--enable-egl --enable-gles1 --enable-gles2 \
--enable-glx-tls \
--with-egl-platforms=x11,drm \
--enable-gbm \
--enable-gallium-egl \
--enable-gallium-osmesa \
--with-osmesa-bits=32 \
--disable-dri3 \
--disable-opencl \
--with-llvm-shared-libs \
--disable-r600-llvm-compiler \
--enable-llvm-shared-libs \
--enable-shared-glapi

mashen
Posts: 27
Joined: 2012-05-15 22:41

Re: Can't get OpenGL to work on Radeon free drivers (Jessie)

#22 Post by mashen »

This really should be something included in the Debian repos. Hopefully it is in the future, drivers aren't mature at all yet.
I had my desktop crash with effects enabled after a reboot. I don't know why, it worked the first time.
I guess I will go back to proprietary drivers until the free ones are mature enough.

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Can't get OpenGL to work on Radeon free drivers (Jessie)

#23 Post by gradinaruvasile »

I didnt have any issues since kernel 3.12 with the free drivers (dpm was introduced in the kernel 3.11 driver).
BTW try with dpm enabled (radeon.dpm=1 added to the kernel command line).

But i use the r600 driver that is more mature than radeonsi. And i use xfce with no desktop effects (although i used compton for a while and worked withouth a hitch). So YMMV...

Post Reply