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)



- htpcero - 2011-06-19

jbo87 Wrote:So wakeup from STR works for you under linux? I guess ur not using the AsRock E350M1 then...

as posted above, using ASUS E35M1-I Deluxe -yes- suspend & resume work just fine - other than the issue with the mce-remote dying after the wakeup, but I have hope that this will be sorted out as well. The lirc guy asked for logs & stuff and seems to be really pro-active. Will see.


- WytRaven - 2011-06-19

Thanks Rapoza for the environment stuff. I have updated the installation.txt to include the following after fglrx installation

Code:
### Add some fglrx related variables to environment
echo "" >> /etc/environment
echo "LIBVA_DRIVERS_PATH=/usr/lib/dri" >> /etc/environment
echo "LIBVA_DRIVER_NAME=fglrx" >> /etc/environment

htpcero is right, you shouldn't need the DISPLAY variable there. That was only there to let one user know about the display that had been started by the xserver under another user. Once up and running under the user that started x it shouldn't be required.

It's great to hear so many people are getting going now. I must admit though I am a little surprised at this:
gaspo100 Wrote:To get rid of tearing in Settings>System>Video Output I set 'Vertical blank sync' to 'Always On'. I didn't have to change any other settings. My audio device is set to 'hdmi (ALSA)' for playback and passthrough.

All is working fine, bluray rips play with 10-15% cpu.
The only thing I have noticed is that when trying to play mkv HD TV shows (SG Universe, Bing Bang Theory, etc.) it takes about 5-10 seconds before audio starts playing and syncs with video.

I have tried every combination of every setting I can think of to get 24p blu-ray playback without tearing or extreme judder to no avail. Any chance you could screen shot your video/playback and system/video settings tabs for reference please?


- SDM2011 - 2011-06-19

Quote:as posted above, using ASUS E35M1-I Deluxe -yes- suspend & resume work just fine

I wonder why it works in your configuration, but not mine. Perhaps because you launch xbmc from upstart, likely with root permissions which supercedes the PolicyKit restrictions. I just wonder what I need to tweak to get suspend/hibernate working with PolicyKit.

Quote:I have tried every combination of every setting I can think of to get 24p blu-ray playback without tearing or extreme judder to no avail.

Probably covered already, but did you set the tearing setting in the AMD control panel?

Edit: I believe the suspend issues are because the script process launching xbmc.bin disappears after xbmc starts, so it loses the policy kit session. I altered my .xinitrc to simply be:
Code:
exec ck-launch-session xbmc-standalone
This is a standard script in the xbmc package that launches pulseaudio and xbmc.bin, and seems to stick around, thus keeping ck-launch-session active. I've been able to suspend a few times, but it doesn't work every time. I can't seem to find anywhere that failures are logged, so this is a little difficult to diagnose.


- Rapoza - 2011-06-20

craigdabbs Wrote:find the soundcard you want to use, look for card: X device: X
then just add hw:0,3 to the custom field in xbmc on both. replace 0,3 with your card,device.

That fixed the problem of no audio in xbmc. Although the ~/.asoundrc file does not fix the silent menus.

I've installed pulseaudio and also isn't fixed. I think I've done something wrong with it. I'm having hard time deciphering english when things become so tech. Nod
Is pulse (with all its dependencies) needed for the interface have sounds of anything? As putting manually the sound device in xbmc fixed the playing sound I think i want to get rid of it.

@htpzero: That directions supposed to make xbmc autostart as is? without including xbmcrun in any init script? does not work for me. Huh
The underscan lines (curiously after the underscan command i have overscan) where they have to be placed? bottom of xbmcrun?

Edit: You have the two lower lines identical. Wouldn't one of those be:
Code:
aticonfig --set-dispattrib=dfp1,sizeY:1080

Merit on the env thing goes to dafrog, who pointed it.


- Rapoza - 2011-06-20

jbo87 Wrote:So wakeup from STR works for you under linux? I guess ur not using the AsRock E350M1 then...

I wrote anywhere back 'E350m1' being my mobo. Sorry, I'm so tired, many sleepless nights. Mines ASUS E35M1-i deluxe


- gaspo100 - 2011-06-20

@WytRaven
Quote:I have tried every combination of every setting I can think of to get 24p blu-ray playback without tearing or extreme judder to no avail. Any chance you could screen shot your video/playback and system/video settings tabs for reference please?
settings-videos-playback
xbmc-settings-system-video
xbmc-settings-system-audio
movie screenshot


- Rapoza - 2011-06-20

I also experiment some strange things on HD files. On some of them I saw plenty of artifacts whether is movement, don't know if they're 24p:
Image

Here you can also see what was talking about deffects on subtitles loaded from file. That ones the only thing they had where colors for each caracter.

On other HD movies the motion seems on steps. These could be saved as 24p.
Anyone could post a way to dump file info so we can share on the post and take conclussions.

All of them reproduced constant and impolute with vlc on my natty desktop. It has an nvidia, uh!? (but it completely crashed on the last drivers update, even no repair console. Confused)

*That was before the underscan disabled


ZBOX AD02 - Almost there - Bitruder - 2011-06-20

I've been getting my ZBOX AD02 up and running by following this thread. I'm running Ubuntu 11.04, the 2.6.39 kernel, Catalyst 11.6 drivers, VAAPI 0.32, XBMC 10.1-Dharma. For a while I would have XBMC and MPlayer crash right away when trying to play anything with VAAPI.

I fixed this by disabling the Composite extension in xorg.conf and now I can play videos on my HDTV fine and I get audio through the HDMI cable without issue.

I do have ONE other problem though that may or may not be a limitation of my hardware. When I'm playing a 1080P MKV file my CPU usage is below 20% on both cores and it seems to play without frames dropping (how do I check this? Is it shown in the XBMC overlay you see by pressing 'o'?). However, as soon as XBMC goes to display something overtop of the video (for example, the menu or playback controls), then it gets choppy and I definitely see frame loss. After I go back, the audio will be out of sync and I have to pause/play it to get it back in sync.

Is it simply that by AD02 (E-350 processor) is too slow to handle playing 1080P video and drawing overlays? A similar thing happens, albeit to a lesser degree, when playing 720P video files.


- SDM2011 - 2011-06-20

Quote:However, as soon as XBMC goes to display something overtop of the video (for example, the menu or playback controls), then it gets choppy and I definitely see frame loss. After I go back, the audio will be out of sync and I have to pause/play it to get it back in sync.

Funny, I have the exactly opposite problem. I can display overlays just fine even playing 1080p, but resuming from pause causes the video to stutter and audio is out of sync. It takes almost a minute for everything to stabilize again. I'd rather have your troubles! :-)


- peterk2005 - 2011-06-20

gaspo100 Wrote:@WytRaven

settings-videos-playback
xbmc-settings-system-video
xbmc-settings-system-audio
movie screenshot

Thanks. So you're not using 24P display refresh rate for bluray material. You're using 60Hz which is OK for all of us.

If your display is capable of 24P, can you please try it? Either set refresh rate directly to 24Hz in settings->system->video output, or check "adjust display refresh rate to match video" in settings->videos->playback. (Of course you can do this only if your display is 24P-capable.)


- SDM2011 - 2011-06-20

Quote:I also experiment some strange things on HD files. On some of them I saw plenty of artifacts whether is movement, don't know if they're 24p

I've seen those artifacts myself, but it's only happened on one 720p file so far, and it was 24p (although it's not the only 24p file I have).


- Rapoza - 2011-06-20

I discovered an interesting thing this midday.
As I hadn't luck autostarting xbmc on this install, I always started xbmc with the following command without sudos:

Quote:xinit xbmc-standalone

But today, typed by error:

Quote:xinit xbmc

Voilá! I got sound at the interface.

And with the starting script of htpcero I'm having hard times. I commented the program line and replaced for those more friendly but always throws an error indicating that can't access display or xserver.

The standard line also don't work. Oo


- WytRaven - 2011-06-20

Rapoza Wrote:Voilá! I got sound at the interface.

As SDMC2011 said earlier the standalone script launches pulse audio as well. if your user isn't in the correct group for pulse audio (which is?) then that might be why you lose sound.

@gaspo100
Thanks for the settings but as peterk2005 mentioned this is not using 24p. It's only when letting xbmc change the refresh rate to 24p that the problem occurs. Interestingly enough, I know by consulting my xbmc logs that my TV is capable of both true 24Hz and the 23.936Hz variant (which of course my TV will say are both 24Hz when switching so it's hard to tell which is being used) I wonder if this is where the issue is occurring.

I tried SDMC2011's advice of enabling the anti-tearing option in the AMD CCC (which is just forcing vsync in the driver) and the result is the same; the rubber band judder effect at 24p.

Maybe forcing 60Hz is a reasonable compromise in the meantime...I will experiment.


- javum - 2011-06-21

Robotica Wrote:...
No GPU deinterlacing support but CPU can handle it. Needs work on libva to have this for GPU.
Is there any way to turn CPU deinterlacing on for VAAPI-accelerated videos? I'm using the latest xbmc-pvr git.

And another question about showing CPU temp in XBMC.
The output in console:
Code:
[xbmc@xbmc-pc ~]$ sensors | grep temp1 | awk '{print $2 }'
+50.5°C
I created file /home/xbmc/.xbmc/userdata/advancedsettings.xml
Code:
<advancedsettings>
<cputempcommand>sensors | grep temp1 | awk '{print $2 }'</cputempcommand>
</advancedsettings>
But have "?" in XBMC
Image
I also tried
Code:
<cputempcommand>echo "sensors | grep temp1 | awk '{print $2 }'"</cputempcommand>
But without success.


- Rapoza - 2011-06-21

javum Wrote:I created file /home/xbmc/.xbmc/userdata/advancedsettings.xml
Code:
<advancedsettings>
<cputempcommand>sensors | grep temp1 | awk '{print $2 }'</cputempcommand>
</advancedsettings>
But have "?" in XBMC
Image
I also tried
Code:
<cputempcommand>echo "sensors | grep temp1 | awk '{print $2 }'"</cputempcommand>
But without success.

To quote the "unofficial" xbmc instructions:
Quote:#To let XBMC detect your CPU temps provided by lm-sensors, you have to edit your advancedsettings.xml and insert the following:
<advancedsettings>
<cputempcommand>sensors|sed -ne "s/Core 1: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
</advancedsettings>