• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 58
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform
Hey Robotica I see you updated the first post catalyst install section using the modified instructions I provided. That's great and all except my instructions are for 2.6.39 kernel and I thought your instructions were based on the standard 2.6.38 kernel. That might confuse people as I have no idea if that patch will break the driver if installed on 2.6.38...(you could test I suppose).
Reply
True, but I also update OP with instructions to upgrade to newer kernel...

Also check this out, maybe it is usefull: http://phoronix.com/forums/showthread.ph...riverName()
Reply
Robotica Wrote:Maybe it is easier to build from GIT instead of using 10. 1 since the patch is included.

The fact is perhaps that I don't understand well the instructions on the guide. You mean that here you offered two options? I thought the patch was something that wasn't included on CODE

@WytRaven: Yes I'm also using that kernel.
But I'm really lost on code order execution. I'll post my execution and perhaps we can make some "compositing". I'm more biased to include all orders in the guide, becouse then there's finally the possibility of making a script.

My notes, feel free to blame Wink
Code:
##DO A CLEAN INSTALLATION FROM A MINIMAL UBUNTU 11.04
##USED CLI METHOD
##LEAVES ME ON A BLACK SCREEN, I CONTINUE FROM CTRL-ALT-F1
####################################################
sudo apt-get update
sudo apt-get install -y ssh python-software-properties
sudo reboot

##ACCESSED FROM WINDOWS WITH PUTTY (OR LINUX WITH ssh -l xbmc my.IP.address)

sudo apt-get install -y udisks usbmount ntfs-3g upower acpi-support xorg alsa-utils mesa-utils
sudo usermod --group adm,sudo,cdrom,floppy,audio,video,plugdev,fuse xbmc #,netdev,powerdev,polkituser
#THIS LAST PERHAPS IS NOT REQUIRED. XBMC DOES IT.


####################################################
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo nano /etc/apt/sources.list
##ENSURE LINES FROM UNIVERSE, MULTIVERSE AND RESTRICTED ARE UNCOMMENTED. ALSO PARTNERS

sudo apt-get update && sudo apt-get dist-upgrade

##VAAPIVAAPIVAAPIVAAPIVAAPIVAAPI##########################
## RECOMMENDED OPTION:

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

## SUPPOSED CORRECTION TO DRI AND VERSIONS PROBLEMS. DOES NOT WORK INCOMPATIBLE.
#sudo apt-add-repository ppa:rexbron/bugfixes
#sudo apt-get update && sudo apt-get dist-upgrade
#cd ~/vaapi
#wget https://launchpad.net/~rexbron/+archive/bugfixes/+files/xvba-va-driver_0.7.8-0ubuntu1_amd64.deb
#sudo dpkg -i xvba-va-driver_0.7.8-0ubuntu1_amd64.deb

## SUPPOSED CORRECTION TO ACCELERATION. DOES NOT WORK INCOMPATIBLE.
## http://ubuntuforums.org/showthread.php?t=1677477&page=2
## http://forum.xbmc.org/printthread.php?t=81286&pp=40&page=5
#sudo apt-add-repository ppa:dtl131/catalysthacks
#sudo apt-get update && sudo apt-get dist-upgrade


## UBUNTU OPTION ------------------------------------------------------
#sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
#sudo apt-get install -y libva1 libva-dev libva-glx1 libva-tpi1 libva-x11-1 vainfo

##THAT INSTALLS:
##libva1 (1.0.8-3) UPD
##libva-x11-1 (1.0.8-3) NEW
##libva-tpi1 (1.0.8-3) NEW
##libva-glx1 (1.0.8-3) NEW
##libva-dev (1.0.8-3) UPD
##-----------------------------------------------------------------------

vainfo
##RESULT: vainfo: Error, can't open display: ''

##DRIVERDRIVERDRIVERDRIVERDRIVERDRIVERDRIVER#################
## PRIVATIVE OPTION
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
chmod +x ati-driver-installer-11-6-x86.x86_64.run

sudo sh ./ati-driver-installer-11-6-x86.x86_64.run --buildpkg Ubuntu/natty
sudo dpkg -i fglrx*.deb

sudo aticonfig --initial -f ##--adapter=all##
sudo reboot

##ERROR VIDEO.SO ON VAINFO--------------------------------------------
sudo nano /etc/X11/xorg.conf
## ADD TO [MODULE]:
## Load "dri"
## Change DPMS to false (energy saving)

fglrxinfo
##RESULT: Error: unable to open display (null)
fgl_glxgears
##RESULT: Error: couldn't open display (null)


## OPEN SOURCE OPTION-------------------------------------------------
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update && sudo apt-get install fglrx

sudo aticonfig --initial -f
sudo reboot

glxinfo
glxgears
##-----------------------------------------------------------------------

## IF REQUIRED-----------------------------------------------------------
??sudo aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE" ##DUAL MONITORS
??sudo aticonfig --input=/etc/X11/xorg.conf --tls=1 ##FORCE CHANGES
sudo reboot

##ERRORS FIX===============================================
## UNSUPPORTED HARDWARE WATERMARK
cd ~/catalyst11.5/
#IF NOT PRESENT
sh ati-driver-installer-11-5-x86.x86_64.run --extract driver

sudo mv /etc/ati/control ~/control.bak
sudo cp driver/common/etc/ati/control /etc/ati

## OR
nano fixwatermark.sh

#!/bin/sh
DRIVER=/usr/lib/fglrx/xorg/modules/drivers/fglrx_drv.so
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER
done

chmod +x fixwatermark.sh
sudo sh fixwatermark.sh

## IF HANGING
sudo aticonfig --tls=0

##XBMCXBMCXBMCXBMCXBMCXBMCXBMC----------------------------------
sudo apt-add-repository ppa:lars-opdenkamp/xbmc-pvr
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get install -y xbmc

## AUTORUN
sudo apt-get install xbmc-live
## TEST
xinit xbmc-standalone

##ERRORS LOGGED:
grep EE /var/log/Xorg.0.log
##If you want to boot to a console for repair without starting XBMC,
##hold down the shift key when booting and "grub" will give you a choice of "(recovery mode)".


## SUPPORT NTFS--------------------------------------------------------
sudo nano /etc/usbmount/usbmount.conf
##FILESYSTEMS="ntfs vfat ext2 ext3 ext4 hfsplus"

## PERMIT XBMC POWERDOWN RESTART + AUTOMOUNT + NTFS-------------
sudo nano /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
##[Actions for xbmc user]
##Identity=unix-user:xbmc
##Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*
##ResultActive=yes
Reply
Robotica Wrote:True, but I also update OP with instructions to upgrade to newer kernel...

Also check this out, maybe it is usefull: http://phoronix.com/forums/showthread.ph...riverName()

But by now 2.6.39 its the default kernel on natty minimal installations.
Thats my objective. Make a minimal running machine with the newer possible os and drivers.

Seems that the code post by WytRaven will make my installation finally work. That could be the issue. Now I must see where it goes.
I understand that it replaces the entire driver installation section?

Tomorrow I'll take the htpc to my desktop and clean-start from what we concret today.
If you want me to post the installed kernel, xorg, alsa, mesa, etc versions at some moment, please tell me how to obtain. (Don't make me look at some dist-upgrade text, please)
Reply
Rapoza Wrote:The fact is perhaps that I don't understand well the instructions on the guide. You mean that here you offered two options? I thought the patch was something that wasn't included on CODE

Depends on your source:
Not included: 10.0, 10.1
Included: Git

Rapoza Wrote:But by now 2.6.39 its the default kernel on natty minimal installations.
The source I refer to is based on 2.6.38. Where is your source?
Reply
WytRaven Wrote:If you are like me and using the 2.6.39 kernel then the standard method of installation wont work. Here's a revised version based on Robotica's original format which works for us:

Quote:Only if you don't have an /etc/X11/xorg.conf already. Well let's just say that I didn't do an aticonfig and already had an /etc/X11/xorg.conf in place and it worked for me.

Its needed when you do minimal install. That was the reason of my first insanity, until I realized that doing a complete ubuntu install creates some configuration files that I was missing (prior of installation of xbmc AND live script)
I made a maverick complete and all was nice and clean. So I'm now trying the minimal.

@Robotica

Errr... The minimal downloads all the packages at the moment. I'm getting that kernel from start. I got it before doing any dist-upgrade. In fact, on all of them it said 0 upgrades.

YEES! Its GIT! I tought you recommended.

Note that ##--adapter=all## is commented. Only required if you have two gfx adapters. I tried becouse I was getting strange resolution issues without using DVI+HDMI.

Also look that I took the maximum possible code from before you can do ssh connection, so people can cutri-paste from putty.
Also Python could be later.
Reply
WytRaven Wrote:But I have not compiled xbmc yet. I'm still playing with mplayer and have no sound and -vo vaapi crashes it every time. I may just go straight for the xbmc build and then start figuring out the issues as I have no idea if the mplayer crash is it's fault or the vaapi libs at this point and I have no intention of using mplayer on this machine beyond this testing I'm doing.

Try with XBMC it installs plenty of audio dependencies. I think your scenario would change too much to stay on mplayer first.

HAve you already tested disabling composite and unity for the crashes. I saw anything around.
Reply
WytRaven Wrote:But I have not compiled xbmc yet. I'm still playing with mplayer and have no sound and -vo vaapi crashes it every time. I may just go straight for the xbmc build and then start figuring out the issues as I have no idea if the mplayer crash is it's fault or the vaapi libs at this point and I have no intention of using mplayer on this machine beyond this testing I'm doing.

Sound problem in linux: http://forum.xbmc.org/showthread.php?tid=103563
Reply
I have an Ubuntu minimal install, I have full video acceleration, and I didn't compile a single package. I really don't think it's necessary in fact. I installed two relevant ppas: lars-opdenkamp/xbmc-pvr, and ubuntu-x-swat/x-updates.

I have these packages installed:
  1. xbmc 11.0-pvr+odk40-eden~git20110530.615e173-0ubuntu1~ppa+odk40~natty
  2. xbmc-bin 11.0-pvr+odk40-eden~git20110530.615e173-0ubuntu1~ppa+odk40~natty
  3. libva-glx1 0.12-1~xup
  4. libva-x11-1 0.12-1~xup
  5. libva1 0.12-1~xup
  6. xvba-va-driver 7.8-0ubuntu1
  7. xserver-xorg 7.6+4ubuntu3
  8. xserver-xorg-core 1.10.1-1ubuntu1.1
  9. fglrx 8.850-0ubuntu1~xup2~natty
  10. fglrx-amdcccle 2:8.850-0ubuntu1~xup2~natty
  11. fglrx-dev 8.850-0ubuntu1~xup2~natty
  12. linux-image-2.6.39-3-generic 6.39-3.9
All the packages should be available from the above ppas and/or the main repos. Note that I did *not* use splitted-desktop's debs, because of a recent conflict with fglrx (IIRC). I did not run aticonfig to generate an xorg, I just let the driver auto-detect the screen's resolution during startup [1].

Be sure to run this command and pick fglrx:
Code:
sudo update-alternatives --config gl_conf

Be sure that your user is added to audio, video groups. There may be more groups required depending on your install, ie. whether you use pulseaudio like I do, etc. My vainfo:
Code:
libva: libva version 0.32.0
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/fglrx_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.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

Others seemed worried that va_openDriver() returning 0 indicated a problem, but that does not seem to be the case for me. I have fully accelerated decoding for 1080p H.264 and VC-1.

My installation isn't perfect, but I mainly have to contend with driver bugs, so I imagine the issues are common to every install.

[1] The only problem with this is that if the screen is not plugged in or started at boot time, xbmc may start with the wrong resolution. In this case you have to log out and back in. I have the Slim login manager installed, set to auto-login at boot.
Reply
In fact "returns 0" means no errors. 1=errors.

I tried that way the first time but didn't work on natty. thats the reason of the 2nd option in my notes.

Can you please post the commands and more important the execution order?

THX.
Reply
I should also note that there's a missing dependency in the standard xvba-va-driver package which causes it to fail. I'm surprised that this still hasn't been fixed actually. I used the patched package provided by Andrew Hunter.

I tried upgrading to the new Catalyst 11.6 release, but it doesn't build against 2.6.39, and downgrading the kernel conflicts with the libva versions bundled elsewhere, and the xvba-video package from splitted-desktop doesn't integrate properly either. You're better off just using the standard packages I listed above, and waiting for Ubuntu maintainers to release updates.

As for the specific commands, just use apt-get. As for their order, it shouldn't matter. If you have trouble after having only the above two ppas installed, try apt-get update; apt-get dist-upgrade, then try to install the packages I listed once that's done.
Reply
Well I decided to give SDM2011's method a go. Started from mini.iso CLI install. I have all the same packages installed that he had via apt-get, with the exception of Catalyst 11.6, which I got built using the patched method I mentioned earlier. (by the way the 2.6.39-3 kernel is in the xorg-edgers/ppa)

What I have is a nice XBMC install that I can run around and play with menus in, I even get nice little thumbnails of my music videos but the split second I try to play a video .... instant crash, just like mplayer did on previous install.

I have been up all night on this and I really can't be stuffed looking at log files right now. Yay for yet another failed attempt.

EDIT: Ok, so I did take a quick peek at logs. Looks like it audio that is failing not the video. I see this in the log "VAAPI - attempting to open codec 28 with profile 77 at level 40 with 2 reference frames" but nothing saying that it didn't work. It then goes on to initialising audio and ultimately fails...however the log suggests that it is gracefully handling the issues with audio...but crashes.
Reply
WytRaven Wrote:Well I decided to give SDM2011's method a go. Started from mini.iso CLI install. I have all the same packages installed that he had via apt-get, with the exception of Catalyst 11.6, which I got built using the patched method I mentioned earlier. (by the way the 2.6.39-3 kernel is in the xorg-edgers/ppa)

What I have is a nice XBMC install that I can run around and play with menus in, I even get nice little thumbnails of my music videos but the split second I try to play a video .... instant crash, just like mplayer did on previous install.

I have been up all night on this and I really can't be stuffed looking at log files right now. Yay for yet another failed attempt.

Damn!

Hopefully, I will give it a try this weekend. Will be using XBMC git and try with .38 kernel instead.
Reply
SDM2011 Wrote:I should also note that there's a missing dependency in the standard xvba-va-driver package which causes it to fail. I'm surprised that this still hasn't been fixed actually. I used the patched package provided by Andrew Hunter.

I tried upgrading to the new Catalyst 11.6 release, but it doesn't build against 2.6.39, and downgrading the kernel conflicts with the libva versions bundled elsewhere, and the xvba-video package from splitted-desktop doesn't integrate properly either. You're better off just using the standard packages I listed above, and waiting for Ubuntu maintainers to release updates.

As for the specific commands, just use apt-get. As for their order, it shouldn't matter. If you have trouble after having only the above two ppas installed, try apt-get update; apt-get dist-upgrade, then try to install the packages I listed once that's done.


Well I tried the recommendations, all of them I think. Latest xvba from Andrew's PPA (which is splitted-desktop's), xbmc-pvr from Lars' PPA, catalyst 11.5 from x-updates, latest libva from x-org-edgers (or was it x-updates), and kernel 2.6.39-3 from xorg-edgers.

Exact same disappointing results. XBMC works great as long as vaapi is disabled; when vaapi is enabled, xbmc will crash when attempting to play mpeg4/h264 content.

I also tried compiling directly from GIT - as you can guess, I got the same results.


This is on 11.04/Natty AMD64, ASUS E35M1-I Deluxe.

Acceleration is just not working for me. I'm hoping we will figure this out sometime (soon Smile !



WytRaven Wrote:Well I decided to give SDM2011's method a go. Started from mini.iso CLI install. I have all the same packages installed that he had via apt-get, with the exception of Catalyst 11.6, which I got built using the patched method I mentioned earlier. (by the way the 2.6.39-3 kernel is in the xorg-edgers/ppa)

What I have is a nice XBMC install that I can run around and play with menus in, I even get nice little thumbnails of my music videos but the split second I try to play a video .... instant crash, just like mplayer did on previous install.

I have been up all night on this and I really can't be stuffed looking at log files right now. Yay for yet another failed attempt.

EDIT: Ok, so I did take a quick peek at logs. Looks like it audio that is failing not the video. I see this in the log "VAAPI - attempting to open codec 28 with profile 77 at level 40 with 2 reference frames" but nothing saying that it didn't work. It then goes on to initialising audio and ultimately fails...however the log suggests that it is gracefully handling the issues with audio...but crashes.

The crash logs in my build with 2.6.39-3 are pretty much the same as they were with 2.6.38.

2.6.39-3:
Code:
19:26:34 T:140497501726464 M:1377157120    INFO: ffmpeg[1FAEA700]:   Duration: 00:54:15.04, start: 0.000000, bitrate: 1802 kb/s
19:26:34 T:140497501726464 M:1377157120    INFO: ffmpeg[1FAEA700]:     Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
19:26:34 T:140497501726464 M:1377157120    INFO: ffmpeg[1FAEA700]:     Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
19:26:34 T:140497501726464 M:1377157120  NOTICE: Opening video stream: 0 source: 256
19:26:34 T:140497501726464 M:1377157120  NOTICE: Creating video codec with codec id: 13
19:26:34 T:140497501726464 M:1377157120   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:yes OpenMax:no VDPAU:yes VAAPI:yes
19:26:34 T:140497501726464 M:1377157120   DEBUG: FactoryCodec - Video:  - Opening
19:26:34 T:140497501726464 M:1377157120   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/swscale-0-x86_64-linux.so)
19:26:34 T:140497501726464 M:1377157120   DEBUG: Loading: /usr/lib/xbmc/system/players/dvdplayer/swscale-0-x86_64-linux.so
19:26:34 T:140497501726464 M:1377157120  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
19:26:34 T:140497501726464 M:1377157120   DEBUG: VAAPI - attempting to open codec 13 with profile -99 at level -99 with 1 reference frames


############### END LOG FILE ################


2.6.38

Code:
19:03:13 T:139919522219776 M:1324822528    INFO: ffmpeg[8D6B4700]:   Duration: 00:54:15.04, start: 0.000000, bitrate: 1802 kb/s
19:03:13 T:139919522219776 M:1324822528    INFO: ffmpeg[8D6B4700]:     Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
19:03:13 T:139919522219776 M:1324822528    INFO: ffmpeg[8D6B4700]:     Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
19:03:13 T:139919522219776 M:1324822528  NOTICE: Opening video stream: 0 source: 256
19:03:13 T:139919522219776 M:1324822528  NOTICE: Creating video codec with codec id: 13
19:03:13 T:139919522219776 M:1324822528   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:yes OpenMax:no VDPAU:yes VAAPI:yes
19:03:13 T:139919522219776 M:1324822528   DEBUG: FactoryCodec - Video:  - Opening
19:03:13 T:139919522219776 M:1324822528  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
19:03:13 T:139919522219776 M:1324822528   DEBUG: VAAPI - attempting to open codec 13 with profile -99 at level -99 with 1 reference frames
19:03:13 T:139919978289088 M:1324822528   DEBUG: ------ Window Init (DialogBusy.xml) ------
19:03:13 T:139919978289088 M:1324822528   DEBUG: Alloc resources: 0.02ms (0.01 ms skin load)


############### END LOG FILE ################

############ END XBMC CRASH LOG #############
Reply
SO XBMC logs tell it crashed. How does your xorg.conf/Xorg.0.log looks like? And aticonfig and glxinfo?

And I also think that it is not necessary to compile with VDPAU and ChrystalHD support. I also suggest not using PPA atm, so we all compile the same and have consitent results.
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 58

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform14