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

Getting your soundcard to work, using Debian on non-i386 hardware, etc

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

Postby mashen » 2014-04-05 18:59

I do have libgles2-mesa installed.
Welp, I don't know what to try next then.
mashen
 
Posts: 17
Joined: 2012-05-15 22:41

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

Postby stevepusser » 2014-04-05 19:21

Looking at the checkinstall output, didn't the manually built libraries get installed into /usr/lib instead of /usr/lib/x86-64-linux-gnu/? And I would guess that the stock Jessie radeon drivers are still installed and being used, instead of being updated as a proper deb package would have done.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Clipgrab 3.8.6, Hedgewars 1.0.0, PulseEffects 4.6.9, Telegram-desktop 1.8.15, Pale Moon 28.8.0, KeepassXC 2.5.1
User avatar
stevepusser
 
Posts: 11316
Joined: 2009-10-06 05:53

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

Postby mashen » 2014-04-05 19:30

Should I symlink them to /usr/lib/x86-64-linux-gnu?
EDIT: Nope, libglamor.la, libglamor.so, libglamor.so.0 and libglamor.so.0.0.0 are all in /usr/lib/x86-64-linux-gnu/, same result.
mashen
 
Posts: 17
Joined: 2012-05-15 22:41

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

Postby gradinaruvasile » 2014-04-06 06:52

I have them in the /usr/lib folder and glamor works for me:

Code: Select all
~$ locate libglamor
/usr/lib/libglamor.la
/usr/lib/libglamor.so
/usr/lib/libglamor.so.0
/usr/lib/libglamor.so.0.0.0
/usr/lib/xorg/modules/libglamoregl.la
/usr/lib/xorg/modules/libglamoregl.so


But, as i said you need the whole oss stack compiled if you want to make sure you have all the needed stuff.
So, mesa and xf86-ati:

Code: Select all
git clone git://anongit.freedesktop.org/mesa/mesa
git://anongit.freedesktop.org/xorg/driver/xf86-video-ati


My working mesa build script:
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


And the mesa deb build script:
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

xf86-ati configure:
Code: Select all
./autogen.sh --prefix=/usr

xf86-ati deb build:
Code: Select all
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

Save these in a script in the buid dir in case you re use them.
If you rebuild them, issues a
Code: Select all
make clean

before building again, to make sure you get rid of the prebious compiled binaries.
User avatar
gradinaruvasile
 
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania

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

Postby mashen » 2014-04-06 15:42

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
mashen
 
Posts: 17
Joined: 2012-05-15 22:41

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

Postby gradinaruvasile » 2014-04-06 16:48

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
User avatar
gradinaruvasile
 
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania

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

Postby mashen » 2014-04-06 18:11

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.
mashen
 
Posts: 17
Joined: 2012-05-15 22:41

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

Postby gradinaruvasile » 2014-04-06 19:23

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...
User avatar
gradinaruvasile
 
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania

Previous

Return to Hardware

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable