Kodi Community Forum
Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server - 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: Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server (/showthread.php?tid=231955)



RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - redstorm - 2016-12-15

(2015-11-01, 18:35)fritsch Wrote: Kernel 4.4+ is required or audio EDID information won't be copied
As I needed edid overwriting myself today here is a short howto on how to boot completely without TV / AVR but having correct EDID information. This will work for intel and radeon:

# Find out the connected port
Code:
fritsch@bsw:~$ cat /sys/class/drm/card0-HDMI-A-1/status
connected
Could be HDMI-A-2 on your setup and so on. On my system it is HDMI-A-1 - you need to remove the card0- when working with this strange later on. If yours differs you need to alter all HDMI-A-1 in the following steps to your matching ones.

In my case it's HDMI-A-1 continue to change /etc/default/grub to look like:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=HDMI-A-1:1920x1080@50D drm_kms_helper.edid_firmware=HDMI-A-1:edid/edid.bin"

This will do two things a) it sets my default resolution to 1920x1080@50 and activate the digital output with D - which is not a typo, but written correctly directly behind the @50 which is my target refreshrate as I use LiveTV most of the time. Second is for loading a firmware to overwrite the edid that we will capture now

Before doing this make sure that you booted the whole system with AVR / TV on correctly and everything is working as you want it as we need to copy the edid in a working environment
Code:
sudo mkdir -p /lib/firmware/edid
sudo cp /sys/class/drm/card0-HDMI-A-1/edid /lib/firmware/edid/edid.bin

Now we need to make a little hack and also convince ubuntu to load this edid.bin in initramfs. Create /etc/initramfs-tools/hooks/include-edid-data file and write into it:
Code:
#!/bin/sh

PREREQ="udev"
prereqs()
{
   echo "$PREREQ"
}

case $1 in
prereqs)
   prereqs
   exit 0
   ;;
esac

. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line

if [ ! -e "${DESTDIR}/lib/firmware/edid" ]; then
    mkdir -p "${DESTDIR}/lib/firmware/edid"
fi

if [ -r "/lib/firmware/edid/edid.bin" ]; then
   cp "/lib/firmware/edid/edid.bin" "${DESTDIR}/lib/firmware/edid/"
fi

manual_add_modules i915 radeon
exit 0

Now make it executable:
Code:
sudo chmod +x /etc/initramfs-tools/hooks/include-edid-data

We are nearly done, finish with
Code:
sudo update-initramfs -u
sudo update-grub
sudo reboot

Now enjoy.

For OpenELEC you need to follow: http://wiki.openelec.tv/index.php/Configuring_a_Custom_xorg.conf#tab=Intel instead


hmm upgraded to 16.04.1 from 14.04 and my kern.log is reporting the EDID helper firmware fails to load, other logs look ok, is this a red herring?

Code:
[drm:drm_load_edid_firmware [drm_kms_helper]] *ERROR* Requesting EDID firmware "edid/edid.bin" failed (err=-2)

kern.log
dmesg
Xorg.0.log
kodi.log

After another reboot the error is gone. disregard.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - gurabli - 2016-12-15

(2016-12-14, 19:30)lovemachine Wrote:
(2016-12-14, 07:24)gurabli Wrote: I see that after an update I have Kodi v18 installed. Which ppa shouls I use if I want to stay on v17, and how can I downgrade now to v17 (of course keeping all the VAAPI goodies here, which to my knowledge are already on v17). Thanks

Sent from my Xperia Z3 Compact (typie typie)

See the Linux installation guide on the Download page. Scroll down to the instructions on downgrading. Remove Nightly PPA, add Unstable PPA.

Thanks, as it is most of the time, the obvious solution didn't come to my mind. I added the unstable PPA, and now I'm running Kodi v17 beta6.

Btw, I wonder if the VAAPI EGL implementation still receives some fixes, updates, and these are merged into v17 beta x, or if there are any bug fixes, development going on, it is in v18 now (in the nightly)?


Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - soder - 2016-12-19

Sorry if this question is out of the blue, but I need to confirm something. Before I was on some custom version of OpenElec to get nice playback on my NUC (NUC5CPYH) with 4k material.

Later I switched to LibreElec and I think you said here that all that work that was in the custom build now was in beta versions of LibreElec.

Is that true?

I can play hevc .mkv with clip like the one with the Japanese snowboarder KAZU_(SUBTITLES)_4K23.98p_HEVC_10Mbits.mkv and some sample yvid_SAM_0235-UHD_Sample1.MP4

Also the Bunny works in 30fps and below. On 60 fps it didn't work.

Anyhow, I now tried some Jellyfish samples, and I guess you know of these? In 4k they start with a bitrate of 120 Mbps and my NUC with beta LibreElec stutter.

What kind of videos will my NUC support, and how come the CPU is in use as much? Shouldn't it be decoded with the GPU?

I hope someone can make time to answer my questions.

Thanks.

/Söder


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - gen - 2016-12-25

I tried the latest Milhouse build and while h264 HW decoding now works properly, HEVC refuses to. Going to try this guide next I suppose!


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-12-25

Not related to this thread. No logs no issue.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - alex.ba - 2016-12-25

Hi all,

I just setup a NUC KIT NUC5PPYH (Braswell) according to this guide. After the first boot I wanted to set the correct Display settings I was a bit surprised as all options under settings/systems/Display are greyed out. No chance to change Resolution or refresh rate. Never had that before on any system with that Display. Find all log files and a Screenshot attached.
Display is a 4K LG 55UH625V. I know that a 4K resolution would not work properly so I wanted to change to 1080P which has been done on this display with other Linux systems several times.

Thanks

http://www.bilder-upload.eu/show.php?file=a02461-1482669479.jpg

kodi@kodi:~$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/23682167/

kodi@kodi:~$ DISPLAY=:0 vainfo | pastebinit
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
http://paste.ubuntu.com/23682168/

kodi@kodi:~$ cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/23682169/

kodi@kodi:~$ dmesg | pastebinit
http://paste.ubuntu.com/23682170/

kodi@kodi:~$ id | pastebinit
http://paste.ubuntu.com/23682171/

kodi@kodi:~$ amixer | pastebinit
http://paste.ubuntu.com/23682172/


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Phobos666 - 2016-12-26

@fritsch:
Please consider putting your first post to the kodi wiki page. This is the most complete Installation Guideline for a barebone kodi on linux setup and you may know what to set and how to configure polkit, systemd etc. but not all members know to set (I never used the polkit-settings before)

It's by far better then the Installation instructions in the wiki now because all it says is what to do with apt-get


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-12-26

Wiki is free to edit for everyone. Consider writing it there yourself :-)


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - garyang - 2016-12-28

Is there any way to support HEVC 10bit like Libreelec?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-12-28

Rebuild mesa with a patch fernet send to mesa-dev
Rebuild kernel with a patch linked in the patch above
Use kodi-agile branch of fernet.

And it's not "like LibreELEC" ... it's how LibreELEC got it ... same source.

In short: Yes, it can be done - but a lot of manual work is needed for that until all patches land in mainline mesa / kernel and even kodi.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - garyang - 2016-12-29

@fritsch:
What you mean is
It can not be done by copying some libraries from libreelec?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-12-29

No.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - ursli - 2016-12-29

Hi there, quick question:

Do I need to be concerned if I see

Code:
ERROR: failed to initialize egl

In my logs? I've set up a minimal ubuntu server install according to this tutorial with slight modifications because I use an nvidia ION GPU, installed nvidia-340 and left out the intel drivers, looks like those nvidia drivers ship with their own libegl files, which are also used by the system if I check with ldconfig.

Code:
ldconfig -p | grep libEGL
        libEGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-340/libEGL.so.1
        libEGL.so.1 (libc6) => /usr/lib32/nvidia-340/libEGL.so.1
        libEGL.so (libc6,x86-64) => /usr/lib/nvidia-340/libEGL.so
        libEGL.so (libc6) => /usr/lib32/nvidia-340/libEGL.so

Would a Kodi debug log help? I guess this is more to do with the system side of things?

Specs:
Kodi (17.0-BETA7 Git:2016-12-27-1420882). Platform: Linux x86 64-bit
Kodi compiled Dec 28 2016 by GCC 5.4.0 for Linux x86 64-bit version 4.4.35 (263203)
Running on Ubuntu 16.04.1 LTS, kernel: Linux x86 64-bit version 4.4.0-57-generic
Host CPU: Genuine Intel® CPU U2300 @ 1.20GHz, 2 cores available

edit: I've noticed that the 64bit version of libEGL.so wasn't linked properly, updated the symlink (which was wrong for whatever reason, guess I broke something will testing things), but the error is still the same.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - FernetMenta - 2016-12-29

Don't worry, that NVidia crap does not support EGL binding with OpenGL. That forces us to maintain dying GLX backend.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2016-12-29

(2016-12-29, 14:20)ursli Wrote: Hi there, quick question:

Do I need to be concerned if I see

Code:
ERROR: failed to initialize egl

In my logs? I've set up a minimal ubuntu server install according to this tutorial with slight modifications because I use an nvidia ION GPU, installed nvidia-340 and left out the intel drivers, looks like those nvidia drivers ship with their own libegl files, which are also used by the system if I check with ldconfig.

Code:
ldconfig -p | grep libEGL
        libEGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-340/libEGL.so.1
        libEGL.so.1 (libc6) => /usr/lib32/nvidia-340/libEGL.so.1
        libEGL.so (libc6,x86-64) => /usr/lib/nvidia-340/libEGL.so
        libEGL.so (libc6) => /usr/lib32/nvidia-340/libEGL.so

Would a Kodi debug log help? I guess this is more to do with the system side of things?

Specs:
Kodi (17.0-BETA7 Git:2016-12-27-1420882). Platform: Linux x86 64-bit
Kodi compiled Dec 28 2016 by GCC 5.4.0 for Linux x86 64-bit version 4.4.35 (263203)
Running on Ubuntu 16.04.1 LTS, kernel: Linux x86 64-bit version 4.4.0-57-generic
Host CPU: Genuine Intel® CPU U2300 @ 1.20GHz, 2 cores available

edit: I've noticed that the 64bit version of libEGL.so wasn't linked properly, updated the symlink (which was wrong for whatever reason, guess I broke something will testing things), but the error is still the same.

What about posting all the logs from post 2? Besides this is not an nvidia thread and besides nvidia's vdpau will slowly die when we switch to wayland or to mir (why don't we switch to MIR) :-) your problem should be solvable.