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)



- ErikB - 2011-09-06

FernetMenta Wrote:The "big pixels" are probably because killa-sample and other videos showing this are encoded with h.264 level > 4.1. The xvba backend driver reduces the number of references needed by h.264 in this case. There might be a better way of dealing with level > 4.1. vdpau does not support level > 4.1 either but plays killa-sample fine.

Sure, with VDPAU it looks good, but my hardware can only bring me up to around 12 fps... (Asrock E350M1 (Fusion) )

Crossing my thumbs that this will be fixed further ahead, but for most movies current support is great!


- hipp0 - 2011-09-06

Thanks spocky184 will try this. I think the key is to add these lines and the 11.8 drivers.

I think I had some Problems with the xorg.conf and the refresh rate. @spocky184 could please write me an PM with your xorg.conf? Or perhaps a screenshot of the ati control center. Could perhaps help me. In xbmc, are you using the "Adjust display refresh rate to match video " option?
Quote:Controll if you have also these two sections in /etc/X11/xorg.conf:
Code:

Section "Extensions"
Option "Composite" "Disable"
EndSection

Section "ServerFlags"
Option "AIGLX" "off"
EndSection

I build the mainline yesterday with the patches from FernetMenta, it also works quite well. The "big pixels" I also noticed in some videos.

Seems everything is getting well :-)


- abudabi - 2011-09-06

@ErikB

I too have the "big pixel" affect on some 1080p and it's definately related to the level that FernetMenta mentioned. My ramblings here documents my findings


- ErikB - 2011-09-06

So, today I'm thinking about doing the same process but with ubuntu server instead of ubuntu desktop. Will I succeed?

Why, you ask?
Because when performing installation like i mentioned before - I run too low on disk space. I have a 16GB USB stick, which was partitioned to leave 3GB for linux-swap etc, and in the end i have less than 1GB free when everything is installed. not enough, sadly.

So, any advice not-to do it before I start?


- Balinus - 2011-09-06

ErikB, I'm surprised that you only have 1GB left after your installation. 16GB should be more than plenty for Ubuntu desktop version.

Side question : Is there a lot of files that are encoded in "H.264 content over [email protected]" ?


- spocky184 - 2011-09-06

@hipp0
hipp0 Wrote:In xbmc, are you using the "Adjust display refresh rate to match video " option?
No, but that seems to help if you have stuttering playback while playing mkvs.

Greetings
spocky184


- ErikB - 2011-09-06

ErikB Wrote:So, today I'm thinking about doing the same process but with ubuntu server instead of ubuntu desktop. Will I succeed?

Why, you ask?
Because when performing installation like i mentioned before - I run too low on disk space. I have a 16GB USB stick, which was partitioned to leave 3GB for linux-swap etc, and in the end i have less than 1GB free when everything is installed. not enough, sadly.

So, any advice not-to do it before I start?

Actually I got it to work even in the ubuntu server!
Just basically the same procedure as before, only using a minimal amd64 install!

Code:
(first - minimal install of ubuntu server 64bit)

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install wget dh-modaliases ia32-libs
apt-get install dkms
apt-get install xorg

cd ~; mkdir catalyst11.8; cd catalyst11.8
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-8-x86.x86_64.run
chmod +x ati-driver-installer-11-8-x86.x86_64.run
sudo sh ./ati-driver-installer-11-8-x86.x86_64.run --buildpkg Ubuntu/natty


sudo dpkg -i fglrx*.deb


sudo aticonfig --initial -f
sudo aticonfig --input=/etc/X11/xorg.conf --tls=1
reboot


sudo apt-get install -y libkms1 libdrm-dev pkg-config vainfo

cd ~
mkdir vaapi; cd vaapi
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

cd /usr/lib/dri; sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so

sudo nano /etc/environment
insert:
LIBVA_DRIVER_NAME=xvba
LIBVA_DRIVERS_PATH=/usr/lib/va/drivers

sudo reboot


sudo apt-get install python-software-properties
sudo add-apt-repository ppa:lars-opdenkamp/xbmc-pvr
sudo apt-get -y update
sudo apt-get install xbmc

sudo adduser xbmc video
sudo adduser xbmc audio

reboot

xinit xbmc

Now I just need help how to get the server to automatically run "startx" upon boot. Right now I need to ssh into the server and run startx to run.
How can I get it to run that by it self?

When I boot the server, the monitor connected to the server only shows a blinking "_" in the top left corner - until I ssh to it and run startx.

Thanks


- spocky184 - 2011-09-07

maybe try this:
Code:
echo 'case "`tty`" in' >> ~/.bash_profile
echo '   /dev/tty1) clear && startx &>/dev/null;;' >> ~/.bash_profile
echo 'esac' >> ~/.bash_profile

and if you also want to start xbmc automatically:
Code:
echo 'exec xbmc --standalone' > ~/.xsession

only tested on ubuntu alternate not on server installation.

hope that helps
cheerz spocky184


- ErikB - 2011-09-07

spocky184 Wrote:maybe try this:
Code:
echo 'case "`tty`" in' >> ~/.bash_profile
echo '   /dev/tty1) clear && startx &>/dev/null;;' >> ~/.bash_profile
echo 'esac' >> ~/.bash_profile

and if you also want to start xbmc automatically:
Code:
echo 'exec xbmc --standalone' > ~/.xsession

only tested on ubuntu alternate not on server installation.

hope that helps
cheerz spocky184

Thank you, but I don't really succeed..
What happens is that the server boots, quickly splashes the "ubnutu 11.04" loading background, goes to black with a _ in top left corner for a few seconds and then goes all black. Seems like it started startx, but does not start xbmc or any console there, just goes black.

If I dont add contents to .bash_profile screen stays in blinking "_" - mode.

BUT! I've found another solution.
I can boot the server, with no .bash_profile, and then connect with ssh, and then run "startx&".
The & makes it run in the background and then I can logout from ssh and xbmc keeps playing on my server. Nice.
Only drawback is that whenever I reboot I need to ssh to start xbmc.

Strange, should be able to automatize something like that.


- ErikB - 2011-09-07

ErikB Wrote:Strange, should be able to automatize something like that.

Actually, you can. By doing this!
create a file, for instance xbmcstarter, and put it in /etc/init.d

Content:
Code:
#!/bin/sh
startx

And finally run chmod +x xbmcstarter


When starting the server like this, xbmc starts after bootup.. but when starting a movie xbmc instantly restarts, for some reason.
Guess there is some difference between starting from /etc/init.d and from ssh...

EDIT: Maybe it has to do with the fact that startx is run as root instead of as xbmc - and root doesnt have video or audio privileges.. Will try adding root tho those groups tonight. (or maybe the other way around or something else login-related)


- abudabi - 2011-09-07

FernetMenta Wrote:The "big pixels" are probably because killa-sample and other videos showing this are encoded with h.264 level > 4.1. The xvba backend driver reduces the number of references needed by h.264 in this case. There might be a better way of dealing with level > 4.1. vdpau does not support level > 4.1 either but plays killa-sample fine.

Is it an easy thing to upgrade VDPAU later (when they fix it) or should I hold off on rolling out my system? I'm fairly noobish so dont want to set everything up now just to reload later Smile

PS. I am using lots of other apps on my desktop not just xbmc


- chrischdi - 2011-09-07

ErikB Wrote:Actually, you can. By doing this!
create a file, for instance xbmcstarter, and put it in /etc/init.d

Content:
Code:
#!/bin/sh
startx

And finally run chmod +x xbmcstarter


When starting the server like this, xbmc starts after bootup.. but when starting a movie xbmc instantly restarts, for some reason.
Guess there is some difference between starting from /etc/init.d and from ssh...

EDIT: Maybe it has to do with the fact that startx is run as root instead of as xbmc - and root doesnt have video or audio privileges.. Will try adding root tho those groups tonight. (or maybe the other way around or something else login-related)

Try to Install xbmc-live. It's a startup script for XBMC and also aviable in ppa:lars-opdenkamp/xbmc-pvr
I'm sure it create's a startup script in /etc/init.d with this content: Link

But I also got the problem that xbmc crashes when starting a video with vaapi enabled.

My only option is to compile myself?
Installed from the pvr ppa.


- ErikB - 2011-09-07

Followup on what I did with my issues running XBMC on a Zacate with ubuntu server..
The problem with the blinking console was solved with ctrl+alt+F1.

But anyway. Today I found out that XBMC should play most anything on a Apple TV. And then I checked and saw the prices of those things... And then I regretted spending som much time trying to make my server also be the XBMC frontend.

Anyway, went to the store, bought an Apple TV2, fiddled around and installed, and it works like a charm. Even plays the 1080p files without any "big pixel" issues.

Said and done, I will let my E350 be a headless (file- and web-)server and use Apple TV as my frontend. It's gonna be great. Sad it took me so much time to find how great the Apple TV is.

Anyway, good luck to the rest of you. Thanks for all your input.


- Balinus - 2011-09-08

ErikB Wrote:Followup on what I did with my issues running XBMC on a Zacate with ubuntu server..
The problem with the blinking console was solved with ctrl+alt+F1.

But anyway. Today I found out that XBMC should play most anything on a Apple TV. And then I checked and saw the prices of those things... And then I regretted spending som much time trying to make my server also be the XBMC frontend.

Anyway, went to the store, bought an Apple TV2, fiddled around and installed, and it works like a charm. Even plays the 1080p files without any "big pixel" issues.

Said and done, I will let my E350 be a headless (file- and web-)server and use Apple TV as my frontend. It's gonna be great. Sad it took me so much time to find how great the Apple TV is.

Anyway, good luck to the rest of you. Thanks for all your input.

I thought that the apple TV2 was unable to play 1080p files... :confused2:


- ErikB - 2011-09-08

Balinus Wrote:I thought that the apple TV2 was unable to play 1080p files... :confused2:

Well, technically it can.. but it still only outputs 720p through the HDMI. Which is sufficient for me, since my projector is only capable up to 1280x720.

Erik