Linux - Radeon OSS with vdpau (howto)

  Thread Rating:
  • 19 Votes - 4.79 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jkl555 Offline
Junior Member
Posts: 6
Joined: Jan 2014
Reputation: 0
Post: #2581
(2014-04-21 08:53)fritsch Wrote:  @binaryjay: HD5450 has no UVD for decoding mpeg-2 it's done via shaders. Those are not multi threading safe. That bug is already filed at freedesktop. So keep it disabled.
@Endevaour79: Are you sure, that you have pm-utils and consolekit and udisks and upower installed?
@jkl555: Update your /etc/init/xbmc.conf file to match this trusty howto, which will disable backing store.

Thanks a lot. It fixes the problem.
find quote
quan3t Offline
Junior Member
Posts: 15
Joined: Dec 2011
Reputation: 0
Post: #2582
(2014-04-20 23:04)fritsch Wrote:  yes

it disables kms (kernel mode setting) which all oss drivers need: nomodeset
It additionally overwrite the framebuffer which is radeon kms to a vesafb: ideo=uvesafb:mode_option=1366x768-24,mtrr=3,scroll=ywrap

So, yeah - you shot it dead through the kernel.

Reinstall fresh Trusty and still unable to launch xbmc. Any idea what happened here?
Quote:root@MediaPlayer:/home/xbmc# xbmc
Error: unable to open display
XBMC needs hardware accelerated OpenGL rendering.
Install an appropriate graphics driver.

Please consult XBMC Wiki for supported hardware
http://wiki.xbmc.org/?title=Supported_hardware
root@MediaPlayer:/home/xbmc# dmesg | pastebinit
http://paste.ubuntu.com/7300766/

root@MediaPlayer:/home/xbmc# cat ~/.xbmc/temp/xbmc.log | pastebinit
cat: /root/.xbmc/temp/xbmc.log: No such file or directory
You are trying to send an empty document, exiting.

root@MediaPlayer:/home/xbmc# cat /var/log/Xorg.0.log | pastebinit
cat: /var/log/Xorg.0.log: No such file or directory
You are trying to send an empty document, exiting.

root@MediaPlayer:/home/xbmc# DISPLAY=:0 vdpauinfo | pastebinit
vdpauinfo: cannot connect to X server :0
You are trying to send an empty document, exiting.

root@MediaPlayer:/home/xbmc# dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/7300772/
find quote
fritsch Online
Team-XBMC Developer
Posts: 4,374
Joined: Aug 2011
Reputation: 109
Location: Karlsruhe
Post: #2583
all done as root user which the howto does not say at all ... could you please just stick to the howto? Also see the conflicting framebuffer in dmesg ...

http://www.openelec.tv here are some nice out of the box versions and probably deliver a more easy installation for you.
find quote
mr_raider Offline
Member
Posts: 98
Joined: Dec 2008
Reputation: 0
Post: #2584
(2014-04-21 14:53)fritsch Wrote:  As fglrx never accelerated mpeg-2 you can easily use the OSS drivers and (if it's not working disable mpeg-2 there too).

So I tried it out with various OTA recorded streams. Some streams decode fine with the vdpau decoder, while others crash hard. I mean hard as in I have to power cycle the computer to recover. My guess is that it has something to do with 1080i, vs 720p or whatever. Disabling all mpeg2 acceleration fixes it. I thought the Pitcairn GPUs supported UVD 3 and mpeg2 hardware decode?

So I guess I'm left with mpeg4 and vc-1 acceleration. Are these not available with VAAPI and fglrx?
find quote
fritsch Online
Team-XBMC Developer
Posts: 4,374
Joined: Aug 2011
Reputation: 109
Location: Karlsruhe
Post: #2585
fglrx and solution in one sentence is funny and also the xvba-va-driver in it is more funny.

Logfile please.
find quote
mr_raider Offline
Member
Posts: 98
Joined: Dec 2008
Reputation: 0
Post: #2586
(2014-04-21 19:35)fritsch Wrote:  fglrx and solution in one sentence is funny and also the xvba-va-driver in it is more funny.

I've had my share of pain with AMD drivers. That's why I still dual boot windows for gaming.

mr_raider@HK47:~$ dmesg | pastebinit
http://paste.ubuntu.com/7301049/
mr_raider@HK47:~$ cat ~/.xbmc/temp/xbmc.log | pastebinit
http://paste.ubuntu.com/7301056/
mr_raider@HK47:~$ cat /var/log/Xorg.0.log | pastebinit
http://paste.ubuntu.com/7301058/
mr_raider@HK47:~$ DISPLAY=:0 vdpauinfo | pastebinit
http://paste.ubuntu.com/7301061/
mr_raider@HK47:~$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/7301063/


Hardware:

AMD Fx-8350
AMD HD7870
Asus M5a97 EVO, on-board sound (not using the GPU sound)

Software:
Kubuntu 14.04 fresh install
XBMC Gotham from unstable repo
find quote
fritsch Online
Team-XBMC Developer
Posts: 4,374
Joined: Aug 2011
Reputation: 109
Location: Karlsruhe
Post: #2587
Your 720p file was also mpeg-2, if you disable that codec, then you should be fine for the rest. As you are running pulseaudio and probably miss passthrough options, consult the wiki here: http://wiki.xbmc.org/index.php?title=PulseAudio
find quote
mr_raider Offline
Member
Posts: 98
Joined: Dec 2008
Reputation: 0
Post: #2588
(2014-04-21 20:38)fritsch Wrote:  Your 720p file was also mpeg-2, if you disable that codec, then you should be fine for the rest. As you are running pulseaudio and probably miss passthrough options, consult the wiki here: http://wiki.xbmc.org/index.php?title=PulseAudio

Thanks. This is desktop two speaker PC.
find quote
mr_raider Offline
Member
Posts: 98
Joined: Dec 2008
Reputation: 0
Post: #2589
So here are the results of my testing:

1. With fglrx and VAAPI enabled:
No acceleration for mpeg2. I get acceleration for h264 and Vc-1. Other mpeg4s don't seem to accelerate. CPU useage on non accelerated stuff is minimal (under 10%).

2. With OSS driver, updated mesa from wsnipex repo, and vdpau enabled:
I need to disable mpeg2 to acceleration. H264 and VC1 seem to accelerate using vdpau. MPEG4 is hit and miss. It seems to accelerate fine, but some of my downloaded Stargate episodes play worse than unaccelerated on fglrx. Furthermore, the desktop effects are laggy with the OSS.

Considering the minimal CPU overhead on unaccelerated video, and the fact that in either case, most of my content is unaccelerated (mpeg2), I may as well stick with fglrx for stability for new.

The moral of the story is that you need to individually assess your hardware and your useage scenarios. My guess is that the RAdeon SI driver for the new GCN cards is not fully mature yet. Having an 8 core CPU means accelerating video on the GPU is not a big issues, since I can live with the overhead. If you have a low end CPU it might be more improtant to get GPU acceleration to work. My guess is that works better on VLIW4 and VLIW5 cards.

I have an older Llano APU running Quantal which needs to be upgraded. I'll give the OSS driver a try there and see what comes up. In the meantime I will follow this thread with interest. You guys are doing fantastic work. If anyone with a GCN card (radeon 7700 and up), I would be curious to read their experiences.
find quote
Claudio.Sjo Online
Senior Member
Posts: 120
Joined: May 2013
Reputation: 0
Post: #2590
(2014-04-22 16:27)mr_raider Wrote:  So here are the results of my testing:

1. With fglrx and VAAPI enabled:
No acceleration for mpeg2. I get acceleration for h264 and Vc-1. Other mpeg4s don't seem to accelerate. CPU useage on non accelerated stuff is minimal (under 10%).

2. With OSS driver, updated mesa from wsnipex repo, and vdpau enabled:
I need to disable mpeg2 to acceleration. H264 and VC1 seem to accelerate using vdpau. MPEG4 is hit and miss. It seems to accelerate fine, but some of my downloaded Stargate episodes play worse than unaccelerated on fglrx. Furthermore, the desktop effects are laggy with the OSS.

Considering the minimal CPU overhead on unaccelerated video, and the fact that in either case, most of my content is unaccelerated (mpeg2), I may as well stick with fglrx for stability for new.

The moral of the story is that you need to individually assess your hardware and your useage scenarios. My guess is that the RAdeon SI driver for the new GCN cards is not fully mature yet. Having an 8 core CPU means accelerating video on the GPU is not a big issues, since I can live with the overhead. If you have a low end CPU it might be more improtant to get GPU acceleration to work. My guess is that works better on VLIW4 and VLIW5 cards.

I have an older Llano APU running Quantal which needs to be upgraded. I'll give the OSS driver a try there and see what comes up. In the meantime I will follow this thread with interest. You guys are doing fantastic work. If anyone with a GCN card (radeon 7700 and up), I would be curious to read their experiences.

I'm interested in your experience, as my HTPC is A10-5700 currently on 12.04 + fglrx (hacked version from Frisch) and Frodo VAAPI from the thread in this forum.
I understand that you tested Gotham, did you try XBMC 14 Alpha?
I'm testing 14.04 + OSS on this iMac and the feeling is better than the fglrx, with all test files.

I was seriously thinking about upgrading the HTPC, but this must be a one-bullet operation, as if it doesn't work I'll get a revolution at home.
find quote
mr_raider Offline
Member
Posts: 98
Joined: Dec 2008
Reputation: 0
Post: #2591
(2014-04-22 20:49)Claudio.Sjo Wrote:  I was seriously thinking about upgrading the HTPC, but this must be a one-bullet operation, as if it doesn't work I'll get a revolution at home.

Whatever acceleration you get currently will still work with fglrx in 14.04. The 5700 is still a fairly fast CPU that can play back most stuff without GPU acceleration. Try dual booting for a some time to see if it works, or put in a spare hard drive for a trial install.

The 5700 uses an older GPu than my 7870, so the OSS driver might work very well. The r600 driver is much more mature:
http://www.phoronix.com/scan.php?page=ar...in81&num=1
(This post was last modified: Yesterday 00:37 by mr_raider.)
find quote
adolchristin Offline
Junior Member
Posts: 19
Joined: Feb 2012
Reputation: 0
Post: #2592
For those of you using arch linux mesa 10.1.1 just hit the stable repos. I can confirm that the crash on stop with vdpau is fixed.

http://bpaste.net/show/227893/
find quote
fritsch Online
Team-XBMC Developer
Posts: 4,374
Joined: Aug 2011
Reputation: 109
Location: Karlsruhe
Post: #2593
Christian thinks, that he has found the Skip issues and tracked it down to the page filipping code.

Here are all patches, that apply on top of a vanilla 3.14.1 kernel: http://sprunge.us/ZRBT
Yeah, you can read what it includes PLL works + swapBuffers magic.

(If you are an OE builder, make sure you remove the three already included PLL fixes)

Ontopic feedback can go here: https://bugs.freedesktop.org/show_bug.cgi?id=76564

I am currently building kernel packages and will upload them later.

Edit:
Code:
wget https://dl.dropboxusercontent.com/u/55728161/linux-image-3.14.1-amdfixes3%2B_1.1_amd64.deb https://dl.dropboxusercontent.com/u/55728161/linux-headers-3.14.1-amdfixes3%2B_1.1_amd64.deb
sudo dpkg -i *amdfixes3*.deb
Edit: Fractional modes seem horribly broken - so - stick on the older kernel.
(This post was last modified: Today 08:14 by fritsch.)
find quote
gfisher Offline
Senior Member
Posts: 193
Joined: Feb 2012
Reputation: 3
Post: #2594
(Yesterday 19:36)fritsch Wrote:  Christian thinks, that he has found the Skip issues and tracked it down to the page filipping code.

Here are all patches, that apply on top of a vanilla 3.14.1 kernel: http://sprunge.us/ZRBT
Yeah, you can read what it includes PLL works + swapBuffers magic.

(If you are an OE builder, make sure you remove the three already included PLL fixes)

Ontopic feedback can go here: https://bugs.freedesktop.org/show_bug.cgi?id=76564

I am currently building kernel packages and will upload them later.

Edit:
Code:
wget https://dl.dropboxusercontent.com/u/55728161/linux-image-3.14.1-amdfixes3%2B_1.1_amd64.deb https://dl.dropboxusercontent.com/u/55728161/linux-headers-3.14.1-amdfixes3%2B_1.1_amd64.deb
sudo dpkg -i *amdfixes3*.deb

thank you.
I ltried it out but I have major lag now >> on 24p getting about 18fps. a4 3400 was stable on fixes 02. never had ~18fps before.
xbmc.log:
http://pastebin.com/4witektX
Edit:
Went back to 3.14.1 fixes2 and it plays 24p perfectly. Lmk if you need more.
(This post was last modified: Today 05:57 by gfisher.)
find quote
fritsch Online
Team-XBMC Developer
Posts: 4,374
Joined: Aug 2011
Reputation: 109
Location: Karlsruhe
Post: #2595
-> bugs.freedesktop.org
find quote
Post Reply