2013-10-03, 10:52
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
Introduction
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
- 110% speed as with the fglrx implementation
Known issues for now
- On older radeon systems with UVD2 no hw decoder for mpeg-2 exists and shaders are used. Those segfault when run mutlithreaded. You can disable mpeg-2 codec via th expert settings menu Acceleration. Fusion and above is not affected by this issue.
-1.) Hardware Requirements / Software Requirements
UVD 2.2 or higher See here: http://en.wikipedia.org/wiki/Unified_Vid...abled_GPUs
Ubuntu Trusty mini or server iso installed x64.
You can download the mini.iso here: http://archive.ubuntu.com/ubuntu/dists/t...t/mini.iso
UEFI: If you need an UEFI installation, please use the server iso instead, but make sure you boot the Computer in UEFI mode, you can download the server iso from here: http://cdimage.ubuntu.com/ubuntu-server/...-amd64.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 kodi user and it add it the relevant groups. If you have created the kodi user during installation only do the usermod part.
To use the following upstart procedure you need to create /etc/init/kodi.conf to start kodi via upstart. That scripts does only wait for your HDMI device, if you want to wait for networking, you have to add that. If you have installed kodi, make sure you read the comments, then comment the /usr/bin/kodi line and uncomment the /usr/bin/kodi line instead.
edit /etc/security/limits.conf and add before the end. remember kodi 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):
1a) Installation Kodi 14.0 via the official ppa
Reboot of the system
We are done now with installing. We will reboot now, remember to make the following settings within kodi in step 2. It could also be good to disable the RSS Reader to save some processing power.
2.) KODI settings
(Set kodi to Advanced or Expert before doing this - settings hierarchies, see in the middle of confluence)
System->Settings->System->Video output
Vertical blank sync: Let Driver choose
System ->Video->Acceleration:
VDPAU: On
Prefer VDPAU Mixer: ON
VAAPI: off
System -> Video -> Playback:
Adjust Refreshrate to match video: On
Sync Playback to Display: On
Sync Method: Video Clock (Resample Audio) -> This will automatically use Drop / Dupe for passthrough, so best out of both worlds.
advancedsettings.xml in /home/kodi/.kodi/userdata/advancedsettings.xml should contain (don't create that file / directory as root - use the kodi user):
Fancy Splash? (Made by forum user teeedubb)
Make sure to install all upgrade after you have followed this process. Therefore run:
Final reboot and we are done:
Installation is now finished - you can start to enjoy your kodi installation
In case something should not work as you expected it, please follow the Troubleshooting steps.
Troubleshooting:
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 kodi into debugging mode, redo what is causing errors and afterwards do:
Mpeg-2 Crashes
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:
If DTS-HD / TrueHD does not work or your kernel complains about broken edid, consider the following:
Download: https://dl.dropboxusercontent.com/u/5572...arantz.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:
This will overwrite EDID and ELD info.
Other EDID workarounds: http://forum.kodi.tv/showthread.php?tid=...pid1685301
Bitstream audio still not working
Some receivers deny Bitstream Audio for everything not 60hz. In that case it makes no sense to use bitstream audio at all, just disable it.
IRC Channel
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 :-)
Happy penguin:
Introduction
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
- 110% speed as with the fglrx implementation
Known issues for now
- On older radeon systems with UVD2 no hw decoder for mpeg-2 exists and shaders are used. Those segfault when run mutlithreaded. You can disable mpeg-2 codec via th expert settings menu Acceleration. Fusion and above is not affected by this issue.
-1.) Hardware Requirements / Software Requirements
UVD 2.2 or higher See here: http://en.wikipedia.org/wiki/Unified_Vid...abled_GPUs
Ubuntu Trusty mini or server iso installed x64.
You can download the mini.iso here: http://archive.ubuntu.com/ubuntu/dists/t...t/mini.iso
UEFI: If you need an UEFI installation, please use the server iso instead, but make sure you boot the Computer in UEFI mode, you can download the server iso from here: http://cdimage.ubuntu.com/ubuntu-server/...-amd64.iso
0.) Basic Installation and script tuning
After the mini iso is installed, continue with the following steps:
Code:
sudo apt-get update
sudo apt-get install ssh python-software-properties software-properties-common udisks upower xorg alsa-utils mesa-utils git-core librtmp0 lirc libmad0 lm-sensors libmpeg2-4 avahi-daemon libnfs1 consolekit pm-utils vdpauinfo linux-firmware mesa-vdpau-drivers
sudo apt-get dist-upgrade
Allow every user (everyone) to start X11
Code:
sudo dpkg-reconfigure x11-common
Create the kodi user and it add it the relevant groups. If you have created the kodi user during installation only do the usermod part.
Code:
sudo adduser kodi
sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip kodi
To use the following upstart procedure you need to create /etc/init/kodi.conf to start kodi via upstart. That scripts does only wait for your HDMI device, if you want to wait for networking, you have to add that. If you have installed kodi, make sure you read the comments, then comment the /usr/bin/kodi line and uncomment the /usr/bin/kodi line instead.
Code:
# kodi-upstart
# starts KODI on startup by using xinit.
# by default runs as kodi, to change edit below.
env USER=kodi
description "KODI-barebones-upstart-script"
author "Matt Filetto"
# if you use mysql you need to wait for your network device
# that means you should add 'and net-device-up IFACE!=lo' behind the udevtrigger
start on (filesystem and stopped udevtrigger)
stop on runlevel [016]
# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21
script
# default 14.0 Helix version
exec su -c "xinit /usr/bin/kodi --standalone -- /usr/bin/X -bs -nolisten tcp :0" $USER
# the following entry is to get an idea, if you want to user a window manager
# make sure to comment the above kodi entry if you uncomment, it's either or!
# exec su -c "xinit /usr/bin/startfluxbox -- /usr/bin/X -bs -nolisten tcp :0" $USER
end script
edit /etc/security/limits.conf and add before the end. remember kodi is the username, not the application. This will allow your user to get the audio thread a bit more priority.
Code:
kodi - nice -1
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):
Code:
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*;org.freedesktop.login1.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
[Untrusted Upgrade]
Identity=unix-user:kodi
Action=org.debian.apt.upgrade-packages;org.debian.apt.update-cache
ResultAny=yes
ResultInactive=yes
ResultActive=yes
1a) Installation Kodi 14.0 via the official ppa
Code:
sudo apt-add-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi kodi-bin
Reboot of the system
We are done now with installing. We will reboot now, remember to make the following settings within kodi in step 2. It could also be good to disable the RSS Reader to save some processing power.
Code:
sudo reboot
2.) KODI settings
(Set kodi to Advanced or Expert before doing this - settings hierarchies, see in the middle of confluence)
System->Settings->System->Video output
Vertical blank sync: Let Driver choose
System ->Video->Acceleration:
VDPAU: On
Prefer VDPAU Mixer: ON
VAAPI: off
System -> Video -> Playback:
Adjust Refreshrate to match video: On
Sync Playback to Display: On
Sync Method: Video Clock (Resample Audio) -> This will automatically use Drop / Dupe for passthrough, so best out of both worlds.
advancedsettings.xml in /home/kodi/.kodi/userdata/advancedsettings.xml should contain (don't create that file / directory as root - use the kodi user):
Code:
<advancedsettings>
<loglevel hide="false">0</loglevel>
<samba>
<clienttimeout>30</clienttimeout>
</samba>
<useddsfanart>true</useddsfanart> <!-- Do not use on Apple TV2/iOS/RPi/many Android systems -->
<cputempcommand>sensors|sed -ne "s/Core 0: \+[-+]\([0-9]\+\).*/\1 C/p"</cputempcommand>
<gputempcommand>sensors|sed -ne "s/temp1: \+[-+]\([0-9]\+\).*/\1 C/p"</gputempcommand>
<gui>
<algorithmdirtyregions>3</algorithmdirtyregions>
<nofliptimeout>0</nofliptimeout>
</gui>
<video>
<latency>
<delay>0</delay>
<refresh>
<min>23</min>
<max>24</max>
<delay>175</delay> <!-- set to zero or adjust if audio seems out of sync with 24p movies -->
</refresh>
</latency>
</video>
</advancedsettings>
Fancy Splash? (Made by forum user teeedubb)
Code:
sudo apt-get update
sudo apt-get install plymouth-label v86d
wget https://dl.dropboxusercontent.com/u/55728161/plymouth-theme-kodi-logo.deb
sudo dpkg -i plymouth-theme-kodi-logo.deb
Make sure to install all upgrade after you have followed this process. Therefore run:
Code:
sudo apt-get update
sudo apt-get dist-upgrade
Final reboot and we are done:
Code:
sudo reboot
Installation is now finished - you can start to enjoy your kodi installation
In case something should not work as you expected it, please follow the Troubleshooting steps.
Troubleshooting:
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 kodi into debugging mode, redo what is causing errors and afterwards do:
Code:
sudo apt-get install pastebinit
dmesg | pastebinit
cat ~/.kodi/temp/kodi.log | pastebinit
cat /var/log/Xorg.0.log | pastebinit
DISPLAY=:0 vdpauinfo | pastebinit
dpkg -l |grep mesa | pastebinit
Mpeg-2 Crashes
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:
Quote:qvdpautest 0.5.2
AMD E-350 Processor
Unknown GPU
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): 59 frames/s
MPEG DECODING (1280x720): 92 frames/s
H264 DECODING (1920x1080): 38 frames/s
H264 DECODING (1280x720): 70 frames/s
VC1 DECODING (1440x1080): 85 frames/s
MPEG4 DECODING (1920x1080): 54 frames/s
MIXER WEAVE (1920x1080): 275 frames/s
MIXER BOB (1920x1080): 439 fields/s
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:
Code:
amixer set 'IEC958',0 unmute
If DTS-HD / TrueHD does not work or your kernel complains about broken edid, consider the following:
Download: https://dl.dropboxusercontent.com/u/5572...arantz.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:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=HDMI-A-1:edid/marantz.bin radeon.audio=1 radeon.dpm=1 quiet splash"
Other EDID workarounds: http://forum.kodi.tv/showthread.php?tid=...pid1685301
Bitstream audio still not working
Some receivers deny Bitstream Audio for everything not 60hz. In that case it makes no sense to use bitstream audio at all, just disable it.
IRC Channel
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 :-)
Happy penguin: