Kodi Community Forum
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform (/showthread.php?tid=99154)



- mbah.pande - 2011-07-25

I've got this on vainfo

libva: libva version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

and this for fglrxinfo

display: :0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon HD 6300 series Graphics
OpenGL version string: 4.1.10834 Compatibility Profile Context


what should i do?


- devil103 - 2011-07-25

mbah.pande Wrote:I've got this on vainfo

libva: libva version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

and this for fglrxinfo

display: :0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon HD 6300 series Graphics
OpenGL version string: 4.1.10834 Compatibility Profile Context


what should i do?

Check and see if /usr/lib/dri/fglrx_drv_video.so exists. I had the same problem last weekend and only fglrx_dri.so was present. I solved it by creating the proper symbolic links manually.


- mbah.pande - 2011-07-25

devil103 Wrote:Check and see if /usr/lib/dri/fglrx_drv_video.so exists. I had the same problem last weekend and only fglrx_dri.so was present. I solved it by creating the proper symbolic links manually.

Sorry i'm noob

fglrx_drv_video.so doesn't exist only dummy_drv_video.so

Can you explain how to creating proper symbolic link manually?


- devil103 - 2011-07-25

Quote:Sorry i'm noob

fglrx_drv_video.so doesn't exist only dummy_drv_video.so

Can you explain how to creating proper symbolic link manually?
I'm using this xvba package, make sure it is installed
http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.8.0-1_amd64.deb (the same as in the opening post)

And I've created a symbolic link to /usr/lib/va/drivers/fglrx_drv_video.so with the commands:

Quote:cd /usr/lib/dri; ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

But since you only have dummy_drv_video.so make sure all the packages (libva, xvba, etc. see opening post) are installed correctly.


- mbah.pande - 2011-07-26

devil103 Wrote:Can you explain how to creating proper symbolic link manually?
I'm using this xvba package, make sure it is installed
http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.8.0-1_amd64.deb (the same as in the opening post)

And I've created a symbolic link to /usr/lib/va/drivers/fglrx_drv_video.so with the commands:



But since you only have dummy_drv_video.so make sure all the packages (libva, xvba, etc. see opening post) are installed correctly.

Thanks it's already worked by make symbolic link because i've found /usr/lib/va/drivers/fglrx_drv_video.so


- SDM2011 - 2011-07-26

@Mysob, that looks mostly fine except for the following:

1. I do not use the packages from splitted-desktop. They don't work on natty in my experience. IIRC, you must use the fixed xvba-va-driver package from Andrew Hunter (I think). See my other posts in this thread.

2. I also did not run aticonfig, but I doubt this is important.

3. If you're still having issues, add the xvba drivers to the /etc/environment. Search for that in this thread; I believe I mentioned it in a recent post as well.

Any problems you're having are almost certainly due to either 1 or 3. xbmc-live also seems to use uxlaunch at startup, which caused me problems on suspend/shutdown. LightDM works perfectly though, after making a small, obvious change to the config file.

Edit: this may have been a reply to an old message. Please disregard if so.


- kaulalla - 2011-07-26

Have been trying to make it work, glxgears and fgl_glxgears work seamlessly. Compiled and installed XBMC w vaapi support, fglrxinfo displays the correct information, and yet, XBMC wont open for "XBMC needs hardware accelerated OpenGL rendering", and vainfo returns the same error:

Quote:libva: libva version 0.32.0
libva: User requested driver 'fglrx'
libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
vainfo: symbol lookup error: /usr/lib/fglrx/libAMDXvBA.so.1: undefined
symbol: XF86DRIOpenConnection

This is driving me crazy, please advise!


- snoozer - 2011-07-26

kaulalla Wrote:Have been trying to make it work, glxgears and fgl_glxgears work seamlessly. Compiled and installed XBMC w vaapi support, fglrxinfo displays the correct information, and yet, XBMC wont open for "XBMC needs hardware accelerated OpenGL rendering", and vainfo returns the same error:



This is driving me crazy, please advise!

I had the same problem, it seems to me that this guide with these packages just don't work...


- X3lectric - 2011-07-26

@ snoozer

since you linux experienced.

I did post this http://forum.xbmc.org/showpost.php?p=834733&postcount=270

I dont use AMD (not a masochist) but if I did I would surely not grab random packages and drivers to install them manually, never worked right for Nvidia in some cases adn AMD is far more "temperamental"

Also If I was going to comile anything I would compile latest XBMC as it contains a ton more improvements.

Though this guide is for 10.1 and its missing libboost-thread-dev and libyajl-dev if your going to adapt it to a more recent XBMC compile and use the latest drivers I put and compiled into a ppa fro someone else (they work great btw) who used this gid and modified it to compile latest xbmc with libva and latest available graphics, as per link above.


- snoozer - 2011-07-26

X3lectric Wrote:@ snoozer

since you linux experienced.

I did post this http://forum.xbmc.org/showpost.php?p=834733&postcount=270

I dont use AMD (not a masochist) but if I did I would surely not grab random packages and drivers to install them manually, never worked right for Nvidia in some cases adn AMD is far more "temperamental"

Also If I was going to comile anything I would compile latest XBMC as it contains a ton more improvements.

Though this guide is for 10.1 and its missing libboost-thread-dev and libyajl-dev if your going to adapt it to a more recent XBMC compile and use the latest drivers I put and compiled into a ppa fro someone else (they work great btw) who used this gid and modified it to compile latest xbmc with libva and latest available graphics, as per link above.

Alright, I'll try that, thanks!


- kaulalla - 2011-07-26

@ snoozer:

Yeah, but the thing is, I had it working, until I was stupid enough to do apt-get update && upgrade... now it wont work, whether I followed Wytraven's guide again (whose I followed when making it work in the first place), or anything else :x


- demiurg - 2011-07-26

Would it maybe be an idea for someone who has a working self-compiled xbmc for the asus 35m deluxe to post/share it somewhere? Or would it be dependent on too many environment variables?


- devil103 - 2011-07-27

Just pitching in my 2 cents here.
I did a fresh install last weekend and now have a fully working AMD Zacate XBMC media center running kernel 3.0

I don't remember my exact step but pretty much the following:

Ubuntu netinstall, installed SSH, Basic Ubuntu Server, Samba. This defaults to kernel 2.38-10 at the moment.

The ssh'ed into my freshly installed box and installed xorg, python-software-properties, alsa, alsa-utils, mesa, etc (basically, the first paragraph of Robotica's guide here in the first post of this topic)

The added the xorg:edgers ppa to upgrade to kernel 3.0
(!) Disabled xorg:edgers to make sure it does NOT, I repeat DOES NOT upgrade my xorg installation.

Downloaded, and patched(!) the 11.6 Catalyst drivers, installed them;
Then sudo apt-get vainfo which from the multiverse which also installed the libva packages from the multiverse(!) and then installed xvba from splitted desktop!

Then I had to manually create a symbolic link in /usr/lib/dri/ to /usr/va/drivers/fglrx.... (see a few posts above)

And the finally installed XBMC-pvr from lars op denkamps ppa.

et voila, basically that has been working fine for me now for the past three days.


- kaulalla - 2011-07-27

Could you please go more into details about what and how you exactly did? My problem seems to be a combination of an update going wrong and the lack of opengl rendering...


- devil103 - 2011-07-27

kaulalla Wrote:Could you please go more into details about what and how you exactly did? My problem seems to be a combination of an update going wrong and the lack of opengl rendering...

I'll try but I'm afraid I'm terrible at keeping notes along the way.

I'll assume you have a working Ubuntu Minimal system and have some knowledge of linux to fill in the missing blanks here and there, I started by following the guide in the topic start.

This is in no way a step-to-step guide, just wrote this down from memory in hopes of providing some people a place to look for possible problems
Code:
sudo apt-get update
sudo apt-get install ssh python-software-properties udisks upower xorg alsa-utils mesa-utils git-core librtmp0 lirc
sudo adduser YourUserName video
sudo adduser YourUserName audio
sudo reboot

Then I upgraded to kernel 3.0, don't know why, just wanted the latest I guess :p I don't know the exact kernel number so when performing the apt-get install command just press TAB after typing 'linux-headers-3' etc. and see what the actual number is.

Code:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install linux-headers-3.0??? linux-headers-3.0??-generic linux-image-3.0??-generic --fix-missing
sudo reboot
DON'T UPGRADE XORG HERE

Then disabled the xorg:edgers/ppa in

Code:
/etc/apt/sources.d/??? (I'll update this when I get the chance)

Then I started with the ATI drivers, simply the same as with Robotica's guide
The problem I encountered here was patching, after extracting in my home directory as my home user I couldn't not patch the drivers. Quickly switching to my root user with sudo su and then running the patches fixed that (perhaps this is the root of your opengl problem)

Code:
sudo apt-get install -y build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases
sudo apt-get install -y ia32-libs

cd ~; mkdir catalyst11.6; cd catalyst11.6
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-6-x86.x86_64.run
wget http://www.mindwerks.net/wp-content/uploads/2011/03/2.6.39_bkl.patch
wget http://www.mindwerks.net/wp-content/uploads/2011/03/no_bkl.patch
chmod +x ati-driver-installer-11-6-x86.x86_64.run
sudo sh ./ati-driver-installer-11-6-x86.x86_64.run --extract ati
sudo su
cd ati; for i in ../*.patch; do patch -p1 < $i; done
./ati-installer.sh 8.861 --buildpkg Ubuntu/natty
cd ..
rm -rf ati
dpkg -i fglrx*.deb
exit
sudo aticonfig --initial -f
sudo reboot

Then the libva and xvba. Libva packages were included with the vainfo program from the multiverse.

Code:
sudo apt-get install -y libkms1 libdrm-dev pkg-config vainfo
wget http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.8.0-1_amd64.deb
sudo dpkg -i xvba-video_0.8.0-1_amd64.deb

I did have some problems here where xvba wasn't recognized properly and had to create this link manually:

Code:
cd /usr/lib/dri; ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

After that it was simply installing the lars op den kamp ppa and xbmc

Code:
sudo add-apt-repository ppa:lars-opdenkamp/xbmc-pvr
sudo apt-get install xbmc

And then I could start xbmc with

Code:
xinit xbmc

So like I said, this is all from memory and may be a little sketchy!!!