[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) |
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform - Robotica - 2011-04-12 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):
Other options: - 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. Step 1: 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 Code: sudo apt-get update Upgrade to 3.0 kernel from ppa:xorg-edgers/ppa and reboot with the new kernel. Code: sudo add-apt-repository ppa:xorg-edgers/ppa Verify that you are using kernel 3.0 Code: uname -r Optionally you can disable ppa:xorg-edgers/ppa untill everything is more mature. Code: sudo nano /etc/apt/sources.list.d/xorg-edgers-ppa-natty.list and comment out the two lines (or move that file away), after which you have to Code: sudo apt-get update Step 2: The source of the 3 needed libs [libva & libva-dev & xvba-video] from splitted-desktop.com. Code: cd ~/; mkdir vaapi; cd vaapi/ If xvba isn't recognized properly then you have to create this symbolic link manually: Code: cd /usr/lib/dri; ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so With Code: sudo nano /etc/environment add these lines to the "/etc/environment" file Code: LIBVA_DRIVER_NAME=xvba Step 3: 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). Code: sudo apt-get install -y build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases generate xorg.conf Code: sudo aticonfig --initial -f Step 4: 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: Code: libva: libva version 0.32.0 (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: Code: display: :0.0 screen: 0 Step 5: Install git and checkout 10.1 branch Code: sudo apt-get install git 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 Code: 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 libcrystalhd-dev curl python-dev libyajl-dev libxtst-dev libfaad-dev 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) Code: cd ~ Build XBMC: Code: ./bootstrap You should now be able to start XBMC via /usr/local/xbmc/bin/xbmc Code: xinit xbmc-standalone When XBMC is running make sure to select the following options: settings-videos-playback xbmc-settings-system-video http://gaspo.dyndns.org/files/xbmc-settings-system-audio.png To show temps in XBMC, add those lines to advancedsettings.xml Code: <advancedsettings> For suspend, shutdown problems: http://wiki.xbmc.org/index.php?title=Ubuntu_Suspend_/_Wake 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: Code: wget http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/mplayer-vaapi-latest-FULL.tar.bz2 You can check a film with: Code: mplayer -vo vaapi -va vaapi -lavdopts threads=N moviename.mkv 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 results: Some usage figures from the MSI-topic (won't be much different for the other boards): Code: Sleep mode - 1w draw Maybe on mini ubuntu, this draws can be even lower. Some hardware specific remarks: - poppy10 - 2011-04-12 Robotica Wrote:A user did all this work and posted a precompiled version overhere. Where? I looked through al 8 pages of that thread and couldn't find a link to the precompiled XBMC build - Robotica - 2011-04-15 poppy10 Wrote:Where? http://forum.xbmc.org/showpost.php?p=752888&postcount=109 Link in OP is also updated. - Krautmaster - 2011-04-15 well done, ill share my information then ==> catalyst installation http://wiki.cchtml.com/index.php/Ubuntu_Maverick_Installation_Guide Edit: after installing Catalyst 11.3 , the newest libva , libva-dev and xvba ist should look like this or? - Robotica - 2011-04-15 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 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 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 is it the same patch alan applies here? Quote:cd ~/Builds if not, how to patch and what exactly? Edit: well 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 Edit: 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% Edit: 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. Todo: 1. get Audio running 2. am i able to open the Catalyst center with my minimal install? - Robotica - 2011-04-16 no, that patch something else. The patch I mention is needed to get VAAPI working correctly. - Krautmaster - 2011-04-16 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. Edit: 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 the OP said to use the latest libva, libva deva and xvba are these the correct ones? http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/amd64/libva1_0.32.0-1+sds2_amd64.deb http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.7.8-1_amd64.deb http://www.splitted-desktop.com/~gbeauchesne/libva/pkgs/amd64/libva-dev_0.32.0-1+sds2_amd64.deb - joostp - 2011-04-18 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 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: Code: grep vaapi -i .xbmc/temp/xbmc.log help would be greatly appreciated 0:-) chers, - BM - Robotica - 2011-04-21 Did you apply this patch: http://trac.xbmc.org/ticket/10928 ? |