[Linux] Radeon OSS with vdpau (howto) - 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] Radeon OSS with vdpau (howto) (/showthread.php?tid=174854)
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
Radeon OSS with vdpau (howto) - fritsch - 2013-10-03 10:52
In order to successfully use xbmc with radeon oss and vdpau. You need a GLInterop Mesa (v10.0+) and Gotham Alpha >= 10
Warning: This Howto assumes you know how to use ssh and howto create a file on a linux system. Furthermore you need to know what sudo is - if one is unknown to you - this is not the howto you want to follow
After AMD proprietary department did not care for XvBA for more than 2 years now and no AMD driver since 12.10 was really usable, we got into contact with the AMD OSS devs. Within just 2 weeks, we got more working than we ever hoped with the oss radeon vdpau in comparison to fglrx binary blob xvba implementation. As it now made a whole lot of fun working with AMD hardware, we have dropped XvBA completely (it is parked in fernetmentas xvba branch).
What you get
- Bitstream Audio (including DTS-HD, TrueHD, LPCM 7.1)
- max resolution: 2048 x 1152
- mpeg2, mpeg4, h264, vc1 advanced accleration
- Bob and Temporal deinterlacing via vdpau
- The same speed as with the fglrx implementation (currently awaiting rebuild - should be in 10.0.3 + patch)
Known issues for now
- If xbmc is hanging on exit, disable the service version check addon from within xbmc.
-1.) Hardware Requirements / Software Requirements
UVD 2.2 or higher See here: http://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_enabled_GPUs
Ubuntu Saucy mini iso installed x64.
You can download the mini.iso here: http://archive.ubuntu.com/ubuntu/dists/saucy/main/installer-amd64/current/images/netboot/mini.iso
0.) Basic Installation and script tuning
After the mini iso is installed, continue with the following steps:
Allow every user (everyone) to start X11
Create the xbmc user and it add it the relevant groups. If you have created the xbmc user during installation only do the usermod part.
To use the following upstart procedure you need to create /etc/init/xbmc.conf to start xbmc via upstart. That scripts does only wait for your HDMI device, if you want to wait for networking, you have to add that.
edit /etc/security/limits.conf and add before the end. remember xbmc is the username, not the application. This will allow your user to get the audio thread a bit more priority.
Last thing is missing some permissions to shutdown, suspend the computer, therefore create the file /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla with the following content (don't introduce line breaks, especially the Action= line must be exactly one line (especially no linebreaks or auto ".." in freedesktop.udisks.*), verify this):
1.) Installation of the wsnipex repository which includes all relevant mesa patches in a stable version. Don't use oibaf ppa - it will produce black screens only
If you get errors when installing (e.g. wayland problem). You have to run sudo dpkg -i --force-all for all the problematic packages in /var/lib followed by sudo apt-get -f install ( see, e.g. here: http://forum.xbmc.org/showthread.php?tid=174854&pid=1520014#pid1520014 )
2.) Installation of the repository and the new packages
3.) Update your kernel to a version >= 3.13 stable
Remember to wget all three files
Edit /etc/default/grub so that GRUB_CMDLINE_LINUX_DEFAULT reads like, if you find "nomodeset" in that line or vga=normal, remove those.
If you get reproducable freezes, when you plugin a monitor after adding the above options, remove radeon.audio=1 again.
Reboot of the system
We are done now with installing. We will reboot now, remember to make the following settings within xbmc in step 4. It could also be good to disable the RSS Reader to save some processing power.
4.) XBMC settings
(Set xbmc to Advanced or Expert before doing this - settings hierarchies, see in the middle of confluence)
Vertical blank sync: Let Driver choose
Prefer VDPAU Mixer: ON
System -> Video -> Playback:
Adjust Refreshrate to match video: On
Sync Playback to Display: On
Sync Method: Video Clock (Drop/Dupe)
advancedsettings.xml in /home/xbmc/.xbmc/userdata/advancedsettings.xml should contain (don't create that file / directory as root - use the xbmc user):
We need full debug logs that show the issue. We don't look at cut out logfiles, as most of the time, the important part is missing. Additionally get us the output of dmesg, Xorg.0.log and vdpauinfo. Don't post the logs inline, don't use google drive or something, just post links to known pastebins. Set xbmc into debugging mode, redo what is causing errors and afterwards do:
glxinfo | grep -i interop should display something like:
Quote:GL_NV_packed_depth_stencil, GL_NV_texture_barrier, GL_NV_vdpau_interop
If you have bad luck, you got an AMD card that does mpeg-2 decoding in shaders, which segfaults when done multithreaded. Switch Confluence to Expert and disable Mpeg-2 under Video Acceleration.
Relevant output from qvdpauinfo:
Audio trouble shooting
Check if you audio device is muted
You can use alsamixer -c0 or alsamixer -c1 to do it manually, or use something like:
This howto does not install pulseaudio out of a very good reason. We don't support it in xbmc, yet.
If DTS-HD / TrueHD does not work or your kernel complains about broken edid, consider the following:
Download: https://dl.dropboxusercontent.com/u/55728161/marantz.bin and save it to /lib/firmware/edid
You have to create the /lib/firmware/edid directory. Make 100% sure, the file has exact 256 Byte after download, if not redownload it.
afterwards edit /etc/default/grub:
Bitstream audio still not working
Some receivers deny Bitstream Audio for everything not 60hz. In that case disable Adjust Refreshrate to match Video and also set the Sync Playback to Display to Audio Clock.
Out of historical reasons, you can join #xbmc-xvba for discussing this howto. The channel name shall make us remember forever, that best hardware is worth nothing, if there are no drivers for it :-)
RE: Radeon OSS with vdpau (howto) - fritsch - 2013-10-03 10:54
2013/10/05: Updated kernel to 3.11.4
2013/10/14: wsnipex has built a fixed mesa version with all relevant patches in a special mesa ppa. Use this one, if you want an always working version. You can still run oibaf, where this version (+ the compile fix) was copied from.
2013/10/19: Changed howto to use 3.12-rc5 it includes the bitstream audio patch and the pll clock change, as well as lipsync preparation. (2.1)
2013/10/19: I picked a patch, which enables Audio by default, when radeon.audio=1 is passed to the command line, details see above thread (2.2)
2013/10/19: Updated to kernel 3.12-rc6 with the usual patches.
2013/10/20: Added the hpet timer to the grub/default config - let's see who investigates a difference ;-)
2013/10/21: Uploaded 3.12-rc6 0.2 kernel. The faulty PLL clock patch on machines > E450 has been reverted.
2013/10/22: Missed some groups in the original howto (dip, dialout) sudo adduser xbmc dip && sudo adduser xbmc dialout && sudo reboot can fix that
2013/10/22: Audio Clock finally working (Kernel 3.12-rc6 0.3) - see above.
2013/10/24: Added some audio trouble shooting (unmute + bitstream audio known workarounds)
2013/10/27: Updated to 3.12-rc6+ which contains a lot of the other patches. Added one clock multiplier patch for Evergreen to use the same values as fglrx.
2013/10/28: Update to 3.12-rc7+ and changed howto to disable Adjust Refresh Rate to match video - it seems 23.976 mode causes drops with passthrough audio.
2013/11/04: Update to 3.12.0 final - all patches can be found on my github (howto branch of linux)
2013/11/05: Howto now uses Ubuntu Saucy 64 bit as installation medium. Thanks for wsnipex for providing updated mesa packages with the advanced deinterlacing packages.
2013/11/05: 24p and 24.0 hz is working fine again, therefore they can be enabled again
2013/11/06: There is now a howto for OpenSuse: http://forum.xbmc.org/showthread.php?tid=174854&pid=1546145#pid1546145 (thx to Tomtomme).
2013/11/08: Thanks to Grigori (zgreg) we als have temporal deinterlacing included. This was fixed for HD7xxx+ in version v8
2013/11/11: If your Saucy installation hangs without keyboard input possible, use this workaround: http://forum.xbmc.org/showthread.php?tid=174854&pid=1547981#pid1547981 (thanks to gWr71Tv)
2013/11/18: Updated 3.12 kernel with dropping a fractional div patch. It did not help us. Now all patches are in 3.13.
2013/11/26: Updated advancedsettings.xml to actually read CPU and GPU temperature, thx to Strangenoises.
2013/11/27: It could very well be, that your specific model needs other advancedsettings, e.g. here: http://pastebin.com/9TbQ0nZb or here: http://forum.xbmc.org/showthread.php?tid=174854&pid=1563088#pid1563088 (thx to Redeemer and menthos)
2013/12/15: Updated the upstart script to honor nice level, so that we really get what we want. upstart does not read the /etc/security/limits.conf things: limit nice 21 21
2013/12/19: Finally Artifacts on Richland are fixed. Nice christmas present from the AMD guys - it does for sure not hurt, to ask them, if there is a amazon wishlist or something. Though they are being paied by AMD, they are investing a whole lot of their free time to help us, are directly available in their irc channel and so on. Was a good year for AMD and their OSS support. Patches can be found in my drm-fixes-3.13 branch on github.com/fritsch
2013/12/30: I changed the upstart script to start /usr/bin/xbmc --standalone directly. Many users were confused and not able to also create a startxbmc.sh in the correct location.
2013/12/30: Updated howto to use 3.13-rc6 kernel from ubuntu mainline - all patches are now upstream.
2014/01/05: Updated howto to use 3.13-rc7. We now also have all the Radeon SI performance patches in mainline.
2014/01/10: Removed all patches as they are all upstream now and included in the mainline builds.
2014/01/12: Updated Kernel to 3.13-rc8
2014/01/20: We are stable now. Kernel was updated to 3.13 final.
2014/01/26: Removed the hpet - did not do anything.
2014/01/30: Updated to kernel 3.13.1
2014/02/07: Updated to kernel 3.13.2
2014/02/14: Updated to kernel 3.13.3
2014/02/22: Updated to kernel 3.13.4
2014/02/24: Updated to kernel 3.13.5 this adds two important fixes for HD 7xxx and Kabini
2014/03/01: Changed the settings descriptions as settings.xml was changed upstream. New Video Settings: Acceleration
RE: Radeon OSS with vdpau (howto) - laric - 2013-10-03 10:59
Finally we can get HD sound in linux...
Installed and working now.
AMD A6-3500 APU with Radeon HD Graphics
VDPAU API version : 1
VDPAU implementation : G3DVL VDPAU Driver Shared Library version 1.0
FATAL: get_bits failed : No backend implementation could be loaded.!!
MPEG DECODING (1920x1080): 75 frames/s
MPEG DECODING (1280x720): 113 frames/s
H264 DECODING (1920x1080): 47 frames/s
H264 DECODING (1280x720): 86 frames/s
VC1 DECODING (1440x1080): 101 frames/s
MPEG4 DECODING (1920x1080): 66 frames/s
MIXER WEAVE (1920x1080): 625 frames/s
MIXER BOB (1920x1080): 1023 fields/s
MIXER TEMPORAL (1920x1080): 1087 fields/s
MIXER TEMPORAL + IVTC (1920x1080): 1087 fields/s
MIXER TEMPORAL + SKIP_CHROMA (1920x1080): 1088 fields/s
MIXER TEMPORAL_SPATIAL (1920x1080): 1087 fields/s
MIXER TEMPORAL_SPATIAL + IVTC (1920x1080): 1087 fields/s
MIXER TEMPORAL_SPATIAL + SKIP_CHROMA (1920x1080): 1088 fields/s
MIXER TEMPORAL_SPATIAL (720x576 video to 1920x1080 display): 1162 fields/s
MULTITHREADED MPEG DECODING (1920x1080): 70 frames/s
MULTITHREADED MIXER TEMPORAL (1920x1080): 1118 fields/s
RE: Radeon OSS with vdpau (howto) - Claudio.Sjo - 2013-10-03 12:59
fritsch, please highlith this thread (and possibly remove the attention from the old one)
RE: Radeon OSS with vdpau (howto) - Orcie - 2013-10-03 15:50
Could you point out what the performance is vs xvba? Is the limitation in fps noticeble? Should people move away from xvba towards a solution with the OSS driver?
RE: Radeon OSS with vdpau (howto) - laric - 2013-10-03 16:33
Performance is fine on my a6-3500 as you see above..
And it supports HD audio so well worth to change into.
RE: Radeon OSS with vdpau (howto) - deadite66 - 2013-10-03 18:01
does this mean oibaf has glinterop in mesa again?
RE: Radeon OSS with vdpau (howto) - locomot1f - 2013-10-03 18:51
i just get a whole lot of tearing...
here's my debug log -- http://pastebin.com/EBqDiDZ5
i tried the generic Mesa drivers. better.. no tearing, but not a very image.
am I missing something? or is my Radeon GPU not supported yet? HD 6000 series
since i don't have any other X sessions, i can't run the other commands to get the info. is there another way through ssh terminal to get what you need?
FYI: videos play fine.. great quality. just the XBMC interface... just lots of tearing.
RE: Radeon OSS with vdpau (howto) - BenvanDamme - 2013-10-03 19:36
Do you have any knowledge on how to use this on arch linux ?
RE: Radeon OSS with vdpau (howto) - fritsch - 2013-10-03 20:22
@locomot1f: Please provide all the logfiles that are mentioned above. Turn on debug logging before
@BenvanDamme: It is not difficult. Use your standard arch way of installing packages and just add the relevant patches to your aur build source.
RE: Radeon OSS with vdpau (howto) - locomot1f - 2013-10-03 20:31
@BenvanDamme -- http://forum.xbmc.org/showthread.php?tid=116996&pid=1518647#pid1518647
RE: Radeon OSS with vdpau (howto) - goldbär - 2013-10-03 20:38
I get some errors after the dist-upgrade
That's what I did:
Then I got these unresolved dependencies
Then I tried with
What can I do to solve the problem?
RE: Radeon OSS with vdpau (howto) - fritsch - 2013-10-03 20:39
Following command is a one liner:
PS: That error was expected.
RE: Radeon OSS with vdpau (howto) - BenvanDamme - 2013-10-03 20:44
Thank you for your help
RE: Radeon OSS with vdpau (howto) - goldbär - 2013-10-03 20:49
Thank you very much for your fast reply.
That fixed it.