XBMC Community Forum
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC 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)



- hottentotte - 2011-12-13 23:44

And the 4th and last part of the log-file..
Code:
[    52.448] (II) Initializing built-in extension COMPOSITE
[    52.448] (II) Initializing built-in extension DAMAGE
[    52.448] (II) Initializing built-in extension GESTURE
[    52.452] ukiDynamicMajor: found major device number 251
[    52.452] ukiDynamicMajor: found major device number 251
[    52.452] ukiOpenByBusid: Searching for BusID PCI:0:1:0
[    52.452] ukiOpenDevice: node name is /dev/ati/card0
[    52.452] ukiOpenDevice: open result is 13, (OK)
[    52.452] ukiOpenByBusid: ukiOpenMinor returns 13
[    52.452] ukiOpenByBusid: ukiGetBusid reports PCI:0:1:0
[    52.815] (II) AIGLX: Loaded and initialized OpenGL driver(II) GLX: Initialized DRI GL provider for screen 0
[    52.865] (II) fglrx(0): Enable the clock gating!
[    52.865] (II) fglrx(0): Setting screen physical size to 270 x 203
[    52.891] (II) XKB: reuse xkmfile /var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm
[    52.910] (II) config/udev: Adding input device Power Button (/dev/input/event1)
[    52.910] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[    52.910] (II) LoadModule: "evdev"
[    52.911] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[    52.920] (II) Module evdev: vendor="X.Org Foundation"
[    52.920]     compiled for 1.10.2, module version = 2.6.0
[    52.920]     Module class: X.Org XInput Driver
[    52.920]     ABI class: X.Org XInput driver, version 12.3
[    52.920] (II) Using input driver 'evdev' for 'Power Button'
[    52.920] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[    52.920] (**) Power Button: always reports core events
[    52.920] (**) Power Button: Device: "/dev/input/event1"
[    52.920] (--) Power Button: Found keys
[    52.920] (II) Power Button: Configuring as keyboard
[    52.920] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1/event1"
[    52.920] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD)
[    52.920] (**) Option "xkb_rules" "evdev"
[    52.920] (**) Option "xkb_model" "pc105"
[    52.920] (**) Option "xkb_layout" "se"
[    52.920] (**) Option "xkb_variant" "basic"
[    52.924] (II) XKB: reuse xkmfile /var/lib/xkb/server-E2AB77510BEAAA7A538E4ECEC6949238C7574B72.xkm
[    52.933] (II) config/udev: Adding input device Power Button (/dev/input/event0)
[    52.933] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[    52.933] (II) Using input driver 'evdev' for 'Power Button'
[    52.933] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[    52.933] (**) Power Button: always reports core events
[    52.933] (**) Power Button: Device: "/dev/input/event0"
[    52.933] (--) Power Button: Found keys
[    52.933] (II) Power Button: Configuring as keyboard
[    52.933] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0/event0"
[    52.933] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD)
[    52.933] (**) Option "xkb_rules" "evdev"
[    52.934] (**) Option "xkb_model" "pc105"
[    52.934] (**) Option "xkb_layout" "se"
[    52.934] (**) Option "xkb_variant" "basic"
[    52.936] (II) config/udev: Adding input device HD-Audio Generic HDMI/DP,pcm=3 (/dev/input/event3)
[    52.936] (II) No input driver/identifier specified (ignoring)
[    52.944] (II) config/udev: Adding input device HDA ATI SB Headphone (/dev/input/event4)
[    52.944] (II) No input driver/identifier specified (ignoring)
[    52.951] (II) config/udev: Adding input device Eee PC WMI hotkeys (/dev/input/event5)
[    52.951] (**) Eee PC WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[    52.951] (II) Using input driver 'evdev' for 'Eee PC WMI hotkeys'
[    52.951] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[    52.951] (**) Eee PC WMI hotkeys: always reports core events
[    52.951] (**) Eee PC WMI hotkeys: Device: "/dev/input/event5"
[    52.952] (--) Eee PC WMI hotkeys: Found keys
[    52.952] (II) Eee PC WMI hotkeys: Configuring as keyboard
[    52.952] (**) Option "config_info" "udev:/sys/devices/platform/eeepc-wmi/input/input5/event5"
[    52.952] (II) XINPUT: Adding extended input device "Eee PC WMI hotkeys" (type: KEYBOARD)
[    52.952] (**) Option "xkb_rules" "evdev"
[    52.952] (**) Option "xkb_model" "pc105"
[    52.952] (**) Option "xkb_layout" "se"
[    52.952] (**) Option "xkb_variant" "basic"
[    52.953] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event2)
[    52.953] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
[    52.953] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'
[    52.953] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[    52.953] (**) AT Translated Set 2 keyboard: always reports core events
[    52.953] (**) AT Translated Set 2 keyboard: Device: "/dev/input/event2"
[    52.953] (--) AT Translated Set 2 keyboard: Found keys
[    52.953] (II) AT Translated Set 2 keyboard: Configuring as keyboard
[    52.953] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input2/event2"
[    52.953] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
[    52.953] (**) Option "xkb_rules" "evdev"
[    52.953] (**) Option "xkb_model" "pc105"
[    52.953] (**) Option "xkb_layout" "se"
[    52.953] (**) Option "xkb_variant" "basic"
[    52.994] (II) fglrx(0): Restoring Recent Mode via PCS is not supported in RANDR 1.2 capable environments
[   110.364] (II) AIGLX: Suspending AIGLX clients for VT switch
[   110.377] (II) fglrx(0): Backup framebuffer data.
[   110.385] (II) fglrx(0): Backup complete.
[   134.642] (II) AIGLX: Resuming AIGLX clients after VT switch
[   143.888] (II) AIGLX: Suspending AIGLX clients for VT switch
[   143.899] (II) fglrx(0): Backup framebuffer data.
[   143.905] (II) fglrx(0): Backup complete.
[   220.604] (II) AT Translated Set 2 keyboard: Close
[   220.604] (II) UnloadModule: "evdev"
[   220.604] (II) Unloading evdev
[   220.604] (II) Eee PC WMI hotkeys: Close
[   220.604] (II) UnloadModule: "evdev"
[   220.605] (II) Unloading evdev
[   220.605] (II) Power Button: Close
[   220.605] (II) UnloadModule: "evdev"
[   220.605] (II) Unloading evdev
[   220.605] (II) Power Button: Close
[   220.605] (II) UnloadModule: "evdev"
[   220.605] (II) Unloading evdev
[   220.616] (II) fglrx(0): Shutdown CMMQS
[   220.616] (II) fglrx(0): [uki] removed 1 reserved context for kernel
[   220.616] (II) fglrx(0): [uki] unmapping 8192 bytes of SAREA 0x2000 at 0x7f9824fa2000
[   220.619] (II) fglrx(0): Interrupt handler Shutdown.
[   220.625]  ddxSigGiveUp: Closing log



- fritsch - 2011-12-14 00:00

Could not see anything.

It is hanging up at the end. Do you start a non existing window-manager? So X ends, cause no client connects?

Next time, please use a pastebin. This is much more easy to read and does not need 4 comments. Could you edit / delete some of your comments in order to get the logs straight in line?


- erhnam - 2011-12-14 10:27

fritsch Wrote:@erhnam

Ist fglrx correctly installed? Could you pastebin the log from Xorg.0.log

vainfo does not have to be executed as root.

Update: Could be a missing symlink, does it directly go to desktop?
cd /usr/lib/dri; ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

Xorg.0.log: http://pastebin.com/L90qFy05

There is not "real" desktop. It boots straight to xbmc. Here's the output of the /usr/lib/dri dir:

Code:
xbmc@live:/usr/lib/dri$ ls -all
total 18
drwxr-xr-x   2 root root    60 2011-12-14 07:06 .
drwxr-xr-x 121 root root   180 2011-12-14 07:06 ..
-rw-r--r--   1 root root 17708 2011-04-30 18:18 dummy_drv_video.so
lrwxrwxrwx   1 root root    42 2011-12-14 07:06 fglrx_dri.so -> /etc/alternatives/i386-linux-gnu_fglrx_dri
lrwxrwxrwx   1 root root    32 2011-05-30 07:32 fglrx_drv_video.so -> ../va/drivers/fglrx_drv_video.so
xbmc@live:/usr/lib/dri$

After I changed the /etc/environment I ran:

Code:
for line in $( cat /etc/environment ) ; do export $line ; done

Here's the result:

Code:
xbmc@live:/usr/lib/dri$ export | grep LIBVA
declare -x LIBVA_DRIVERS_PATH="/usr/lib/va/drivers"
declare -x LIBVA_DRIVER_NAME="xvba"
xbmc@live:/usr/lib/dri$

vainfo now gives a different error message:

Code:
xbmc@live:/usr/lib/dri$ vainfo
libva: libva version 0.32.0
libva: User requested driver 'xvba'
libva: Trying to open /usr/lib/va/drivers/xvba_drv_video.so
libva error: /usr/lib/va/drivers/xvba_drv_video.so init failed
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
xbmc@live:/usr/lib/dri$

And another export:

Code:
xbmc@live:/usr/lib/dri$ export DISPLAY=:0
xbmc@live:/usr/lib/dri$ vainfo
libva: libva version 0.32.0
libva: User requested driver 'xvba'
libva: Trying to open /usr/lib/va/drivers/xvba_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
xbmc@live:/usr/lib/dri$

Thanks.. I'll continue to work on this and let you know!


- kobik - 2011-12-14 11:40

OK guys,
I finished setting up pvr+xvba and it's seems to be working just fine.
I still have this crash on the first time the menus gets the focus after xbmc starts. xbmc restarts and functioning fine after that.

xvba seems to be working very nice and overall cpu seems to be a little lower, but when fast-forwarding in x16 or above the picture stutters.

pvr seems to be working fine too, but where is the non-linear stretch?

Overall, great work guys!
Will continue using this release.


- fritsch - 2011-12-14 11:40

@erhnam:
Of course you need the DISPLAY to issue vainfo.

From your log:
[ 80.834] (II) fglrx(0): UVD feature is enabled(II) fglrx(0):

Everything is fine :-)

And concerning the available profiles xvba should be working, same output on my Zacate System.

You keep getting this error from xbmc while playing?

Are you member of video group?


- fritsch - 2011-12-14 11:46

kobik Wrote:OK guys,
I finished setting up pvr+xvba and it's seems to be working just fine.
I still have this crash on the first time the menus gets the focus after xbmc starts. xbmc restarts and functioning fine after that.

xvba seems to be working very nice and overall cpu seems to be a little lower, but when fast-forwarding in x16 or above the picture stutters.

pvr seems to be working fine too, but where is the non-linear stretch?

Overall, great work guys!
Will continue using this release.

What do you mean by non-linear stretch? Are some scaling methods missing?

About the first crash, could you pastebin your xbmc.log.1 <- the older one, where it crashes. I think this could be a permission problem, seen this some days ago, but a simple chown has worked around it.


- erhnam - 2011-12-14 12:16

fritsch Wrote:@erhnam:
Of course you need the DISPLAY to issue vainfo.

From your log:
[ 80.834] (II) fglrx(0): UVD feature is enabled(II) fglrx(0):

Everything is fine :-)

And concerning the available profiles xvba should be working, same output on my Zacate System.

You keep getting this error from xbmc while playing?

Are you member of video group?

Thanks I'll try again with a new livecd and let you know the results. What do you mean with a member of the video group? I'm a member of the teamxbmc and working on XBMCLive. Is that what you mean?


- wsnipex - 2011-12-14 12:22

erhnam Wrote:Thanks I'll try again with a new livecd and let you know the results. What do you mean with a member of the video group? I'm a member of the teamxbmc and working on XBMCLive. Is that what you mean?

wuff@mgtws:~$ id
uid=1000(wuff) gid=1000(wuff) groups=1000(wuff),4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),107(fuse),109(lpadmin),114(admin),125(vboxusers),126(sambashare)


- chemical - 2011-12-14 12:25

erhnam Wrote:Thanks I'll try again with a new livecd and let you know the results. What do you mean with a member of the video group? I'm a member of the teamxbmc and working on XBMCLive. Is that what you mean?

That one made me laugh Laugh
Thanks


- erhnam - 2011-12-14 12:37

chemical Wrote:That one made me laugh Laugh
Thanks

Lol Smile Yes it's part of the video group.


Massive confusion - SmittyBoy - 2011-12-14 12:40

I've tried to make sense of what is being said within this thread, and unfortunately, I'm totally lost as to how to ensure a correct installation of XBMC with VAAPI support on and AMD Fusion based PC (in my case AMD E-350 APU + AMD Radeon HD 6310 with AMD M1 chipset).

As a long time software engineer, I find that it's very important to agree upon and use the same terms in all cases. When I read in this thread I see people using different phrases, and terms. This causes incredible confusion for me, and very likely many other people.

Can someone who understands this issue, please take some time - hell, I'll even pay you (modestly) for it - to put together an up-to-date guide with all terms defined so there is minimal confusion about what is required to make this all work.


- kobik - 2011-12-14 12:48

fritsch Wrote:What do you mean by non-linear stretch? Are some scaling methods missing?

About the first crash, could you pastebin your xbmc.log.1 <- the older one, where it crashes. I think this could be a permission problem, seen this some days ago, but a simple chown has worked around it.

Yes, non-linear stretch is missing from the video options when watching liveTV channels.

Here is the log
http://pastebin.com/XESQLm8v

Ignore the audiomixer errors, I'm desperately trying to enable SPDIF output.
What are these errors btw?
Code:
ERROR: SetThreadInfo: error Permission denied
I have them in my log even after xbmc restarts from the crash.


- fritsch - 2011-12-14 13:34

@kobik:
I do not know about the Linear Stretching issue, as i remember no code in xvba, which disables this?

The other issue:
could you chown .xbmc folder recursively to check the permissions? (chown -R user:user .xbmc)


- fritsch - 2011-12-14 13:39

SmittyBoy Wrote:I've tried to make sense of what is being said within this thread, and unfortunately, I'm totally lost as to how to ensure a correct installation of XBMC with VAAPI support on and AMD Fusion based PC (in my case AMD E-350 APU + AMD Radeon HD 6310 with AMD M1 chipset).

As a long time software engineer, I find that it's very important to agree upon and use the same terms in all cases. When I read in this thread I see people using different phrases, and terms. This causes incredible confusion for me, and very likely many other people.

Can someone who understands this issue, please take some time - hell, I'll even pay you (modestly) for it - to put together an up-to-date guide with all terms defined so there is minimal confusion about what is required to make this all work.

Sorry for confusing you. This thread started with VAAPI wrapped to work on fglrx. It continued to be xvba only stuff mixed with creating the live cd :-)

I think it confuses even more, if I tell the "normal" way again in this post.

You want to have xbmc-pvr running fine on your Zacate System?


- kobik - 2011-12-14 14:23

Correct me if I'm wrong but with pvr+xvba release only the following steps are required?

Step 1:
We will use an 64-bit 11.10 Ubuntu Oneric 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
sudo apt-get install ssh python-software-properties udisks upower xorg alsa-utils mesa-utils git-core librtmp0 lirc
sudo adduser YourUserName video
sudo adduser YourUserName audio
sudo reboot

Step 2:
We need to install the latest AMD/ATI drivers (now: 11.11). 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
sudo apt-get install -y ia32-libs


cd ~; mkdir catalyst11.12; cd catalyst11.12
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-12-x86.x86_64.run
sudo sh ati-driver-installer-11-12-x86.x86_64.run --buildandinstallpkg

generate xorg.conf
Code:
sudo aticonfig --initial -f
sudo aticonfig --input=/etc/X11/xorg.conf --tls=1

Step 3:
Install PVR+XVBA build
Code:
sudo add-apt-repository ppa:wsnipex/xbmc-xvba
sudo apt-get update
sudo apt-get install xbmc xbmc-bin

An auto start script