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)



- Mysob - 2011-07-18

Just pointing out that OpenELEC (thanks to Stephan) has also a 32Bit branch for VAAPI/xvba: http://openelec.tv/component/k2/item/188-working-vaapi-xvba-for-amd-fusion-devices-added


- deadhp1 - 2011-07-19

I installed ubuntu 11.04 64-bit last night onto my cheapo Acer Aspire One AO 722 laptop.($249 + $50 gift card). 1ghz amd c-50, 2gb ram, 250gb hd, 11.6"(1366x768)lcd.
I tried to follow the first post but ran into some problems, so took from the rest of the thread.

Code:
##installs vaapi and patched catalyst drivers##

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

sudo apt-get install -y build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget 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

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

sudo dpkg -i fglrx*.deb

##installs kernel 2.6.39-3##

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

##check to make sure kernel is 2.6.39-3##

uname -r

##check to see if vaapi is working##

vainfo

##check to see if fglrx ati catalyst driver is working##

fglrxinfo

##install xbmc-pvr patched to work with vaapi##

sudo add-apt-repository ppa:lars-opdenkamp/xbmc-pvr

sudo apt-get update

sudo apt-get install xbmc

##starts xbmc, make sure to enable vaapi and vsync always on in settings>video##

xbmc

##optional installs flashplayer 11 beta,  but still no hd accelerated flash##

sudo add-apt-repository ppa:sevenmachines/flash

sudo apt-get update

sudo apt-get install flashplugin64-installer

I've found that 1080p runs a little slow, but 720p works great in xbmc with vaapi working. Running the same 1080p files in the windows version of xbmc runs full speed with no slow down.
flashplayer 11 beta on firefox still isn't accelerated.
I haven't tested hdmi or ethernet. Just wireless, sound from internal speakers, and vaapi with xbmc.
I used WUBI to do the ubuntu install so I could keep windows on there easily, and not have to juggle flash drives.
Works pretty solid and I can dual-boot windows for anything else I might need.


- Robotica - 2011-07-20

Robotica Wrote: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

It's great to see Stephan (from openelec) makes this specialized XBMC distribution for the best HTPC platform out there. Openelec is definitely the best solution for dedicated HTPC-usage. So it's a winner combination: The best hardware combined with best and free OS combined with the best HTPC software. AMD Zacate + Linux + XBMC

Only disadvantages for skilled (linux) users, is that the OS is read-only. But on the other hand, this also could be an advantage from support and non-techy perspective. Even more skilled users can even adapt the open source build system of openelec. I wonder what specialized distribution this will deliver in the near future.....

teamXBMC seems to have no interest in supporting VAAPI enebled builds. This is not really a suprising since teamXBMC, prooved to have little interest in VAAPI/AMD related issues/questions/feature requests due to lack of hardware. But that problem seems solved by krautmaster, donating an AMD Zacate system (thnx Krautmaster!) to bobo1on1).


- waver123 - 2011-07-20

Robotica,
I saw your post about the vaapi support in openelec earlier and actually tried out the fusion build from a couple of days ago, most videos I tried seem to work fine (except a couple of rmvb which it seems to quit back to the main menu for some reason)......unfortunately for me the read-only OS is a tough sell....I'd made small changes here and there to suit my needs and there're things I can't really do with openelec Sad


- sraue - 2011-07-20

waver123 Wrote:......unfortunately for me the read-only OS is a tough sell....I'd made small changes here and there to suit my needs and there're things I can't really do with openelec Sad

there is nothing to change a bit here and there... what you want change? for things where it makes sense to change anything we have other solutions (for example our config directory or our settings addon). also we have a forum/irc channel where we can discuss changes you need. why you dont share your ideas so all users can benefit from this? we never change this, the OS will be readonly for everytime, for various good reasons. if you miss anything let us know this.


- Robotica - 2011-07-20

sraue Wrote:there is nothing to change a bit here and there... what you want change? for things where it makes sense to change anything we have other solutions (for example our config directory or our settings addon). also we have a forum/irc channel where we can discuss changes you need. why you dont share your ideas so all users can benefit from this? we never change this, the OS will be readonly for everytime, for various good reasons. if you miss anything let us know this.


Is it difficult to customize your build system to build a HTPC-OS which can install any software I want? Is it just a switch which I can use as build parameter?


- avpap - 2011-07-20

Openelec + Zacate Build = A Dream Come True! If this project succeeds, then I will definitely buy two Zacate builds for my living room + Bedroom. I hate Windows and i don't buy a zacate based PC because of the ATI problems in Linux.


- CrazYoshi - 2011-07-20

Hi guys.
What will happen when the new version of the linux kernel (3.0) will be realise in stable version?
it will be easier than now to work with Fusion?


- Balinus - 2011-07-20

CrazYoshi Wrote:Hi guys.
What will happen when the new version of the linux kernel (3.0) will be realise in stable version?
it will be easier than now to work with Fusion?

I guess so : http://www.engadget.com/2011/05/30/linus-torvalds-releases-linux-kernel-version-3-to-celebrate-20-y/

"Also included is code optimized for AMD's Fusion and Intel's Ivy and Sandy Bridge silicon, and some updated graphics drivers, too."


- Robotica - 2011-07-20

CrazYoshi Wrote:Hi guys.
What will happen when the new version of the linux kernel (3.0) will be realise in stable version?
it will be easier than now to work with Fusion?

The kernel already is ok. It are the distributions which should incooperate the latest software changes. But most importantly, XBMC Linux with AMD (this isn't a typical AMD problem neither a Linux problem) requires prop. drivers to be installed. Those aren't in distribution (like Ubunutu) and thus always requires some installing and configuration by hand (similar to Windows: download a driver, install it, configure to get hardware acc. to work, etc)

This will be for the coming years. So if you don't like that, the only option is to use openelec.


- rossl1986 - 2011-07-20

I've asked this question on another thread but have got no answer.

How do I go about upgrading to the latest AMD/ATI Catalyst drivers (11.6 I think) if I already have installed the pre-configured iso found on this board onto my HTPC?

There is also a new version of xvba to be found (0.8). I have 0.78, that again came with the pre-configured iso. My installation won't allow me to update xvba for obvious reasons. How do I go about updating this with the one found at splitted-desktop without making a brand new iso? Is there even a way?


- mbah.pande - 2011-07-21

Thanks for this tutorial

I am new in linux
I want to start to build HTPC on my
ECS HDC-I Mainboard with AMD E350
2 Gb DDR3
1 TB HDD sata
Using this tutorial


I start with install Ubuntu mini.iso 64bit but in this step i got an trouble
ECS HDC-I mainboard is using three option Video output (VGA, DVI, HDMI) right now i am using VGA for Video Output to CRT my CRT monitor (LG studiowork) that only support 1024x768 res

Why after Install Mini Iso whit Command line Install my Display wont start? at first boot there a response on my CRT monitor (LED beside power button is green) but still nothing appear and after 1 Minute LED beside power button is yellow like when PC is turn off. what wrong with this situation?

Because i am curious i install Ubuntu natty full CD and now i can write an HELP request on this thread

Please HELP me how to resolve this


acer ao722 - deadhp1 - 2011-07-21

I've modified the method I use to install xbmc to the acer AO722 c-50 netbook that was on sale at target. I just posted this in the slickdeals thread.
This is mostly the stuff from the first page of this thread, I had some problems with it, so I figured I would post what worked for me. Oh yeah, I also made script files to make things easier for some ppl. They are available here :http://www.woofiles.com/dl-255623-zqW1C8S2-installscriptsnew.zip


Ok so I got ubuntu working a little bit better.
Most of my info is from:http://forum.xbmc.org/showthread.php?tid=99154
I did have to modify it to work. I've also rewritten the scripts.


First off for people running into crashing issues:
Turn on the ao722 and go into the bios by pressing F2.
Go into the BOOT menu and set "Network Boot" to be the first item.
This tends to solve the crashing while installing ubuntu.
I didn't have crashing, but some others have and this fixed it for them.


This process works in WUBI or from booting a flash drive/cd.
So the process is:
Install ubuntu 11.04 64-bit.(desktop, netbook is untested)
Connect to internet over wireless.
Do NOT install the FGLRX from the restricted driver popup.
Launch Update Manager from System->Administration->Update Manager
Check for updates.
Install updates and reboot.
Check again. It should now be up to date.

There are 2 ways to do the install. The Hard Way=by hand or The Easy Way=with the scripts.
They both do the same thing.

The hard way.

Install vaapi, fglrx 8.861, and kernel 2.6.39-3
Code:
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

sudo apt-get install -y build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget 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

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

sudo dpkg -i fglrx*.deb

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 rm -rf /etc/apt/sources.list.d/*

sudo apt-get update

sudo reboot


XBMC takes a good hour to 2 hours to compile.
(Optional, but nice)Compile and install XBMC with vaapi support
Code:
sudo apt-get -y install git

cd ~; mkdir xbmc_vaapi; cd xbmc_vaapi

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

cd xbmc

git checkout 10.1-Dharma

sudo apt-get -y install mesa-utils

sudo apt-get update

sudo apt-get install python-support cmake autotools-dev autoconf automake 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

vainfo

sudo cp /etc/apt/sources.list /etc/apt/sources.list-backup

sudo -s

echo deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu maverick main >> /etc/apt/sources.list

echo deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu maverick main >> /etc/apt/sources.list

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 91E7EE5E

apt-get update

apt-get -y install libcrystalhd-dev autopoint

apt-get -y 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 yasm

apt-get -y build-dep xbmc

./bootstrap

./configure --prefix=/usr/local/xbmc --enable-vaapi

make -j2

make install

vainfo

ln -s /usr/local/xbmc/bin/xbmc /usr/bin/xbmc

cp /etc/apt/sources.list-backup /etc/apt/sources.list

apt-get update

exit

xbmc

vainfo


Mplayer-vaapi take about 30 minutes to 1 hour to compile/install.
Compile and install mplayer with vaapi support.
Code:
sudo apt-get -y install gnome-mplayer

cd ~; mkdir mplayer-vaapi; cd mplayer-vaapi

wget http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/mplayer-vaapi-latest-FULL.tar.bz2

sudo apt-get -y build-dep mplayer

sudo apt-get -y install yasm

tar -xpvf mplayer-vaapi-latest-FULL.tar.bz2

cd mplayer-vaapi-20110127/

./checkout-patch-build.sh

cd mplayer-vaapi

sudo make install

The Easy Way

Download my new scripts, which do all of the above.
Extract them to a directory.
Open Terminal navigate to where you extracted the scripts and type:
Code:
sh 1_install_vaapi_fglrx_kernel.sh
It'll reboot when done

XBMC takes a good hour to 2 hours to compile.
Open Terminal navigate to where you extracted the scripts and type:
Code:
sh 2_compile_install_xbmc.sh
Exit xbmc

Mplayer-vaapi takes about 30 minutes to 1 hour to compile.
Open Terminal navigate to where you extracted the scripts and type:
Code:
sh 3_compile_install_mplayer-vaapi.sh

You can optionally install flashplayer 11 beta if you want, but it's not needed.
Code:
sh 4_optional_install_flashplayer_11_beta.sh


Notes for both methods:
Ethernet doesn't work. It needs a fixed driver.
Suspend/hibernate doesn't work. Go into your System->Preferences->Power Manager
and turn off suspend and hibernate options. It won't wake and you lose whatever data you were working on at the time.

XBMC tends to crash on exit. It crashes with a black screen. So I launch it from terminal by typing "xbmc" into the terminal. If it crashes, I can alt-tab to the terminal and alt-F4 it to end the session. You may end up with crash logs in your home folder so try to remember to delete them when you get the chance.

Ubuntu's Update Manager will want to install 5 new packages after we install the vaapi items. Do NOT let it or you will break vaapi and not have hardware acceleration.
Launch Synaptic Package Manager from System-Administration-Synaptic Package Manager.
In the search box type "libva"
Highlight the following items:
libva-glx1
libva-tpi1
libva-x11-1
libva-dev
libva1
vainfo
Now the menu and choose Package->Lock Version
You can now exit synaptic. This will prevent the update.

If you'd like to use mplayer to playback hd video's open a terminal and type:
Code:
mplayer -vo vaapi -va vaapi nameofthefile.mkv


You can setup Gnome-Mplayer to play using vaapi by launching Applications->Sound & Video->GNOME Mplayer
Choose Edit->Preferences and goto the Mplayer tab.
In the box Extra Options place the following:
Code:
-vo vaapi, -va vaapi
and click close. That will now use vaapi too.

To playback HD youtube video's you need a firefox plugin called flashvideoreplacer
after installing it set the preferences to standalone, and use Gnome Mplayer.
This will launch gnome mplayer when you click on the play button.

I hope this works for you all.


- devil103 - 2011-07-21

At the moment I'm running into some problems making a fresh XBMC installation.
Kernel 2.6.38-10, ATI 11.6, installed as before but now when starting X I'm getting a signal 11 segmentation fault (so not in XBMC but when starting X, lines are appended to /etc/environment anyways)

Even the latest guides from Mysob have not been working.

Any suggestions?

edit: problem solved it was some conflict with xbmc-standalone and the launching method I was using


- deadhp1 - 2011-07-21

For the acer ao722 I've updated my post over slickdeal's with new scripts, precompiled mplayer-vaapi and precompiled xbmc .deb's. The file weighs in at about 50mb's and you need to run the scripts in order to install the .debs.
It might work for you guys too.
http://slickdeals.net/forums/showpost.php?p=41169326&postcount=261