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

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: [LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform (/showthread.php?tid=99154)



- c-shadow - 2011-07-13 19:30

I also thought it could be something sound related. Since the live build doesn't have pulseaudio, it's either alsa or xbmc itself. I'll could try upgrading to some of the precompiled builds (nightly or maybe pvr) + catalyst 11.6 + newest alsa (1.0.24). My board uses Realtek ALC892 chip. What does MSI E350 have?


- waver123 - 2011-07-13 21:07

c-shadow Wrote:I also thought it could be something sound related. Since the live build doesn't have pulseaudio, it's either alsa or xbmc itself. I'll could try upgrading to some of the precompiled builds (nightly or maybe pvr) + catalyst 11.6 + newest alsa (1.0.24). My board uses Realtek ALC892 chip. What does MSI E350 have?

I think it uses realtek ALC887 chip but I'm using hdmi out, I assume the apu will handle the audio in that case?


- Robotica - 2011-07-13 21:51

waver123 Wrote:I think it uses realtek ALC887 chip but I'm using hdmi out, I assume the apu will handle the audio in that case?

As far as I know, the realtek chip handles all audio encoding. The chip is physically connected to output ports like HDMI/spdif or others. The HDMI port also receives the encoded video stream from the APU.


- kaulalla - 2011-07-14 14:22

Hi!

I had a working version of Xubuntu 11.04 x64 Desktop and XBMC w VAAPI (kudos to Wytraven, whose guide i followed to set it up Smile

I was stupid enough to do site apt-get update today, now XBMC wont start: "XBMC needs hardware accelerated OpenGL rendering"

I reinstalled Catalyst (according to Wytraven's manual), then also tried using xvba-va-driver_0.7.8-1ubuntu1_amd64.deb & libva-glx1_1.0.12-2_amd64.deb, still nothing.

Here are the outputs:

Quote:fglrxinfo: Error: couldn't find RGB GLX visual!

althought once i also managed to get this output (dunno how):

Quote:display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon HD 6300 series Graphics
OpenGL version string: 1.4 (2.1 (4.1.10834 Compatibility Profile Context))

vainfo:

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

Other pieces of information:
Catalyst Version: 11.6
Driver packaging version: 8.861-110524a-121963C-ATI
2D Driver Version: 8.86.5

OpenGL Version: 1.4 (2.1 (4.1.10834 Compatibility Profile Context)

Please advise for a noob! Smile Thanks for all the effort in advance!


- c-shadow - 2011-07-14 14:45

Same problem here. Yesterday I tried fresh natty install using Wytraven's guide.

Code:
root@xbmc:~/xvba# vainfo
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
root@xbmc:~/xvba# fglrxinfo
Error: couldn't find RGB GLX visual!



Working Acceleration, Sort Of - lakerssuperman - 2011-07-14 16:36

I have an Asus 1215b with the E-350 chipset. Under Ubuntu 11.04 I couldn't get anything working. XBMC would simply crash with VAAPI enabled. I am currently running Elementary OS, which is just a custom spin of Ubuntu 10.10. Using the 11.6 driver, libva 1.0.31 from the XBMC PVR ppa I am getting acceleration in XBMC. It isn't perfect though. I have the 1080p 24 frame issue with a variety of clips.

The other strange behavior is that the CPU usage is in the 30-40% range, which is fine when compared to 80-90%, but still seems high. The other thing is that if I try VLC with acceleration on, playing the same clip my CPU usage spikes to near 90%. If I use Gnome MPlayer it doesn't even display the video, it only gives me sound. I am happy to have, at least, some type of acceleration but I am hoping that I can get it to work in all players with all clips.

I have looked at numerous tutorials but I am not sure what to try tweaking. Anyone have any advice or experience similar behavior.

EDIT: I realized that I am running stock Mplayer and it doesn't have VAAPI enabled. I have been searching around for a PPA that has a version with VAAPI built in but haven't come up with anything yet.

Also, running the same OS and XBMC setup on another machine with a Radeon 4650 did not produce any graphical artifacts on the same 1080p mkv file that was corrupted on the E-350. Is the 1080p 24 frame bug limited to E-350? After looking through this thread I was under the assumption that it affected all ATI/AMD hardware and was a bug in XBMC.

EDIT #2 - I had been running the 1080p video off my external hard drive. With this method I had been getting corruption. I copied the file to the hard drive and played it back with no corruption. I have no idea why this would be a problem as it has never been playing back files with XBMC on my ION platforms.


- Robotica - 2011-07-14 17:00

Finally there is a request for VAAPI in the official Unstable PPA Natty builds. See:
http://trac.xbmc.org/ticket/11736

and also openelec announched vaapi-support: http://www.openelec.tv/component/k2/item/188-working-vaapi-xvba-for-amd-fusion-devices-added


- Genibox - 2011-07-16 13:13

Hi,

I tried a clean install with Wytraven's guide however when testing the following:

Code:
export DISPLAY=:0
fglrxinfo

I keep getting

Code:
Error: unable to open display (null)

Any help please?

thx


- Mysob - 2011-07-17 12:04

Guys

I made a new install how-to on wytravens build. X-edgers PPA doesnt have 2.6.39-3 anymore.

Good luck. Readme have been testen and works:

Code:
\\ Install guide for VIAKO ML-45 Fusion E350
\\ Use Ubuntu minimal 11.04 (Natty)
!! boot will fail if installed via USB, wait for ubuntu to
!! fix the fstab itself. After get screen using Ctrl+Alt+F1
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\ After installation is complete boot (Ctrl+Alt+F1) and install SSH
sudo apt-get -y install openssh-server


!! Connect via SSH and continue. Start using sudo -s from here
\\ Remove ufw firewall
apt-get -y remove --purge ufw


\\ Compile 2.6.39-3 (Since 2.6.39* branche are on no ppa anymore)
apt-get -y install kernel-package libncurses5-dev fakeroot wget bzip2
cd ~/; mkdir kernel; cd kernel/
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.3.tar.bz2
tar jxvf linux-2.6.39.3.tar.bz2
cd linux-2.6.39.3/
cp /boot/config-`uname -r` .config
yes '' | make oldconfig
!! Note: CONCURRENCY_LEVEL = cpu cores + 1
CONCURRENCY_MAKE_LEVEL=`cat /proc/cpuinfo | grep -c '^processor[[:cntrl:]]*:'` fakeroot make-kpkg --initrd kernel_image kernel_headers
cd ..
dpkg -i linux*.deb
reboot

!! Connect via SSH and continue. Start using sudo -s from here
uname -r

!! If responds is 2.6.39-3 remove old kernel
apt-get -y remove linux-headers-2.6.38-10 linux-headers-2.6.38-10-generic linux-image-2.6.38-10-generic
update-grub


\\ Add PPAs
apt-get -y install python-software-properties
add-apt-repository ppa:lars-opdenkamp/xbmc-pvr
add-apt-repository ppa:ubuntu-x-swat/x-updates
apt-get update


\\ Install packages for configuration
apt-get -y install build-essential cdbs dh-make debhelper debconf git libstdc++6 dkms libqtgui4 execstack libelfg0 dh-modaliases ia32-libs


\\ Replace broken NIC driver with one provided by vendor
cd ~; mkdir realtek; cd realtek/
wget http://www.wytraven.com/binaries/r8168-8.024.00.tar.bz2
tar xvfs r8168-8.024.00.tar.bz2
cd r8168-8.024.00
./autorun.sh
cd ~
rm -rf realtek


\\ Update /etc/modprobe.d/blacklist.conf inserting the following lines
echo "" >> /etc/modprobe.d/blacklist.conf; echo "# Replaced by r8168 for the NIC RTL8111E" >> /etc/modprobe.d/blacklist.conf; echo "blacklist r8169" >> /etc/modprobe.d/blacklist.conf


\\ Install Xorg
apt-get install -y xorg xfonts-100dpi xfonts-75dpi xfonts-scalable xinput


\\ Install mesa & alsa
apt-get -y install mesa-utils; apt-get -y install alsa-utils


\\ remove wireless-crda
apt-get autoremove

\\ Install disk and power abstractions plus RTMP protocol and IR support
apt-get install -y udisks upower librtmp0 lirc
reboot


!! Connect via SSH and continue. Start using sudo -s from here
\\ Install Catalyst 11.6
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
sh ./ati-driver-installer-11-6-x86.x86_64.run --extract ati
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
aticonfig --initial -f


\\ Blacklist radeon driver
echo "" >> /etc/modprobe.d/blacklist.conf; echo "# Replaced by fglrx for the AMD APU" >> /etc/modprobe.d/blacklist.conf; echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf


\\ Add some fglrx related variables to environment
echo "" >> /etc/environment; echo "LIBVA_DRIVERS_PATH=/usr/lib/dri" >> /etc/environment; echo "LIBVA_DRIVER_NAME=fglrx" >> /etc/environment


\\ gl_conf - select fglrx option
update-alternatives --config gl_conf
reboot

!! Connect via SSH and continue. Start using sudo -s from here
\\ Vaapi
apt-get -y install libva-glx1
cd ~; mkdir xvba; cd xvba
wget https://launchpad.net/~rexbron/+archive/bugfixes/+files/xvba-va-driver_0.7.8-0ubuntu1_amd64.deb
dpkg -i xvba-va-driver_0.7.8-0ubuntu1_amd64.deb
cd ~
apt-get -y install vainfo


\\ Test fglrx and VAAPI Backend
!! You propably get errors here, just move on
export DISPLAY=:0
fglrxinfo
vainfo


\\ Configure ALSA
alsamixer

-----alsamixer-----
Ensure HDMI device is selected (F6)
Hit "m" to switch SPDIF to On. Display will switch from two MM to two OO
Hit esc
-------------------

alsactl store


\\ Install XBMC PVR
apt-get build-dep -y xbmc
apt-get install -y xbmc
apt-get install -y xbmc-live

Last part is to add all the codecs where xbmc relies on. Before I made this readme I used Wytravens build, but as apt-get install XBMC doesnt intall there codec's I did a an apt-get build-dep XBMC. This f*cked up the the ATI drivers and HW acceleration (OpenGL). My geus it was because of the PPA by xedgers (also blame that ppa for the xorg faults that you get with Wytravens build). Now before I do this again ill post the output of apt-get build-dep XBMC.

Update. Nevermind just did a build-dep and it did not broke it down.


- c-shadow - 2011-07-17 12:40

How about using kernel-ppa for a precompiled packages, as described in wiki?
https://wiki.ubuntu.com/Kernel/MainlineBuilds
It contains mailnline kernels without ubuntu patches, just like the one in the howto, but at least there is no need for compiling.

EDIT:
BTW, what's wrong with NIC driver?
Didn't notice any problems.


- Mysob - 2011-07-17 15:17

c-shadow Wrote:How about using kernel-ppa for a precompiled packages, as described in wiki?
https://wiki.ubuntu.com/Kernel/MainlineBuilds
It contains mailnline kernels without ubuntu patches, just like the one in the howto, but at least there is no need for compiling.

EDIT:
BTW, what's wrong with NIC driver?
Didn't notice any problems.

As said before that PPA is empty and Xedgers has also deleted the kernel. MainlinesBuilds has only 2.6.39 for the Oneiric build.


- sraue - 2011-07-17 16:11

Mysob Wrote:
Code:
!! Note: CONCURRENCY_LEVEL = cpu cores + 1
CONCURRENCY_LEVEL=3 fakeroot make-kpkg --initrd kernel_image kernel_headers

one tip:
Code:
CONCURRENCY_MAKE_LEVEL=`cat /proc/cpuinfo | grep -c '^processor[[:cntrl:]]*:'`
sets the makelevel automatically based on the number of cpus/cores you have buildin


- Mysob - 2011-07-17 16:19

sraue Wrote:one tip:
Code:
CONCURRENCY_MAKE_LEVEL=`cat /proc/cpuinfo | grep -c '^processor[[:cntrl:]]*:'`
sets the makelevel automatically based on the number of cpus/cores you have buildin

Thanks & edited it.


- Mysob - 2011-07-17 17:25

Just tested apt-get build-dep xbmc in this build and it does not break things down!

Updated the How-to


- WytRaven - 2011-07-18 00:23

c-shadow Wrote:How about using kernel-ppa for a precompiled packages, as described in wiki?
https://wiki.ubuntu.com/Kernel/MainlineBuilds
It contains mailnline kernels without ubuntu patches, just like the one in the howto, but at least there is no need for compiling.

EDIT:
BTW, what's wrong with NIC driver?
Didn't notice any problems.

Hi c-shadow. The NIC (with the driver installed by ubuntu) will have troubles at gigabit speeds during sustained transfers. This applies to ASUS E35M1-I Deluxe (or any other board using this Realtek chip).