[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform - Printable Version
+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Kodi 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)
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform - Robotica - 2011-04-12 16:04
This topic is a follow-up to this topic: AMD Fusion based hardware for a HTPC?
There is lots of information about all the problems related to VAAPI, AMD, drivers and hardware accelaration in Linux (with Windows 7 this platform works like a charm already and it beats ATOM/ION on price, performance and features). In the meanwhile, nice development happened and the platform is ready for a HTPC with Linux. What happened?
team-xbmc PPA can't be used until this ticket is closed.
Since needed dependencies are missing in most Linux distro's, compiling yourself a build is not easy. Right now, there are 2 compiled options for you (with VAAPI enabled):
- openelec.tv: this is work in progress; you can download an experimental build. This is the best and easiest way to try AMD + Zacate + Linux.
- XBMC(Freak)Live: added fglrx driver but isn't supporting this hardware yet.
The only other way to get this hardware running with XBMC on Linux, is to compile xbmc yourself. I went for Ubuntu Natty Mini (11.04) x64. Here, Natty installation guide and here you can find most info to compile XBMC for yourself. I would recommend not to build on your AMD Fusion machine since that cant take over 2 hours to build. Instead, use a better desktop with a virtual environment to build your Linux system and use i.e. unetbootin to export the .iso to the usb.
Here we go....
Basically what you have to do is:
1. Install & update mini OS based on Ubuntu;
2. Install va-api stuff ;
3. Install catalyst;
4. Confirm if everything is ok;
5. Install & compile xbmc 10.1.
Of course this guide will be coming less and less complicated as the git changes get into the Ubuntu packages. I will try to update this guide when there is a change which makes it less complicated.
Wytraven created a step-by-step guide similar to the one below.
We will use an 64-bit 11.04 Ubuntu Natty minimal to start with the newest basic packages for your OS.
Choose Command-line-install and use xbmc for username.
After reboot, install ssh so you can continue work with Putty (for win) or with the "ssh -l xbmc your.IP.address" from a linux terminal. Also we install py-properties to easy add ppas. Also add the user (I have chosen XBMC as the username) to the video and audio group because without this xserver can not access your gpu directly and falls back to software rasterizer. Get a terminal with crtl+alt+f1, than
Upgrade to 3.0 kernel from ppa:xorg-edgers/ppa and reboot with the new kernel.
Verify that you are using kernel 3.0
Optionally you can disable ppa:xorg-edgers/ppa untill everything is more mature.
and comment out the two lines (or move that file away), after which you have to
The source of the 3 needed libs [libva & libva-dev & xvba-video] from splitted-desktop.com.
If xvba isn't recognized properly then you have to create this symbolic link manually:
add these lines to the "/etc/environment" file
We need to install the latest AMD/ATI drivers (now: 11.7). See this howto and those install notes. As the Zacate/Fusion platform is brand new, I recommend to keep them (but also ALSA, MESA and X.org) always up to date with Xorg-edge and x-updates PPA's (will be re-enabled once the system runs).
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 can check vainfo and fglrxinfo etc
Output should be something like this:
(And yes, mpeg2/SD Content isn't accelerated by AMD/ATI and that's not too bad since CPU can handle it)
and for fglrxinfo it should be like this:
Install git and checkout 10.1 branch
Before we can build XBMC we need to install some prerequisites/dependencies (Deps should be copied from the readme README.linux)
Continue to 2nd post.
- Robotica - 2011-04-12 16:06
Optional alternative step: Bluray navigation support
(that is handy if you have m2ts files with index files and you want to navigate to certain chapters on the bluray disc)
First compile libbluray: (see this)
You should now be able to start XBMC via /usr/local/xbmc/bin/xbmc
When XBMC is running make sure to select the following options:
To show temps in XBMC, add those lines to advancedsettings.xml
For suspend, shutdown problems:
Above is for ASUS E35M1-I Deluxe.
Known issues with XBMC:
Before posting bug reports on TRAC it make sense to do some testing with Mplayer.
To install Mplayer:
You can check a film with:
If Mplayer plays the file fine then it is time for some log files: Xorg.0.log, aticonfig, glxinfo, xbmc.log & dmesg. Check this out for decent bug-reporting.
Some usage figures from the MSI-topic (won't be much different for the other boards):
Maybe on mini ubuntu, this draws can be even lower.
Some hardware specific remarks:
- poppy10 - 2011-04-12 20:37
Robotica Wrote:A user did all this work and posted a precompiled version overhere.
I looked through al 8 pages of that thread and couldn't find a link to the precompiled XBMC build
- Robotica - 2011-04-15 12:51
Link in OP is also updated.
- Krautmaster - 2011-04-15 17:35
well done, ill share my information then
==> catalyst installation
after installing Catalyst 11.3 , the newest libva , libva-dev and xvba ist should look like this or?
- Robotica - 2011-04-15 17:49
Thnx. Will updated the OP once a day for comming week. Hopefully more users post results/bugs/temps/etc. And when there are brand specific topics I will add a link aswell.
- Krautmaster - 2011-04-15 18:05
yeah i will clean my upper post as well when u include my information
Downloading the git of xbmc right now, building it within the next 2 hours i hope.
- Robotica - 2011-04-15 18:15
Krautmaster Wrote:yeah i will clean my upper post as well when u include my information
Don't forget the surface patch (see step 4). And off course your info will be included!
VAinfo look good.
- Krautmaster - 2011-04-15 18:39
is it the same patch alan applies here?
if not, how to patch and what exactly?
it works, i built the xbmc-pvr from lars. But... i patched it like i did that before with this patch from above but the stucking problem exists =/
So, how to patch
Okay, one movie was stucking but avatar works fine so far. But without vsync. i only have an hd ready tv with 50 and 25 hz.
Other HD movies causes up to 30% but rare. Any idea how to fix the border i got using hdmi? normaly my tv overscans but here i got light underscan.
cpu load playing avatar: ~15-20%
i must say, the visual experience was slightly better on my Intel system. I have to correct contrast and gamma values and its seems to be minimal less fluently.
=> cant choose deinterlacing having VAPPI enabeld, same as with Intel System so far
Summary so far:
Zacate MSI E350 Board:
VAAPI works fine on ubuntu 10.10. XBMC is fast, really good usability. Boot time from ssd is okay too. All over i am positive surprised.
1. get Audio running
2. am i able to open the Catalyst center with my minimal install?
- Robotica - 2011-04-16 10:12
no, that patch something else. The patch I mention is needed to get VAAPI working correctly.
- Krautmaster - 2011-04-16 10:28
yeah but are the actual github files not patched already? vaapi looks fine so far but i dont know how to start catalyst control center now (want to overscan + auto deinterlace)
Edit: how to apply ur patch?
Edit: works absolutely smooth without patching using lars dharma-pvr release
Edit: really cool! due to the fact, that xvba does not accelerate mpeg , SD interlaced LiveTVcan be deinterlaced with cpu power. Works fine with Zacate! Usability is as good as with i3 2100
On the intel system, with VAAPI enabled, live TV stutters.
To fix the Sound Problem:
Quote:add "options snd_hda_intel index=1" to the bottom of "/etc/modprobe.d/alsa-base.conf".
Edit. Okay sometimes i have this problem with this stuttering VAAPI mode. Does the patch help there?
Quote:root@htpc:/usr/src/xbmc/xbmc/cores/dvdplayer/DVDCodecs/Video# patch -p0 < vaapi_surface_reuse.patch patch unexpectedly ends in middle of line
- mickc - 2011-04-18 16:52
the OP said to use the latest libva, libva deva and xvba
are these the correct ones?
- joostp - 2011-04-18 21:12
Thanks for this topic.
The patch seems to fix my playback problems.
I also got some errors when I patched xbmc, but when I checked the vaapi file all the changes were made.
- Badmaster - 2011-04-20 09:05
Krautmaster Wrote:well done, ill share my information thenhi!
I'm getting the same output from vainfo you are getting (ASRock E350M1). is/was this correct?
I'm getting a ton of strange blue shades in the XBMC GUI and playing back a movie just gives me total chaos with mostly green "puke"
i tried following this tutorial on the forums here...
vaapi xbmc debug log:
help would be greatly appreciated 0:-)
- Robotica - 2011-04-21 12:17
Did you apply this patch: http://trac.xbmc.org/ticket/10928 ?