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 - fritsch - 2016-08-01

Will be fixed with: https://github.com/xbmc/xbmc/pull/10211


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - luna_s - 2016-08-02

Still broken on latest commit, not a green screen but no output at all and large memory use, deinterlace method is greyed out

kodi@kodi:~$ dpkg -l |grep mesa | pastebinit

http://paste.ubuntu.com/21861046/

kodi@kodi:~$ DISPLAY=:0 vainfo | pastebinit
libva info: VA-API version 0.38.0
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_38
libva info: va_openDriver() returns 0

http://paste.ubuntu.com/21861047/

kodi@kodi:~$ cat ~/.kodi/temp/kodi.log | pastebinit

http://paste.ubuntu.com/21861049/

kodi@kodi:~$ dmesg | pastebinit

http://paste.ubuntu.com/21861051/

kodi@kodi:~$ id | pastebinit

http://paste.ubuntu.com/21861052/

kodi@kodi:~$ amixer | pastebinit

http://paste.ubuntu.com/21861053/


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

I cannot reproduce, running on N3150 with the very same sample you posted.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - User 182116 - 2016-08-02

Not getting any green screen or other issues when selecting auto on my N3150 with the latest update.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Kukki - 2016-08-03

The green screen has gone after last apt-get dist-upgrade. However, when it starts to play or ends from play, the screen flashes black for a little bit while (2~4 seconds).


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

You got a Debug Log for that?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - tudstudent - 2016-08-03

(2016-08-03, 03:31)Kukki Wrote: The green screen has gone after last apt-get dist-upgrade. However, when it starts to play or ends from play, the screen flashes black for a little bit while (2~4 seconds).

Is this not that the screen is adjusted to the refreshrate of the vid?
Mine is always doing that when I play a new stream.

See the FiPo of Fritisch where you select this setting.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - User 182116 - 2016-08-04

A pre modification question.

I'm currently using an LG HD TV with my Beebox N3150 and tomorrow I'm taking delivery of a new 4K TV from another manufacturer.

I am likely to encounter any issues when connecting to the new TV?


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

(2016-08-04, 03:24)Bluesmanuk Wrote: A pre modification question.

I'm currently using an LG HD TV with my Beebox N3150 and tomorrow I'm taking delivery of a new 4K TV from another manufacturer.

I am likely to encounter any issues when connecting to the new TV?
Drive it at 1080p. It will switch to 4k automatically if you use the exact How-To settings.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - christianha - 2016-08-04

OMG, udevil actually solved my problem with the automount. I was setting up the box 3 times as I thought I did something wrong. THANKS FRITSCH!

all that was needed is:
1. sudo apt-get install udevil
2. sudo nano /home/kodi/.config/openbox/autostart

OUTPUT=`xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Full"
devmon & /usr/bin/kodi --standalone
openbox --exit


I'm now wondering since most ppl will install an OS > 15.10 if this would be good to add to the step by step instructions.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - tudstudent - 2016-08-04

Fritsch, underneath piece of code might be a valuable addition for your wiki. When you boot your Intel system without a monitor connected it will not receive a valid edid. Kodi will not accept this (xrandr erorr?)

When your system is set-up according the wiki it is working fine, however when you use suspend and you have a habit of not always having a TV on (various reasons), it might happen that you end up with a black screen until you force an action that resets the screen by acquiring the edid and sending a new resolution to the TV so it gets an image again. To avoid this is to use a custom/downloaded edid.
When you use Intel (or AMD open source) it is written a lot on the net that Intel does not support custom edid. After some searching I came across some howto's not for Ubuntu, but specifying howto do this with KMS and Ubuntu. Underneath the short howto followed by the sources:

I am not a howto writer so I am doing my best to share this info with you all.

General:
Intel, Nouveau, ATI and AMDGPU drivers already enable KMS automatically for all chipsets, so you need not install it manually.
The proprietary NVIDIA driver supports KMS (since 364.12), which has to be manually enabled.
The proprietary AMD Catalyst driver does not support KMS. In order to use KMS you have to replace it with the open-source ATI driver.

First
Get your active connection interface. OpenElec has described how to find you active ports:
Code:
ls /sys/class/drm

Then check which is connected:
Code:
cat /sys/class/drm/card0-HDMI-A-1/status

Second
Get your edid. This is described by Kodi forums, no need to copy again here:
http://kodi.wiki/view/Creating_and_using_edid.bin_via_xorg.conf#Configure_xorg_to_read_custom_EDID_file

Third
Save you edid in the firmware folder in ubuntu.
This folder needs to be created:
Code:
sudo mkdir /lib/firmware/edid

Then copy your edid to the newly created edid folder
Code:
sudo mv ~/your edid location/edid.bin /lib/firmware/edid/edid.bin

Fourth
Open your grub settings:
Code:
sudo gedit /etc/default/grub

The add/change the following type of line:
Code:
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=HDMI-A-1:edid/AVR_TV_Samsung.bin"

Save the file and run a grub update:
Code:
sudo update-grub

Fifth
Reboot and all should be working without the need of turning your AVR/TV on and kodi will start/work. Also when resuming from suspend when suspended on a "strange resolution"

Any recommendations of advises are welcome.

https://wiki.ubuntu.com/Kernel/KernelBootParameters
https://wiki.archlinux.org/index.php/kernel_mode_setting
http://kodi.wiki/view/Creating_and_using_edid.bin_via_xorg.conf#Configure_xorg_to_read_custom_EDID_file
http://wiki.openelec.tv/index.php/Configuring_a_Custom_xorg.conf#tab=Intel


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

They copied from me! just use the forum search.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - tudstudent - 2016-08-04

Well I did search, but did not found the complete picture (btw you have been posting a lot Smile so going through all...) That is why I posted it here (combined with the fact that for me it is a part belonging to the suspend feature (personal opinion).


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Kukki - 2016-08-04

Kukki Wrote: The green screen has gone after last apt-get dist-upgrade. However, when it starts to play or ends from play, the screen flashes black for a little bit while (2~4 seconds).

(2016-08-03, 06:20)fritsch Wrote: You got a Debug Log for that?

Here is the log:
kodi@HTPC-N3150:~$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/22189084/

kodi@HTPC-N3150:~$ DISPLAY=:0 vainfo | pastebinit
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns -1
libva info: va_getDriverName() failed with unknown libva error, driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error), exit

kodi@HTPC-N3150:~$ cat ~/.kodi/temp/kodi.log | pastebinit
(while playing movie)
http://paste.ubuntu.com/22188979/
(after stopping movie)
http://paste.ubuntu.com/22189406/

kodi@HTPC-N3150:~$ dmesg | pastebinit
http://paste.ubuntu.com/22188997/

kodi@HTPC-N3150:~$ id | pastebinit
http://paste.ubuntu.com/22189013/

kodi@HTPC-N3150:~$ amixer | pastebinit
http://paste.ubuntu.com/22189030/

Thank you.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - maurer - 2016-08-04

hello there,

5 years kodi(xbmc) user here- first post Smile
I have a DN2820 nuc that was running 14.04.5 + kodi until yesterday.
After upgrading to 16.04 I followed first post tutorial to upgrade kodi config.
before describing the problem i will detail my setup.
My primary use for the nuc is as file+vpn server and occasionally for kodi (when the wife takes over main tv+rpi3 setup)
I have an old LG 27'' display connected via hdmi that i keep mostly shut.
My desired setup is to upgrade and reboot the nuc server and find the kodi running when needed.
Now about the issues:
1) When rebooting nuc with display shut after i turn on the display there is no image - only fix is to reboot the nuc with display on which leads to issue:
2) When powering the nuc with display on kodi doesn't start - i have to manually enter (in ssh) " sudo systemctl start kodi"

Logs:
dpkg -l |grep mesa | pastebinit - http://paste.ubuntu.com/22196335/
sudo DISPLAY=:0 vainfo | pastebinit - http://paste.ubuntu.com/22196819/
cat ~/.kodi/temp/kodi.log | pastebinit - http://paste.ubuntu.com/22199809/
dmesg | pastebinit - http://paste.ubuntu.com/22196340/
id | pastebinit - http://paste.ubuntu.com/22200071/

Thanks for any hint !