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)



- wsnipex - 2011-11-18

fritsch Wrote:So, as a first impression, xbmc runs stable with fglrx 11.11?

If anybody still has a hang concerning "menu navigation", "press stopped and movie list did not come back", etc. please stand up now as eden is getting final in little more than 5 weeks.

In order to get this issue fixed - if fglrx 11.11 did not fix it, i hope it did cause the error was in rather deep in fglrx - we have to get good backtraces and stuff.

I do have those hangs from time to time with catalyst 11.11, but I'm running the XVBA branch. Its quite a lot behind master(and also ahead Wink ), so I dunno if it is representative.


- fritsch - 2011-11-18

@wsnipex:
Fernetmenta and me are very keen to get exactly this issue fixed. We produced a lot of backtraces while searching for the reason of this crash, while running xbmc with xvba on my system.

To not mixing up mainline (vaapi and no xvba) it would be good to organize bugs concerning xvba in another thread - you can start one, please.

What you can do for us:
Start xbmc out of a remote shell within gdb, to do so follow these steps, in order to get them work ssh and gdb must be installed (# are comments):
Code:
ssh yourXBMCuser@yourHTPChost
Code:
# make the display acccesible
export DISPLAY=:0
# start gdb with your xbmc.bin, important path to binary not script
# substitute /path/to with f.e. /usr/local/lib/xbmc/
# if you build it from git, you can start in your git home directory
gdb /path/to/xbmc.bin
# activate logging into a file
set logging on myxvbacrash.txt
# start xbmc
run

XBMC should start normal, it could be a bit laggy, but it should work :-). Try to crash it. After this has happened, return to the shell you logged in from remote and do:
Code:
thread apply all bt

To get backtraces from every thread running. You can now quit xbmc by typing:
Code:
quit

Now please pastebin your xbmc.log and the myxvbacrash.txt file into a pastebin near you. Please state the git revision you are using and special settings you did in the playback settings region, about your OS (compiz on, off, tearfree, vsync), everything that could be important and very important what you did leading to this crash - perhaps if you can find a special movie which leads to this, please pastebin mediainfo of this file.

Thank you very much.


- Robotica - 2011-11-18

fritsch Wrote:@wsnipex:
Fernetmenta and me are very keen to get exactly this issue fixed. We produced a lot of backtraces while searching for the reason of this crash, while running xbmc with xvba on my system.

To not mixing up mainline (vaapi and no xvba) it would be good to organize bugs concerning xvba in another thread - you can start one, please.

Hi Fritsch...

I know many people are running openelec but some build theirselves using pvr, git, Dharma or your xvba branche.

For all branches it is valid to be totally updated but from which builds you can use bugreports?

Thnx for your efforts..


- fritsch - 2011-11-18

As xvba code just lives in FernetMentas and my github for now - we want to get issues with this code fixed separately. If it turns out, that the crashes, hangs we are seeing there is a mainline issue, it will be fixed there as well.

I just wanted to make sure, that xvba does not highjack this thread concerning vaapi :-). Cause it already did, i want to make sure that bugs are reported separateley in order to not confuse of "mainline bugs" vs "vaapi" vs "xvba" only.

Normal bugs concerning vaapi and mainline xbmc should go into the appropriate bugtracker (trac.xbmc.org).

As Eden is going to be stable soon and i think that xvba will defenitely not land in there (feature freeze, etc.) - vaapi bugs are of more priority.

As always: Good bug reports, backtraces, how to reproduce are of big value for every developer.

And just to be sure: xvba is in very early state, alive since approx 2 weeks and halfway functional for 5 days, far away from any mainline inclusion.


- idtjes3 - 2011-11-18

Ran a few test and things are pretty good so far with desktop resolution set to 1080p@24hz using CCC 11.11. I have XBMC set to auto adjust the display based on video (else 60hz SD stuff goes wonky). So far Ive tested a few SD shows and a few HD shows. SD works fine, however HD I am still not able to fast forward smoothly. Once I stop fast forwarding, the video becomes jerky and I have to stop it.

If that's the biggest of my problems I can deal with that for now ( not like there are commercials to fast forward through :p ). Menu navigation seems pretty solid. I was flying through them pretty rapidly while pressing enter and backspace as well. No crashes so far. I'll keep testing through this weekend.

- John


- idtjes3 - 2011-11-19

OK, so I was watching an HD program (720P @ 24hz) and about 7 minutes in the video went all juttery. This is with the desktop set to 1080p@24hz and XBMC set to adjust display refresh rate based on video. If I press "O" I notice my missed frames keeps increasing ( seems to be common place however).

Ive also noticed that the fps is never a constant number. It keeps fluctuating between high 23 and low 25 fps. Just kind of thinking out loud here but if my fps climbs too much out of the 24fps range, will XBMC attempt to alter the refresh rate? Im going to keep an eye on this and see if I can pin point when the video begins to stutter.

Hmm on a whim I decided to fast forward while the "O" menu was on screen. During fast forwarding HD content, the fps drops to high 19s - low 20s :O .. Is this normal? Im still thinking that my fps are dropping so low (or going too high) for just a split second that XBMC is detecting a refresh rate change, but before XBMC can switch the display accordingly, the fps jump back up to 24 and this is whats causing the juttery playback....Is there any validity in this or am I just crazy?


- wsnipex - 2011-11-19

I have already said this a couple of times in this thread. Vaapi and 24p has some serious problems.
The only workaround I know is to apply the patches from FernetMenta. Search this thread around page 50


- idtjes3 - 2011-11-19

OK I'll give that a try. I saw that back there but I wasn't sure if those patches were still relevant. Thanks again.


- idtjes3 - 2011-11-20

Well not sure whats going on now but 2 minutes after ( I kept a time log) I either change to tv input or turn off the tv for the night, XBMC freezes and I have to hard reset my machine. This has happened the last 3 or 4 times. Im running CCC 11.11, desktop resolution is 1080p @ 60hz, and I have installed all the FM patches that were available...


- Redsandro - 2011-11-21

After five weeks I got my Zotac Fusion back from the factory after repairs, so I was lurking for the last 20 pages or so. Anything relevant changed?

Is changing repo still recommended?
Leon-B Wrote:Switching repositories from lars-opdenkamp to nathan-renniewaldock on Ubuntu 11.10 solved several problems for me (ASUS E35M1-I DELUXE based system, Catalyst 11.9). It's more stable (no crashes the last days), doesn't run out-of-sync anymore after pausing, runs more smooth in general and 24p runs fine now.
grolim64 Wrote:Hi, just registered to post that I have got everything working under Lubuntu 11.10:

nightly xbmc from Nathan Rennie-waldock (ppa:nathan-renniewaldock/xbmc-nightly)
Sounds good, but considering the "If it ain't broke, don't fix it" team, I haven't experienced any real issues with the opdenkamp version in my guide. (Zotac Fusion)

The only real error I'm experiencing, when going through XBMC menus, the video playing in the background is jerky, jumping back and forth a frame constantly.

Any splitted-desktop repo yet?

Manual updating is not fon to due.
grolim64 Wrote:getting updates (including a new libva) from ubuntu-x (ppa:ubuntu-x-swat/x-updates)
so far its working great!

so perhaps all you guys need is the updated libva from ubuntu-x...

Should I update at all?

I hear so many problems on these pages, it sounds like I'm lucky to have it working at all. Big Grin

Xorg.conf compositing, relevant?

tjones Wrote:It turns out the composite disable xorg.conf edit is for better h264 playback. Dropped my cpu usage from 40-50% to ~30%.
Does disabling composite actually disable 21st century compositing? (Nice windows in XFCE and stuff), or does it mean something completely different?

Note that I have no xorg.conf at the moment, I sort of like it that way.

Image

Can XBMC idle 24/7 yet?

Leon-B Wrote:I also get a cpu utilization of about 63% when xbmc idles with the latest nightly builds of Eden, so that doesn't seem less so far. However, from the moment on that it blanks the screen, it will have a cpu utilization of ~9%, when playing 720p content, it's around 23%.

Do you mean the 'screensaver' blank or the blank before playback?
I want to have the lowest possible power consumption when not viewing any movie without having to manually quit XBMC each time.

Any hints on mplayer or gstreamer vaapi compilation?

I still cannot compile mplayer or gstreamer with vaapi support which is unfortunate because I don't want to use XBMC as desktop media player too, but if I was on to something last time, I forgot about it. Sad

VLC has built-in support, but performance sucks considerably compared to XBMC.

-------------

There's so much handy information in this topic, but topics are generally quickly becoming a monster to search through sanely.


- k1234 - 2011-11-25

thank you all
\

i need new custom linux live with xbmc , coz it`s hard to build one coz i`n newbie here

help me plzzzzzzzzzzzzzz


- idtjes3 - 2011-11-26

In short, save yourself the headache and buy and NVIDIA based platform...

Redsandro Wrote:After five weeks I got my Zotac Fusion back from the factory after repairs, so I was lurking for the last 20 pages or so. Anything relevant changed?

Is changing repo still recommended?
Sounds good, but considering the "If it ain't broke, don't fix it" team, I haven't experienced any real issues with the opdenkamp version in my guide. (Zotac Fusion)

The only real error I'm experiencing, when going through XBMC menus, the video playing in the background is jerky, jumping back and forth a frame constantly.

Any splitted-desktop repo yet?

Manual updating is not fon to due.


Should I update at all?

I hear so many problems on these pages, it sounds like I'm lucky to have it working at all. Big Grin

Xorg.conf compositing, relevant?


Does disabling composite actually disable 21st century compositing? (Nice windows in XFCE and stuff), or does it mean something completely different?

Note that I have no xorg.conf at the moment, I sort of like it that way.

Image

Can XBMC idle 24/7 yet?



Do you mean the 'screensaver' blank or the blank before playback?
I want to have the lowest possible power consumption when not viewing any movie without having to manually quit XBMC each time.

Any hints on mplayer or gstreamer vaapi compilation?

I still cannot compile mplayer or gstreamer with vaapi support which is unfortunate because I don't want to use XBMC as desktop media player too, but if I was on to something last time, I forgot about it. Sad

VLC has built-in support, but performance sucks considerably compared to XBMC.

-------------

There's so much handy information in this topic, but topics are generally quickly becoming a monster to search through sanely.



- FernetMenta - 2011-11-26

idtjes3 Wrote:In short, save yourself the headache and buy and NVIDIA based platform...

This is not nice Sad We currently put a lot of effort in better support for this platform. All contributions by the entire community are highly appreciated. I got into contact with the ATI devs and they do care about improving things.


- Infinitatus - 2011-11-27

MTroi Wrote:*Updated to latest ATI drivers (11.11), included a driver update howto below*

I have spent this weekend to figure out, how to get all stuff running on my ubuntu 11.10 'oneiric' system. Finally, it all works but had some very frustrating experiences along the way.

Here is how I did it:

System: Asus E35M1-I DELUXE
Video out: DVI
Audio out: S/PDIF Out (optical)

System: Ubuntu 11.10 x64 Installation CD (no minimal for me)

1. Install Ubuntu

2. Boot to system and (optional) install good old aptitude as package manager

3. Update system to latest packages via (apt-get might have different commands)
Code:
sudo aptitude update && sudo aptitude full-upgrade -y

4. Add new source for libva:
Code:
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

5. Update sources:
Code:
sudo aptitude update

6. Before installing latest ATI drivers (11.11):
Code:
sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases ia32-libs

7. Install latest ATI driver:
Code:
cd ~/; mkdir catalyst11.11; cd catalyst11.11/
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-11-x86.x86_64.run
chmod +x ati-driver-installer-11-11-x86.x86_64.run
sudo sh ./ati-driver-installer-11-11-x86.x86_64.run --buildpkg Ubuntu/oneiric
sudo dpkg -i fglrx*.deb

8. Generate new X11 config and activate tear-free
Code:
sudo aticonfig --initial -f
sudo aticonfig --sync-video=on

9. Reboot the system

10. Check driver installation (should say something like: OpenGL renderer string: ATI Radeon ...):
Code:
fglrxinfo

11. Install libva:
Code:
sudo apt-get install xvba-va-driver libva-glx1 vainfo

12. Update environment:
Code:
sudo nano /etc/environment
Code:
LIBVA_DRIVER_NAME=xvba
LIBVA_DRIVERS_PATH=/usr/lib/va/drivers

13. Add user to video and audio:
Code:
sudo adduser YourUserName video
sudo adduser YourUserName audio

14. Install xbmc (I used Rennie):
Code:
sudo add-apt-repository ppa:nathan-renniewaldock/xbmc-nightly
sudo aptitude update
sudo aptitude install xbmc

15. Reboot the system

16. Start xbmc and set Audio to "Digital/Optical" and ATI Southbridge as digital throughput


I hope everything is correct (did this from my memory) and hope it helps some other guys out there.

ATI Driver Update Howto (For users with versions older than 11.11)

1. Uninstall the old driver
Code:
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

2. Get & Install the new driver (for future releases just replace 11.11/11-11 with the current version):

Code:
cd ~/; mkdir catalyst11.11; cd catalyst11.11/
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-11-x86.x86_64.run
chmod +x ati-driver-installer-11-11-x86.x86_64.run
sudo sh ./ati-driver-installer-11-11-x86.x86_64.run --buildpkg Ubuntu/oneiric
sudo dpkg -i fglrx*.deb

3. Update X11 config (might not be necessary, but I did that):
Code:
sudo aticonfig --initial -f
sudo aticonfig --sync-video=on

4. Reboot the system

5. Check your graphics driver
Code:
fglrxinfo

6. Check the vainfo output (My libva was broken after the driver update, so the output said something like 'libva: va_openDriver() returns -1'):
Code:
vainfo

If your libva is still fine, skip the next steps:

7. Remove the libva (Unfortunately xbmc is also removed, but at least the config is preserved)

Code:
sudo apt-get remove xvba-va-driver libva-glx1 vainfo

8. Reinstall the libva:
Code:
sudo apt-get install xvba-va-driver libva-glx1 vainfo

9. Reinstall xbmc:
Code:
sudo apt-get install xbmc

10. Reboot the system

11. Check vainfo again (some libraries like *h264* should appear now):
Code:
vainfo

12. Start xbmc :-)

Concerning this excellent guide, I am planning to buy Asus E35M1-I DELUXE too.
Is this guide also viable for an ubuntu minimal installation? (i would like to try it with a ubuntu 11.10 minimal cd) DidnĀ“t Unity give problems with XBMC? Or am I missing something?

Off topic question:

Can you use a HDMI directly to initiate the ubuntu instalation or do you have to start with a screen connected to DVI?


- idtjes3 - 2011-11-27

No, I know and I really do appreciate yours and everyone else help. I think XBMC with ATI has come a long way and I appreciate the fact people are trying to get it running. With that being said, at the end of the day I just need something that works. Unfortunately, ATI has just way to many problems right now with Ubuntu. The fact Im totally new to Ubuntu doesn't help things either I'm sure. It seems like an endless circle of fix this, now this doesn't work and so on.

I can't be messing around with a system for a month only to not have it work. I really hope someday this will be a thing of the past, but right now I think its just easier to start with NVIDIA from the get go. Didn't mean to sound unappreciative, I'm just having no luck. I ordered a Zotac ND22 zbox this week and hope to use that until the ATI things gets ironed out.

So basically my advice is if your new to Ubuntu, stick with NVIDIA. If your feeling adventurous and have more patience than Ghandi, then by all means try XBMC+Ubuntu+ATI...

- John

FernetMenta Wrote:This is not nice Sad We currently put a lot of effort in better support for this platform. All contributions by the entire community are highly appreciated. I got into contact with the ATI devs and they do care about improving things.