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)



- Robotica - 2011-05-10 22:47

The major fusion issues should be fixed with this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8aeb96f80232e9a701b5c4715504f4c9173978bd

It's in 2.6.39 now and will be showing up in the stable trees soon.


- Qroach - 2011-05-11 14:49

what major issues does the patch fix? crashing or something?


- tuxfool - 2011-05-12 13:31

Robotica Wrote:The major fusion issues should be fixed with this patch:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8aeb96f80232e9a701b5c4715504f4c9173978bd

It's in 2.6.39 now and will be showing up in the stable trees soon.

That patch should only be for radeon (i.e. the opensource driver); Absolutely nothing to do with fglrx. You can of course use radeon for xbmc but do don't get any video acceleration.


- wobu - 2011-05-12 14:27

tuxfool Wrote:That patch should only be for radeon (i.e. the opensource driver); Absolutely nothing to do with fglrx. You can of course use radeon for xbmc but do don't get any video acceleration.

this can change soon Smile

according to Christian König, a well known xorg radeon driver developer, his implementation of VDPAU for the radeon driver is at a early Beta stadium.


- htpcero - 2011-05-15 21:32

Robotica Wrote:This topic is a follow-up to this topic: AMD Fusion based hardware for a HTPC?

Since team-xbmc PPA are not compiled with VAAPI enabled (and the needed dependencies are missing in most Linux distro's), we need a thread for Zacate based hardware to get XBMC running. A user did all this work and posted a precompiled version overhere (custom xbmc-live ubuntu 10.10 x64 build). There also is a precompiled VAAPI XBMC (including PVR). Since openelec.tv and XBMC(Freak)Live aren't supporting this hardware either, the only other way to get this hardware running with XBMC, is to compile xbmc yourself. (With Windows this platform works like a charm already and it beats ATOM/ION on price, performance and features)

So now we have this nice list of available motherboards:

Those boards aren't available all over the world. I bought mine in the UK.
I think it would be sensible to buy the cheap ASRock board or the expensive ASUS board.

Some usage figures from above MSI-topic (won't be much different for the other boards):
Code:
Sleep mode - 1w draw
Windows idle - 0-1% cpu usage/17w draw
XBMC idle - 20-26% CPU usage/25-26w draw
480p MKV h.264 - 8-11% CPU usage/18w draw
720p MKV h.264 - 10-15% CPU usage/18-19w draw
1080p MKV h.264 - 13-15% CPU usage/19-20w draw

This is on Win with a quality 90w picoPSU, 2* low voltage memory and an SSD.

There is lots of information about all the problems related to VAAPI, AMD, drivers and hardware accelaration in Linux. In the meanwhile, nice developments happened and the platform is ready for a HTPC with Linux. What happened?
  • AMD added support for their Fusion Platform with their closed source catylist drivers from day one the products hit the market.
  • Open Source drivers are updated and getting better and better
  • Problems related to VAAPI and XBMC are fixed.
  • VAAPI is not enabled in XBMC 10.0 and 10.1. and the nightly builds. I assume this will happen very soon.
  • Genereal Linux developments (like ALSA, MESA, kernel, etc.). It is waiting for an updated kernel to get easy access to all those developments.

Here you can find most info to compile XBMC for yourself. But this topic is to make it easy for you untill the needed stuff gets into Linux distributions like Ubuntu.

Here we go....

We will need an 64-bit 10.10 Ubuntu Maverick install (mini or full) to start with. (11.04 will be tested later) This guide is based on the mini version.

If you have a minimal install, start with installing basic packages and add you to the video group.( this is actually important, because without this xserver can not access your gpu directly and falls back to software rasterizer)

Code:
sudo apt-get update
sudo apt-get install udisks upower xorg alsa-utils mesa-utils
sudo adduser YourUserName video
sudo adduser YourUserName audio
sudo reboot


Basically what you have to do is:
1. install va-api stuff (3 libs [libva & libva-dev & xvba-video] from splitted-desktop.com)
2. install catalyst
3. confirm if everything is ok (run vainfo) - if its reporting an error its probably missing linkage
4. compile patched xbmc with va-api enable

Step 1:


Step 2: install catalyst 11.4
http://wiki.cchtml.com/index.php/Ubuntu_Maverick_Installation_Guide

Step 3:

1. Start xbmc in safe mode (or kill xbmc with xserver)
2. type: startx - enter (to start Xorg)
3. left mouse click -> applications -> shells -> bash
4. here u may check vainfo etc

Output should be something like this:
Code:
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD



Robotica - thanks for getting this started. Mind posting the instructions on how to compile your own XBMC from sources, patch it, and get vaapi enabled?

Myself, I will need a PRE-11 version 'cause some add-ons require it to work properly.


- wobu - 2011-05-16 08:06

1. firstly install all Vaapi packages
2. checkout xbmc via git, i took the current pvr development (patching isn't needed anymore)

Code:
git clone https://github.com/opdenkamp/xbmc.git

3. Look into the README file for linux and install all packages needed for compiling xbmc
4. compile and install xbmc
5. insert into the /etx/X11/xorg.conf following section


Code:
Section "Extensions"
        Option      "Composite" "Disable"
EndSection

i needed it but i don't now exactly why, cause otherwise my xbmc always crashed on playing a video file


Question on VAAPI being enabled - gven - 2011-05-16 08:43

Forgive a noob but from reading elsewhere I understood that if VAAPI was not enabled in XBMC, then the option to enable it will not appear in the Video playback settings menu. I have a 10.1 repository build (packman) for OpenSuse that shows this option, but VAAPI is not working for me (on Sandybridge not on AMD fusion but that is a different thread).

Does that setting being there indicate a VAAPI enabled XBMC build or not? If not, is there some other way of checking whether an XBMC build has VAAPI enabled?

Thanks


Graphics driver instability? - SDM2011 - 2011-05-18 04:16

ASUS E35M1-I Deluxe on Ubuntu Natty x64, with team-xbmc ppa here.

Does anyone else experience crashes when attempting to shut down? I'm running the latest flgrx and xorg, and if I've been running the system for awhile, I can't shut down cleanly. Sometimes I get a hard lockup, sometimes I get a kernel panic. This happened with previous xorg and fglrx versions as well.

I've also had issues where xbmc starts stuttering during video play. It's rare with video files, but it's particularly bad with streaming video, ie. I can trigger video stuttering almost immediately from a fresh boot on comedy network streams. Once stuttering begins, it doesn't stop until I reboot, no matter what I try to play.

It's got to either be a video driver issue, or in the vaapi/xvba to driver layer, or how xbmc is handling vaapi. Since others haven't experienced issues, I'm guessing it's one of the first two.

Any suggestions much appreciated.


- htpcero - 2011-05-18 04:33

SDM2011 Wrote:ASUS E35M1-I Deluxe on Ubuntu Natty x64, with team-xbmc ppa here.

I'm planning to do the same (natty x64 on e35m1-i deluxe) but building the latest pre-11 xbmc myself with vaapi enabled. I think with the ppa you are probably not getting a vaapi enabled build plus it might be an older build. All the people in this thread are probably running with vaapi enabled - and they don't seem to be reporting this kind of issues. Or at least I hope they are not experiencing them Smile


- SDM2011 - 2011-05-18 04:35

team-xbmc ppa has vaapi enabled, or at least mine certainly does. I have no problems playing any video, even 1080p, and the vaapi option is there under video settings.

EDIT: I should specify that the team-xbmc ppa I'm using are the git builds, not the 10.1 build.