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)



- tjones - 2011-11-04

Currently using Ubuntu 10.04 with xbmc self compiled for vaapi using the latest splitted desktop libva, libva-dev, and xvba-driver.

Check my posts over the last couple of pages.

If linux is turning you off of the E350 you could always use win7. I've been using xbmc unstable on a C50 (1 tier lower than the E350) win7 netbook for months now. No problem with 1080p in win7 using the ms hw acceleration.


- kobik - 2011-11-04

Any reasons to prefer 10.04 over the newer builds?


- c00kiemonster - 2011-11-04

My reason for Linux has always been the RAID/LVM capabilities. Those are very handy when putting up fileservers.

But you're right, while Eden materializes there is always win7 if it's just XBMC I'm after. The E35M1-I Deluxe has an ample supply of SATA ports so it's a perfect candidate for a HTPC/fileserver, ION2 is not really up to snuff.


- tjones - 2011-11-04

kobik Wrote:Any reasons to prefer 10.04 over the newer builds?

In one word stability.

Although I'd prefer to use the latest 11.10 it's only due to the 3.0 kernel. I really have my eye on 12.04 LTS for my final os (at for at least 3-4yrs) and it will have a more polished 3.0 kernel by then. I can wait.

The only thing keeping me from using 11.10 right now is some apparent issue with xbmc's custom ffmpeg and the native ubuntu 11.10 libva/dev-codec files. If I were to use 11.10 I'd be upgrading in 6-9 months anyway.

Another option is to import the 3.0 kernel into 10.04 but that comes with it's own issues. I did it the other week but there are plenty of issues to tweak/fix. I think I'm just going to wait for 12.04.

A final option for a *.deb distro with the 3.0 kernel is debian unstable (wheezy) alas that is almost more cumbersome than 10.04 w a 3.0 kernel.



@c00kiemonster

I think I read that ms has come up with their own version of LVM called Dynamic Disks or some junk.

Edit: I noticed this on win7 Enterprise N the other week when setting up a new disk. So at consumer level this would be akin to win7 Ultimate.

Here is my current parts list with that board.

ASUS E35M1-I DELUXE Fusion AMD E-350 APU motherboard http://www.newegg.com/Product/Product.aspx?Item=N82E16813131698

Asus QVL G.SKILL Ripjaws Series 8GB (2 x 4GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 10666) (cas7) ram http://www.newegg.com/Product/Product.aspx?Item=N82E16820231402

1xSeagate Momentus 7200.4 ST320LT023 320GB 7200 RPM 16MB Cache 2.5" SATA 3.0Gb/s Internal http://www.newegg.com/Product/Product.aspx?Item=N82E16822148745

4xSeagate Barracuda Green ST2000DL003 2TB 5900 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal http://www.newegg.com/Product/Product.aspx?Item=N82E16822148681

CHENBRO ES34169-BK-120 case http://www.newegg.com/Product/Product.aspx?Item=N82E16811123154

Notes:

The case has 4x hotswappable 3.5 inch bays 1x 2.5 inch internal mount. Momentus used as boot drive Barracuda Green for LVM network storage. 320W is recommended for this motherboard (fully loaded with pcie etc) however I managed to get all this working on the 120W by placing power consumption as a priority. There is currently issues with hard drive supplies due to natural disasters in asia. When I purchased my storage drives they were ~80 USD each not 220 USD.

I couldn't find a sata3 2.5 inch internal that wasn't an ssd the Momentus sata2 is my only regret for the system and what I plan to upgrade. The chenbro PSU fans are louder than I'd like, I'll be swapping them out soon.

Overall I'm happy with it. If the PSU gives me issues in the future I think a SFX PSU could be shoved in there with some minor dremel tooling.


- kobik - 2011-11-04

Success!
Finally I managed to make things working for me.
Not all perfect though and I need a little help with a couple of problems.
1. CPU usage is quite insane on idle. About 60%-70% is indication of problem.
At the system information screen I see that the FPS fluctuates between 100 to 200+, seems like a good cause.
2. I can't undo the default ATI's underscan.
Tried this with no joy
Code:
sudo aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0

Any help will be appreciated.


- Anastrophe - 2011-11-04

don't worry about idle CPU usage - that will change in the future as the way the GUI is generated is undergoing an re-write.


- kobik - 2011-11-04

But why do I get this high usage while others don't?
I saw now that I get pretty high usage also when playing 720p.
One CPU is at 40% while the other 80%.
VAAPI is checked in the settings.
Odd...
BTW, I'm using PVR-build.

Edit: Nothing about the underscan?

Edit2: Underscan fixed.
Need to run the below command while X is down.
Code:
sudo aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0

So one down, one left to go.
Can this solve my FPS craziness problem?
Code:
exec xrandr --newmode "1920x1080_24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
exec xrandr --addmode HDMI1 1920x1080_24
exec xrandr --newmode "1920x1080_23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
exec xrandr --addmode HDMI1 1920x1080_23.976
exec xrandr --newmode "1920x1080_59.94" 148.350 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
exec xrandr --addmode HDMI1 1920x1080_59.94
exec xrandr --newmode "1920x1080_29.97" 74.175 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
exec xrandr --addmode HDMI1 1920x1080_29.97
exec xbmc --standalone
Source: http://forum.xbmc.org/showpost.php?p=665709&postcount=31

I guess it could be made to limit my FPS, but I don't understand what are these numbers after the quotes.
I own Panasonic PV8 HD-Ready which supports 50Hz, what do I need to put there instead?


- Leon-B - 2011-11-05

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%.


working in lubuntu 11.10 - grolim64 - 2011-11-05

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) and 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...


- Hack_kid - 2011-11-05

what version libva and xvba does the ubuntu-x ppa give you


- grolim64 - 2011-11-05

it does not include xvba, it only updated libva to 1.0.15 (leaving xvba at 0.7.8)


- kobik - 2011-11-05

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) and 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...

Sorry for being noob but Which package to install?

Edit: OK, got that.
Apparently, not that noob... Smile


- tjones - 2011-11-05

What does your output from top via ssh look like kobik? Perhaps it's an issue with whatever software you are using as a monitor and the apu.


top output via ssh login while xbmc is idle in my 10.04.3 system

%id=idle

Code:
pinker@pinker-E350:~$ top

top - 11:23:07 up  1:41,  1 user,  load average: 0.28, 0.42, 0.70
Tasks: 118 total,   2 running, 116 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.5%us,  0.2%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   6107472k total,   538224k used,  5569248k free,    23008k buffers
Swap: 12685304k total,        0k used, 12685304k free,   160452k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
1386 pinker    20   0  622m 106m  37m R   28  1.8  57:59.08 xbmc.bin          
1697 pinker    20   0 19224 1388 1048 R    1  0.0   0:00.24 top                
   49 root      20   0     0    0    0 S    0  0.0   0:20.37 kondemand/0        
   50 root      20   0     0    0    0 S    0  0.0   0:14.27 kondemand/1        
    1 root      20   0 23712 1940 1264 S    0  0.0   0:01.45 init              
    2 root      20   0     0    0    0 S    0  0.0   0:00.01 kthreadd          
    3 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/0        
    4 root      20   0     0    0    0 S    0  0.0   0:00.90 ksoftirqd/0        
    5 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0        
    6 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/1        
    7 root      20   0     0    0    0 S    0  0.0   0:01.65 ksoftirqd/1        
    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1        
    9 root      20   0     0    0    0 S    0  0.0   0:00.31 events/0          
   10 root      20   0     0    0    0 S    0  0.0   0:00.18 events/1          
   11 root      20   0     0    0    0 S    0  0.0   0:00.00 cpuset            
   12 root      20   0     0    0    0 S    0  0.0   0:00.00 khelper            
   13 root      20   0     0    0    0 S    0  0.0   0:00.00 async/mgr  
    9 root      20   0     0    0    0 S    0  0.0   0:00.31 events/0          
   10 root      20   0     0    0    0 S    0  0.0   0:00.18 events/1          
   11 root      20   0     0    0    0 S    0  0.0   0:00.00 cpuset            
   12 root      20   0     0    0    0 S    0  0.0   0:00.00 khelper            
   13 root      20   0     0    0    0 S    0  0.0   0:00.00 async/mgr

top while playing 1080p h264

Code:
pinker@pinker-E350:~$ top

top - 11:28:32 up  1:46,  1 user,  load average: 1.32, 0.79, 0.74
Tasks: 118 total,   1 running, 117 sleeping,   0 stopped,   0 zombie
Cpu(s): 27.4%us, 16.6%sy,  0.0%ni, 48.2%id,  4.5%wa,  0.2%hi,  3.2%si,  0.0%st
Mem:   6107472k total,   622332k used,  5485140k free,    24620k buffers
Swap: 12685304k total,        0k used, 12685304k free,   175716k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
1386 pinker    20   0  727m 177m  43m S   66  3.0  60:19.08 xbmc.bin          
  984 root      20   0     0    0    0 S   17  0.0  16:16.75 hd-audio0          
1118 root      20   0  191m  28m  18m S    2  0.5   0:05.96 Xorg              
   49 root      20   0     0    0    0 S    0  0.0   0:21.03 kondemand/0        
   50 root      20   0     0    0    0 S    0  0.0   0:14.71 kondemand/1        
1698 pinker    20   0 19224 1388 1048 R    0  0.0   0:00.60 top                
    1 root      20   0 23712 1940 1264 S    0  0.0   0:01.45 init              
    2 root      20   0     0    0    0 S    0  0.0   0:00.01 kthreadd          
    3 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/0        
    4 root      20   0     0    0    0 S    0  0.0   0:00.92 ksoftirqd/0        
    5 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/0        
    6 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/1        
    7 root      20   0     0    0    0 S    0  0.0   0:01.70 ksoftirqd/1        
    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/1        
    9 root      20   0     0    0    0 S    0  0.0   0:00.33 events/0          
   10 root      20   0     0    0    0 S    0  0.0   0:00.19 events/1          
   11 root      20   0     0    0    0 S    0  0.0   0:00.00 cpuset



- kobik - 2011-11-05

This is my idle CPU usage.
This seems a little crazy to me.

Code:
top - 22:51:40 up 8 min,  3 users,  load average: 0.39, 0.32, 0.18
Tasks:  85 total,   3 running,  82 sleeping,   0 stopped,   0 zombie
Cpu(s): 32.9%us,  1.5%sy,  0.0%ni, 65.4%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   3660944k total,   727616k used,  2933328k free,   133992k buffers
Swap:   307196k total,        0k used,   307196k free,   265876k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
1072 xbmc      20   0  896m 181m  39m R   69  5.1   5:15.09 xbmc.bin
1256 xbmc      20   0 19352 1268  944 R    1  0.0   0:01.73 top
    9 root      20   0     0    0    0 S    0  0.0   0:00.06 ksoftirqd/1
  488 root      20   0     0    0    0 S    0  0.0   0:01.13 kworker/1:2
1168 root      20   0     0    0    0 R    0  0.0   0:00.92 kworker/0:2
    1 root      20   0 23976 2092 1320 S    0  0.1   0:01.26 init
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      20   0     0    0    0 S    0  0.0   0:00.04 ksoftirqd/0
    4 root      20   0     0    0    0 S    0  0.0   0:00.06 kworker/0:0
    6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0
    7 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1
    8 root      20   0     0    0    0 S    0  0.0   0:00.02 kworker/1:0
   11 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset
   12 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper

About the usage whilst playing, I had my drivers recompiled and reinstalled and now it's about 12%-13% with 720p movie, so it's fine I guess.

I'm thinking of compiling my own XBMC build, but I'm having problems with that too Blush
Code:
xbmc@HTPC:~/xbmc$ ./bootstrap
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196.
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.in: tracing
autoreconf: configure.in: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.in:439: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1



- tjones - 2011-11-06

Assuming you're using an APU.

Your top definitely states xbmc as the issue.

%us = user processes %sy = system processes.

From man top.
Code:
us  --  User CPU time
          The time the CPU has spent running users'  processes  that  are
          not niced.

        sy  --  System CPU time
          The  time  the  CPU  has  spent running the kernel and its pro‐
          cesses.

Try upping the amount of ram dedicated to the igfx. The default value is usually around 380MB. It might be a framebuffer capacity issue. I set mine to the max 2GB just for the fun of it. Try 1GB.

As to the compile try resetting your git directory and make sure libltdl7 libltdl-dev are installed as I've stated in this post. http://forum.xbmc.org/showpost.php?p=921595&postcount=607

I would get bootstrap/autoconfig errors in 11.10 unless I manually installed libltdl7.

Edit: another idea make sure that Composite is disabled in your xorg.conf if you haven't done so already.

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

https://wiki.archlinux.org/index.php/Composite