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 - 2017-01-11

It's on Intel's 01 github repo. Needs manual compiling. It's hybrid and useless for 4k vp9.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - DakDF - 2017-01-11

(2017-01-11, 18:29)fritsch Wrote: It's on Intel's 01 github repo. Needs manual compiling. It's hybrid and useless for 4k vp9.

Thank you


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Tortuga - 2017-01-11

Last night I followed the tutorial, and have a working Kodi install on Ubuntu Server on my NUC5PPYH. However, I have no PVR addons. I believe I misread the text. It says in either case (Fernet's Master or Unstable) you need the nightly ppa to install PVR addons. In the code block it almost sounds like the unstable branch accounts for the PVR addons.

When I went through the tutorial, I just installed the unstable ppa. If I need to go back and install the nightly ppa as well, that's no problem. Do I then need to re-install kodi.bin or both kodi and kodi.bin, or do I need to purge the unstable and change completely over to the nightly? I'd like to stay on 17 RC2, rather than 18. Thanks for the help! Over the last few days, I've read probably 75% of this thread. There's so much great info!


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - BaGRoS - 2017-01-12

How can I go back to the stable version? Now I have a 18.0-ALPHA 1
EDIT: Best way, back to v17...

메가 서명.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Tortuga - 2017-01-12

(2017-01-11, 21:23)Tortuga Wrote: Last night I followed the tutorial, and have a working Kodi install on Ubuntu Server on my NUC5PPYH. However, I have no PVR addons. I believe I misread the text. It says in either case (Fernet's Master or Unstable) you need the nightly ppa to install PVR addons. In the code block it almost sounds like the unstable branch accounts for the PVR addons.

When I went through the tutorial, I just installed the unstable ppa. If I need to go back and install the nightly ppa as well, that's no problem. Do I then need to re-install kodi.bin or both kodi and kodi.bin, or do I need to purge the unstable and change completely over to the nightly? I'd like to stay on 17 RC2, rather than 18. Thanks for the help! Over the last few days, I've read probably 75% of this thread. There's so much great info!
I figured it out Big Grin and have 17 RC2 with the PVR addon I need.

Also, for those with the black screen issue (refresh rate change produces black screen until switching AVR inputs - for example) I installed kernel 4.7.6 stable, and that seems to work. There's a pretty large range of kernels affected by that issue, so I'm hoping this one works, and isn't negatively impacting me.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - Tortuga - 2017-01-12

(2017-01-12, 00:25)BaGRoS Wrote: How can I go back to the stable version? Now I have a 18.0-ALPHA 1
EDIT: Best way, back to v17...

메가 서명.
Since I just did this, lol, I can probably help...

Code:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:team-xbmc/xbmc-nightly

That will remove the nightly ppa. Then, if you don't already have it, you have to install the unstable ppa and likely reinstall kodi.

Code:
sudo apt-add-repository ppa:team-xbmc/unstable
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install kodi kodi.bin

I hope this is right. It's not exactly the process I followed, as I had previously installed the unstable ppa with kodi. So I didn't have to reinstall (it doesn't appear so anyway).


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - barthand - 2017-01-14

First I'd like to say Hi to everyone and thank you for all your hard work and contributions!

I bought J3455-ITX (Apollo Lake) and I'm struggling to enable VAAPI on Ubuntu 16.10.

I tried already different kernels (stock 4.8.0, 4.9.2, intel-drm-4.9.0), installed Mesa 13.0.3 from PPA, updated to libva 1.7.3 from this PPA.

This is my output from vainfo run in terminal in Unity:

Code:
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

This obviously results in Kodi (v17 RC2) using software decode.

I know it's not strictly related to Kodi itself, but this is only topic out in the wild that treats about Apollo Lake and VAAPI.

Many thanks in advance!


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-01-14

Provide the logfiles from first post


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - barthand - 2017-01-15

(2017-01-14, 15:36)barthand Wrote: First I'd like to say Hi to everyone and thank you for all your hard work and contributions!

I bought J3455-ITX (Apollo Lake) and I'm struggling to enable VAAPI on Ubuntu 16.10.

I tried already different kernels (stock 4.8.0, 4.9.2, intel-drm-4.9.0), installed Mesa 13.0.3 from PPA, updated to libva 1.7.3 from this PPA.

This is my output from vainfo run in terminal in Unity:

Code:
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

This obviously results in Kodi (v17 RC2) using software decode.

I know it's not strictly related to Kodi itself, but this is only topic out in the wild that treats about Apollo Lake and VAAPI.

Many thanks in advance!

(2017-01-14, 15:38)fritsch Wrote: Provide the logfiles from first post

Here are the logs:

Code:
dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/23801487/

Code:
DISPLAY=:0 vainfo 2>&1 | pastebinit
http://paste.ubuntu.com/23801493/

Code:
cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/23801507/

Code:
dmesg | pastebinit
http://paste.ubuntu.com/23801530/

Code:
amixer | pastebinit
http://paste.ubuntu.com/23801538/

Thanks!


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-01-15

Your disk is broken:
Quote:[ 8985.568297] Buffer I/O error on dev dm-0, logical block 119573233, async page read
[ 8985.568711] Buffer I/O error on dev dm-0, logical block 192233348, async page read
[ 8985.569058] Buffer I/O error on dev dm-0, logical block 192233348, async page read
[ 8985.569486] Buffer I/O error on dev dm-0, logical block 145561145, async page read
[ 8985.569968] Buffer I/O error on dev dm-0, logical block 145561145, async page read
[ 8985.570267] Buffer I/O error on dev dm-0, logical block 119573233, async page read
[ 8985.570488] Buffer I/O error on dev dm-0, logical block 786939, async page read
[ 8985.570801] Buffer I/O error on dev dm-0, logical block 119573233, async page read
[ 8985.570999] Buffer I/O error on dev dm-0, logical block 787095, async page read
[ 8985.571114] Buffer I/O error on dev dm-0, logical block 787095, async page read
[ 9002.986316] buffer_io_error: 1 callbacks suppressed
[ 9002.986320] Buffer I/O error on dev dm-0, logical block 786914, async page read
[ 9002.986435] Buffer I/O error on dev dm-0, logical block 786914, async page read
[ 9002.987669] Buffer I/O error on dev dm-0, logical block 786924, async page read
[ 9002.987825] Buffer I/O error on dev dm-0, logical block 786924, async page read
[ 9002.987976] Buffer I/O error on dev dm-0, logical block 786914, async page read
[ 9002.990152] Buffer I/O error on dev dm-0, logical block 786927, async page read
[ 9002.991410] Buffer I/O error on dev dm-0, logical block 787784, async page read
[ 9002.991673] Buffer I/O error on dev dm-0, logical block 787784, async page read
[ 9002.992666] Buffer I/O error on dev dm-0, logical block 786916, async page read
[ 9002.994562] Buffer I/O error on dev dm-0, logical block 786964, async page read
[ 9019.452128] buffer_io_error: 2 callbacks suppressed
[ 9019.452132] Buffer I/O error on dev dm-0, logical block 786914, async page read
[ 9019.453862] Buffer I/O error on dev dm-0, logical block 786924, async page read
[ 9019.456295] Buffer I/O error on dev dm-0, logical block 787095, async page read
[ 9019.456692] Buffer I/O error on dev dm-0, logical block 119573233, async page read
[ 9019.477887] Buffer I/O error on dev dm-0, logical block 797030, async page read
[ 9019.478296] Buffer I/O error on dev dm-0, logical block 797030, async page read
[ 9019.479689] Buffer I/O error on dev dm-0, logical block 797101, async page read
[ 9019.479800] Buffer I/O error on dev dm-0, logical block 797101, async page read
[ 9019.480105] Buffer I/O error on dev dm-0, logical block 279531478, async page read
[ 9019.480197] Buffer I/O error on dev dm-0, logical block 279531478, async page read
[ 9030.458503] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 9030.458506] Bluetooth: BNEP filters: protocol multicast
[ 9030.458513] Bluetooth: BNEP socket layer initialized
[ 9135.602273] buffer_io_error: 5 callbacks suppressed
[ 9135.602278] Buffer I/O error on dev dm-0, logical block 192233348, async page read
[ 9135.603735] Buffer I/O error on dev dm-0, logical block 192233348, async page read
[ 9135.603958] Buffer I/O error on dev dm-0, logical block 145561145, async page read
[ 9135.604143] Buffer I/O error on dev dm-0, logical block 145561145, async page read
[ 9135.604334] Buffer I/O error on dev dm-0, logical block 786939, async page read
[ 9165.527251] Buffer I/O error on dev dm-0, logical block 279531440, async page read
[ 9165.528188] Buffer I/O error on dev dm-0, logical block 279531440, async page read
[ 9168.135528] Buffer I/O error on dev dm-0, logical block 45718797, async page read
[ 9175.158698] Buffer I/O error on dev dm-0, logical block 786914, async page read
[ 9175.159828] Buffer I/O error on dev dm-0, logical block 797147, async page read
[ 9175.160597] Buffer I/O error on dev dm-0, logical block 797147, async page read
[ 9175.161679] Buffer I/O error on dev dm-0, logical block 788126, async page read
[ 9175.162590] Buffer I/O error on dev dm-0, logical block 788126, async page read
[ 9175.163644] Buffer I/O error on dev dm-0, logical block 279531468, async page read
[ 9175.164323] Buffer I/O error on dev dm-0, logical block 279531468, async page read
[ 9175.165049] Buffer I/O error on dev dm-0, logical block 279532290, async page read
[ 9175.165705] Buffer I/O error on dev dm-0, logical block 279532290, async page read
[ 9175.167252] Buffer I/O error on dev dm-0, logical block 279531467, async page read
[ 9181.362917] buffer_io_error: 15 callbacks suppressed
[ 9181.362923] Buffer I/O error on dev dm-0, logical block 786914, async page read
[ 9181.364895] Buffer I/O error on dev dm-0, logical block 797147, async page read
[ 9181.366849] Buffer I/O error on dev dm-0, logical block 788126, async page read
[ 9181.368371] Buffer I/O error on dev dm-0, logical block 279531468, async page read
[ 9181.369353] Buffer I/O error on dev dm-0, logical block 279532290, async page read
[ 9181.369570] Buffer I/O error on dev dm-0, logical block 279531467, async page read
[ 9181.370110] Buffer I/O error on dev dm-0, logical block 279531870, async page read
[ 9181.370432] Buffer I/O error on dev dm-0, logical block 279532312, async page read
[ 9181.370627] Buffer I/O error on dev dm-0, logical block 119573233, async page read
[ 9181.370798] Buffer I/O error on dev dm-0, logical block 797132, async page read
[ 9188.560540] buffer_io_error: 6 callbacks suppressed
[ 9188.560545] Buffer I/O error on dev dm-0, logical block 279531440, async page read
[ 9190.731657] Buffer I/O error on dev dm-0, logical block 45718797, async page read
[ 9191.907930] Buffer I/O error on dev dm-0, logical block 45718797, async page read
[ 9192.481834] Buffer I/O error on dev dm-0, logical block 45718797, async page read
[ 9193.402404] Buffer I/O error on dev dm-0, logical block 45718797, async page read
[ 9200.956672] Buffer I/O error on dev dm-0, logical block 45718797, async page read
[ 9246.938840] Buffer I/O error on dev dm-0, logical block 488309712, async page read



RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - barthand - 2017-01-15

(2017-01-15, 09:42)fritsch Wrote: Your disk is broken:
Quote:[ 8985.568297] Buffer I/O error on dev dm-0, logical block 119573233, async page read
[ 8985.568711] Buffer I/O error on dev dm-0, logical block 192233348, async page read
[ 8985.569058] Buffer I/O error on dev dm-0, logical block 192233348, async page read
...

Thanks for pointing it out! Well, that's a bit surprising, because it's my newly created RAID5 array out of recently bought disks.

But anyway, do you think it has anything to do with VAAPI not working?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-01-15

If the drivers is stored at this logical block :-)

Try:
Code:
sudo apt-get install --reinstall i965-va-driver

Now try again. If it does not work, try with sudo - to see if it's a permission issue.

For the broken disks, check

Code:
cat /proc/mdstat



RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - barthand - 2017-01-15

(2017-01-15, 10:29)fritsch Wrote: If the drivers is stored at this logical block :-)

Understood :-) but my OS is installed on USB stick.

(2017-01-15, 10:29)fritsch Wrote: For the broken disks, check

Code:
cat /proc/mdstat

Well, seems fine to me.

Code:
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md0 : active raid5 sdb1[1] sda1[0] sdc1[3]
      5860063232 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      bitmap: 0/22 pages [0KB], 65536KB chunk

unused devices: <none>

These errors happened only once (never noticed them before and after) and for this single case, they are wrapped in timeframe of 4 minutes, then no more... Hmmm, will need to investigate this further.

(2017-01-15, 10:29)fritsch Wrote: Try:
Code:
sudo apt-get install --reinstall i965-va-driver

Now try again. If it does not work, try with sudo - to see if it's a permission issue.

After reinstalling, vainfo (without DISPLAY=:0) in SSH terminal returned the following (although please note: can't connect to X server in first line):

Code:
error: can't connect to X server!
libva info: VA-API version 0.39.4
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
vainfo: VA-API version: 0.39 (libva 1.7.3)
vainfo: Driver version: Intel i965 driver for Intel(R) Broxton - 1.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSlice
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      :    VAEntrypointVLD
      VAProfileH264MultiviewHigh      :    VAEntrypointEncSlice
      VAProfileH264StereoHigh         :    VAEntrypointVLD
      VAProfileH264StereoHigh         :    VAEntrypointEncSlice
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileJPEGBaseline           :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointEncPicture
      VAProfileVP8Version0_3          :    VAEntrypointVLD
      VAProfileVP8Version0_3          :    VAEntrypointEncSlice
      VAProfileHEVCMain               :    VAEntrypointVLD
      VAProfileHEVCMain               :    VAEntrypointEncSlice
      VAProfileHEVCMain10             :    VAEntrypointVLD
      VAProfileVP9Profile0            :    VAEntrypointVLD

BUT - with DISPLAY=:0 it returns same error as previously.

Code:
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

With sudo, results are exactly the same, although there is one additional line printed in beginning:

Code:
error: XDG_RUNTIME_DIR not set in the environment.



RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - fritsch - 2017-01-15

Yeah. Follow the how-to please. Cannot help you further.


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - barthand - 2017-01-16

(2017-01-15, 13:37)fritsch Wrote: Yeah. Follow the how-to please. Cannot help you further.

I followed the how-to from the first post and results were unfortunately the same (vainfo returning correct output only when DISPLAY was not actually pointing to running X server),

I almost lost hope, but finally I get it working. :-)

Conclusion had to be that probably X server is somehow not loading i965 drivers. I looked up /var/log/Xorg.0.log, searching for either intel or i965 - nothing was there.

So what I did was to add the file /usr/share/X11/xorg.conf.d/20-intel.conf, with the following content:

Code:
Section "Device"
  Identifier  "intel"
  Driver      "intel"
EndSection

Then you should just restart the X server, observe how i965 drivers are loaded in Xorg.0.log and finally - enjoy the proper output from vainfo (and obviously HW-accelerated videos in Kodi!).

Hope it helps someone! (I got stuck on that for several hours...)

Just to remind you: all of this happened to me on Ubuntu 16.10 Desktop.

Thanks fritsch for all your help again!