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)



- WytRaven - 2011-07-09

SDM2011 Wrote:The problem was the Slim login manager, because it doesn't handle policykit properly, and from my reading of the mailing lists, this will not be fixed. So I switched to LightDM, and everything worked perfectly right off the bat.

Thx SDM2011 I'll try that as I had problems with Slim too and also find the Upstart method to be less than perfect as well.


- SDM2011 - 2011-07-10

I'm withdrawing my support for LightDM. I hadn't had a good chance to test it thoroughly beyond the shutdown/suspend issues, and I just noticed that trying to play any videos with hardware acceleration crashes xbmc. I have no idea why this would be, but start xbmc with slim, works perfectly, start from LightDM, crash every time.

In fact, xbmc crashes if I try to start it any other way except via slim, ie. startx and via xbmc-live/uxlaunch. Anyone else with xbmc va-api crash issues, perhaps try starting xbmc via the slim login manager. There are no logged errors to speak of, there's simply a "segmentation fault" printed on the console after the va-api driver is loaded.

Bizarre in the extreme...


- WytRaven - 2011-07-10

I don't get crashing via the upstart method (i.e. no dm at all). However I haven't gotten restart/shutdown etc to work flawlessly yet. However, that may just be from not dedicating any time to figuring out why it isn't working as expected.


- waver123 - 2011-07-11

Hi,
I'm using nemek's iso image on my MSI e350 box.

Everything is pretty much working, 99% of my videos play fine with proper acceleration. The only thing is a couple of times xbmc seems to hung at the thumbnail video browser when I was doing a lot of playing/browsing, the box seems to be still alive and I still alt-f1/f2 into console or ssh into the box, but the gui looks hung. Has anyone seen that before?

I looked at the xbmc.log file when it was hung but don't see anything obvious, thanks.


- SDM2011 - 2011-07-11

I solved xbmc crashing after startx by adding xvba and the driver paths to /etc/environment, as detailed elsewhere in this thread. Either uxlaunch and/or LightDM still crash though, as if they're not affected by the environment. Perhaps I'll try the Upstart method after all, or export those symbols in the scripts used to launch those services.


- Mysob - 2011-07-11

Hi guys. Let me frist tell I used the guide from this topic and some reply's.

I installed Ubuntu 11.04 server and upgraded to 2.6.39 kernel manually.

My problem: After intstalling the ATI drivers my VGA output (cant test HDMI since i donth have cable yet) goes blank. Reboot just gives no terminal screen. Output signal is active, but just no screen. ALT+CTRL+Fx has no results. When starting startx I do get screen. Do you have any clue?

Heres my install log:

Code:
\\ Install guide for VIAKO ML-45 Fusion E350
\\ Use Ubuntu minimal 11.04 (Natty)
\\* boot will fail if installed via USB, so manually (m) fix
\\* /boot partition in /etc/fstab to /dev/sda1 and reboot
\\* Get screen using Ctrl+Alt+F7
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\ After installation is complete boot (Ctrl+Alt+F1) and install SSH
\\\\

sudo apt-get update
sudo apt-get install -y ssh

\\ Connect via SSH and install packages
\\\\

sudo apt-get install -y python-software-properties udisks usbmount ntfs-3g upower acpi-support xorg alsa-utils mesa-utils git-core librtmp0 lirc
\\* Select at lirc "vlsystem ml blast"
sudo usermod --group adm,sudo,cdrom,floppy,audio,video,plugdev,fuse xbmc

\\ Upgrade to kernel 2.6.39-3 with ppa:xorg-edgers/ppa
\\\\

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install linux-headers-2.6.39-3 linux-headers-2.6.39-3-generic linux-image-2.6.39-3-generic --fix-missing
sudo reboot
\\* Verify that you are using kernel 2.6.39-3-generic
uname -r

\\ Vaapi
\\\\

cd ~/; mkdir vaapi; cd vaapi/
wget http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/amd64/libva1_0.32.0-1+sds2_amd64.deb
wget http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/amd64/libva-dev_0.32.0-1+sds2_amd64.deb
sudo apt-get install -y libkms1 libdrm-dev pkg-config
sudo dpkg -i libva1_0.32.0-1+sds2_amd64.deb libva-dev_0.32.0-1+sds2_amd64.deb
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

\\ Install latest ATI drivers (11.6)
\\\\

sudo apt-get install -y fakeroot build-essential cdbs dh-make debhelper debconf libstdc++6 dkms libqtgui4 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 -s
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
sudo aticonfig --initial -f
sudo reboot
\\* Login and start startx. Then via xterm verify:
fglrxinfo
\\* Should respond like this
\\ display: :0.0  screen: 0
\\ OpenGL vendor string: ATI Technologies Inc.
\\ OpenGL renderer string: ATI Radeon HD 6310 Series
\\ OpenGL version string: 4.1.10834 Compatibility Profile Context
fgl_glxgears
vainfo
\\* Should respond someting like this
\\ 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 0
\\ vainfo: VA API version: 0.32
\\ vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
\\ vainfo: Supported profile and entrypoints
\\      VAProfileH264High               : VAEntrypointVLD
\\      VAProfileVC1Advanced            : VAEntrypointVLD

\\ Install git and checkout 10.1 branch
\\\\

git clone https://github.com/xbmc/xbmc.git
cd xbmc
git checkout 10.1-Dharma
sudo apt-get install python-support cmake autotools-dev autoconf automake autopoint unzip libboost-dev zip libtool libgl1-mesa-dev libglu-dev libglew-dev libmad0-dev libjpeg-dev libsamplerate-dev libogg-dev libvorbis-dev libfreetype6-dev libfontconfig-dev libbz2-dev libfribidi-dev libsqlite3-dev libmysqlclient-dev libasound-dev libpng12-dev libpcre3-dev liblzo2-dev libcdio-dev libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libenca-dev libjasper-dev libxt-dev libxmu-dev libxinerama-dev libcurl4-openssl-dev libdbus-1-dev libhal-storage-dev libhal-dev libpulse-dev libavahi-common-dev libavahi-client-dev libxrandr-dev libavcodec-dev libgtk2.0
sudo apt-get install libavformat-dev libavutil-dev libpostproc-dev libswscale-dev libmpeg2-4-dev libass-dev libmpcdec-dev libflac-dev libwavpack-dev python-dev gawk gperf nasm libcwiid1-dev libbluetooth-dev zlib1g-dev libsmbclient-dev libiso9660-dev libssl-dev lsb-release libvdpau-dev libmicrohttpd-dev libmodplug-dev librtmp-dev curl python-dev libyajl-dev libxtst-dev libfaad-dev libmms-dev yasm
\\* Enable libbluray
cd ~
git clone git://git.videolan.org/libbluray.git
cd libbluray/
./bootstrap
./configure --prefix=/usr
make
sudo make install
cd ~/xbmc
./bootstrap
./configure --prefix=/usr/local/xbmc --enable-vaapi --enable-libbluray
//* Output should be like this:
------------------------
  XBMC Configuration:
------------------------
  Debugging:    Yes
  Profiling:    No
  Optimization: Yes
  Crosscomp.:   No
  target ARCH:  no
  target CPU:   no
  OpenGL:       Yes
  VDPAU:        Yes
  VAAPI:        Yes
  CrystalHD:    No
  VDADecoder:   No
  OpenMax:      No
  Joystick:     Yes
  XRandR:       Yes
  GOOM:         No
  Bluray:       Yes
  MID Support:  No
  ccache:       No
  PulseAudio:   Yes
  HAL Support:  Yes
  FAAC:         No
  DVDCSS:       Yes
  Avahi:        Yes
  Non-free:     Yes
  ASAP Codec:   No
  Webserver:    Yes
  libRTMP support:      Yes
  Deprecated libdts:    No
  Deprecated liba52:    No
  External FFmpeg:      No
  External Python:      No
  prefix:       /usr/local/xbmc
------------------------

make -j2
sudo make install



- wsnipex - 2011-07-11

just guessing, but you have changed tty1.conf.
try changing that back to original and see if you get a terminal at boot. if yes try running xbmc manually. if it works, go from there.

and if you compile xbmc from git, it would be better to leave out useless hw acceleration options.
I bet you have either Nvidia or ATI and most probably don't have a crystalHD card.


- Mysob - 2011-07-11

wsnipex Wrote:just guessing, but you have changed tty1.conf.
try changing that back to original and see if you get a terminal at boot. if yes try running xbmc manually. if it works, go from there.

and if you compile xbmc from git, it would be better to leave out useless hw acceleration options.
I bet you have either Nvidia or ATI and most probably don't have a crystalHD card.

The screen was blank before I had changed the tty1.conf. It boots nor gui (ofcource) but CLI also don't show.

Ill redo the whole setup with 2.6.39-3 and xbmc-pvr. Maybe that is a better option Smile


- Balinus - 2011-07-11

Hello!

Just stumbled upon this thread. I am deciding on which CPU/GPU I should buy. I read in the 1st post that VAAPI is now working?

So, I just want to know if the Zacate combo is working correclty in XBMC?

Here's my objectives with this future HTPC:
  • Use XBMC (either XBMC Live, OpenElec or any linux distro)
  • Play 1080p content
  • Play interlaced content (Home videos) from 480i, 720i and later on 1080i format (deinterlacing will be done by XBMC)
  • play HD content from Internet (Flash content)

If one of this objective cannot be achieved under Zacate/XBMC set-up, I will buy something else. I don't mind tweaking a little bit, but I need something functional and somewhat reliable. I also don't mind waiting 2-3 months before this set-up is fully functional with respect to my objectives.

Thanks!

edit - Als, if you have any MB sugestion that works well with Linux, let me know! Smile


- Robotica - 2011-07-11

Balinus Wrote:Hello!

Just stumbled upon this thread. I am deciding on which CPU/GPU I should buy. I read in the 1st post that VAAPI is now working?

So, I just want to know if the Zacate combo is working correclty in XBMC?

Here's my objectives with this future HTPC:
  • Use XBMC (either XBMC Live, OpenElec or any linux distro)
  • Play 1080p content
  • Play interlaced content (Home videos) from 480i, 720i and later on 1080i format (deinterlacing will be done by XBMC)
  • play HD content from Internet (Flash content)

If one of this objective cannot be achieved under Zacate/XBMC set-up, I will buy something else. I don't mind tweaking a little bit, but I need something functional and somewhat reliable. I also don't mind waiting 2-3 months before this set-up is fully functional with respect to my objectives.

Thanks!

edit - Als, if you have any MB sugestion that works well with Linux, let me know! Smile

it works..


- Balinus - 2011-07-11

Robotica Wrote:it works..

Nice! Smile I guess I'm going back into AMD realm...


- Robotica - 2011-07-11

Balinus Wrote:Nice! Smile I guess I'm going back into AMD realm...

You won't regret. Also I ouwld go for the ASUS mobo.. It is the best of Zacate.


- Balinus - 2011-07-11

Robotica Wrote:You won't regret. Also I ouwld go for the ASUS mobo.. It is the best of Zacate.

I have a nice rebate on a combo on a Zotac (LGA775) with Nvidia 9300. I woyuld add a Celeron E3400 with it.

In your opinion, is it equivalent to the Zacate?


- Robotica - 2011-07-11

X3lectric Wrote:@ robotica I put some libva packages that you can use on your guide, Im a nvidia guy not ati/intel but nonetheless this topic can do with some updates.

https://launchpad.net/~x3lectric/+archive/vaapi

on another note you compile xbmc dependecies are missing some new deps that been added since you done this...

Great topic.

thnx for the headsup...
I'll wait with adding ppa's untill this platform is stable to update. Deps should be copied from the readme. I will add that to the OP.


- Mysob - 2011-07-12

Robotica Wrote:it works..

Please update the kernel in the OP then. The PPA is not correct and it misses dependencies for XBMC.

@ SDM2011

Is this install similar to yours or did you compile Libva via PPA? If not please update it so we have also a good read-me for XBMC-PVR up and running.

Code:
\\ Install guide for VIAKO ML-45 Fusion E350
\\ Use Ubuntu minimal 11.04 (Natty)
\\* boot will fail if installed via USB, so manually (m) fix
\\* /boot partition in /etc/fstab to /dev/sda1 and reboot
\\* Get screen using Ctrl+Alt+F7
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\ After installation is complete boot (Ctrl+Alt+F1) and install SSH
\\\\

sudo apt-get update
sudo apt-get install -y ssh

\\ Connect via SSH and install packages
\\\\

sudo apt-get install -y python-software-properties udisks usbmount ntfs-3g upower acpi-support xorg alsa-utils mesa-utils git-core librtmp0 lirc
\\* Select at lirc "vlsystem ml blast"
sudo usermod --group adm,sudo,cdrom,floppy,audio,video,plugdev,fuse xbmc

\\ Upgrade to kernel 2.6.39-3 with ppa:xorg-edgers/ppa
\\\\

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install linux-headers-2.6.39-3 linux-headers-2.6.39-3-generic linux-image-2.6.39-3-generic --fix-missing
sudo reboot
\\* Verify that you are using kernel 2.6.39-3-generic
uname -r

\\ Vaapi (Not sure this is the method by SDM2011)
\\\\

cd ~/; mkdir vaapi; cd vaapi/
wget http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/amd64/libva1_0.32.0-1+sds2_amd64.deb
wget http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/amd64/libva-dev_0.32.0-1+sds2_amd64.deb

sudo apt-get install -y libkms1 libdrm-dev pkg-config
sudo dpkg -i libva1_0.32.0-1+sds2_amd64.deb libva-dev_0.32.0-1+sds2_amd64.deb

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

\\ Install latest ATI drivers (11.6)
\\\\

sudo apt-get install -y build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases blackbox
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 -s
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
sudo aticonfig --initial -f
sudo reboot
\\* Login and start startx. Then via xterm verify:
fglrxinfo
\\* Should respond like this
\\ display: :0.0  screen: 0
\\ OpenGL vendor string: ATI Technologies Inc.
\\ OpenGL renderer string: ATI Radeon HD 6310 Series
\\ OpenGL version string: 4.1.10834 Compatibility Profile Context
fgl_glxgears
vainfo
\\* Should respond someting like this
\\ 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 0
\\ vainfo: VA API version: 0.32
\\ vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
\\ vainfo: Supported profile and entrypoints
\\      VAProfileH264High               : VAEntrypointVLD
\\      VAProfileVC1Advanced            : VAEntrypointVLD

\\ Install XBMC PVR
\\\\

sudo apt-add-repository ppa:lars-opdenkamp/xbmc-pvr
sudo apt-get update
sudo apt-get install -y xbmc
sudo apt-get install -y xbmc-live