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-12-19

(2017-12-19, 18:11)camelreef Wrote:
(2017-12-19, 18:06)fritsch Wrote: The "ds" clearly show that whatever happened is totally unknown to kodi - nothing in the log. No resync, nothing - absolutely nothing.

Now - try - as asked some weeks before: Set your resolution to 1080p, play the same video again, let it scale down with "bilinear" scaling. Same artefacts?
I know, nada in the logs, it's not good...
 How do I hard set to 1080p? 
 xrandr --output YOUROUTPUT --mode 1920x1080

And in kodi disable "Adjust Refreshrate". Make sure you manually set scaling to bilinear - as otherwise it would stutter like hell as the GPU is too slow to do lanczos 3 downscaling.


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

(2017-12-19, 18:38)fritsch Wrote:
(2017-12-19, 18:11)camelreef Wrote:
(2017-12-19, 18:06)fritsch Wrote: The "ds" clearly show that whatever happened is totally unknown to kodi - nothing in the log. No resync, nothing - absolutely nothing.

Now - try - as asked some weeks before: Set your resolution to 1080p, play the same video again, let it scale down with "bilinear" scaling. Same artefacts?
I know, nada in the logs, it's not good...
 How do I hard set to 1080p?  
 xrandr --output YOUROUTPUT --mode 1920x1080

And in kodi disable "Adjust Refreshrate". Make sure you manually set scaling to bilinear - as otherwise it would stutter like hell as the GPU is too slow to do lanczos 3 downscaling. 
I put the xrandr in the openbox autostart?


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

Wherever you want it Sherlock :-) you can also do it via ssh: DISPLAY=:0 xrandr --output whatever --mode 1920x1080


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

(2017-12-19, 19:34)fritsch Wrote: Wherever you want it Sherlock :-) you can also do it via ssh: DISPLAY=:0 xrandr --output whatever --mode 1920x1080
 Sir, yes, Sir! :o)

So, same conditions/PPAs/kernel as above, still intel driver.
Adjust Refreshrate disabled
I issued the 1080p xrandr command through ssh after the movie started playing, as Kodi got going with an initial switch to 2160p.

Yes, artefacts showed-up, very visibly, 15mn into the movie.

Debug log: http://paste.ubuntu.com/26216448/


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

Good. I think we have to end this here. There is nothing left I can do for you.


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

(2017-12-19, 20:04)fritsch Wrote: Good. I think we have to end this here. There is nothing left I can do for you.
 OK... Would you care to explain?

And who can I turn to, now?


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

(2017-12-19, 20:07)camelreef Wrote:
(2017-12-19, 20:04)fritsch Wrote: Good. I think we have to end this here. There is nothing left I can do for you.
 OK... Would you care to explain?

And who can I turn to, now?  
 Your issue has zero to do with kodi. Whatever happens is only happening for you on your installed / configured system. Clean installations with e.g. LibreELEC proved that. We asked many others running Ubuntu (including me) to test your samples. No one had that issue (EditSmile and most importantly there is absolutely no correlation with anything in kodi's log.


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

(2017-12-19, 20:12)fritsch Wrote:
(2017-12-19, 20:07)camelreef Wrote:
(2017-12-19, 20:04)fritsch Wrote: Good. I think we have to end this here. There is nothing left I can do for you.
 OK... Would you care to explain?

And who can I turn to, now?    
 Your issue has zero to do with kodi. Whatever happens is only happening for you on your installed / configured system. Clean installations with e.g. LibreELEC proved that. We asked many others running Ubuntu (including me) to test your samples. No one had that issue (EditSmile and most importantly there is absolutely no correlation with anything in kodi's log.  
I can't fail you there... But one last question.

So I've reinstalled from scratch, bare server, then your guide, step by step. The only thing I've added is the xorg.conf file for the intel driver (though it looked like it was working with the modesetting driver while I had forgotten about the intel driver).

The only difference from the previous install is that I've learned about netplan and didn't force an ifupdown network setup. We learn everyday...

It looked like it was working very sweetly and crisply!

Then I started my Roon server install. There is a dependency on ffmpeg/libav-tools + cifs-utils. Could those packages be a source of conflict?


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

(2017-12-20, 03:14)camelreef Wrote:
(2017-12-19, 20:12)fritsch Wrote:
(2017-12-19, 20:07)camelreef Wrote:  OK... Would you care to explain?

And who can I turn to, now?    
 Your issue has zero to do with kodi. Whatever happens is only happening for you on your installed / configured system. Clean installations with e.g. LibreELEC proved that. We asked many others running Ubuntu (including me) to test your samples. No one had that issue (EditSmile and most importantly there is absolutely no correlation with anything in kodi's log.   
I can't fail you there... But one last question.

So I've reinstalled from scratch, bare server, then your guide, step by step. The only thing I've added is the xorg.conf file for the intel driver (though it looked like it was working with the modesetting driver while I had forgotten about the intel driver).

The only difference from the previous install is that I've learned about netplan and didn't force an ifupdown network setup. We learn everyday...

It looked like it was working very sweetly and crisply!

But it's not.

I'm not straying outside bare Ubuntu Server and your install guide, nothing weird. And still, I get artefacts... 



RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - mirtouf - 2018-01-06

Hi,

for this first post of 2018 I start with a problem, I switched from a N3150-ITX (which ran smoothly) to a J3455-ITX Asrock mainboard using the recommendations of the first page and I have a problem with libva and the va API leading to all required HW accelerated videos being software rendered.
I also tried with a kernel from Ubuntu 17.10 and I ended with the same results.
Code:
dpkg -l |grep mesa
https://zerobin.mirtouf.fr/?72a74c29c65b9423#eI+Ezhq7EC/Z7c/Zy9plDwB0k3dwjScwVpKcYCWSd20=
 
Code:
DISPLAY=:0 vainfo (definitely a problem here)
https://zerobin.mirtouf.fr/?b8918938502eafe2#3Rbqq93LYuTQv0Xh2pr9dJBew1QiwRykNEB7LNXxS28=
 
Code:
cat ~/.kodi/temp/kodi.log
https://zerobin.mirtouf.fr/?ae3a4bd7614dacb2#m0C3tm9PQpICHDypORby1I2JWPeX/Aggvl+m8ye+rZE=
 
Code:
dmesg
https://zerobin.mirtouf.fr/?50c0688d1b5c3883#ZyZAgT9YKrc4bmXveCU6pnlmbOiDzmZq7scWG+BUtbA=
 
Code:
id
https://zerobin.mirtouf.fr/?a77d0519cb85c599#WeBarixQepT1OwK1rULcoNFrve9oojtpgHq5u6IoSn8=
 
Code:
amixer
https://zerobin.mirtouf.fr/?3f99e38cc956fdb8#z6eJ8crHEm/V8Gmvqog/M8pqASNtz0ZzboZE3ohWTac=


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

It seems i965-va-driver is not installed. While at it, make sure to add wsnipex's vaapi ppa and use the intel driver from there


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - mirtouf - 2018-01-06

I did not had time to edit my message and indicate I am using wsnipex repo:
Code:
i965-va-driver is already the newest version (1.8.3-4+ppa~xenial).

aptitude search "?origin (wsnipex) ?installed"
i i965-va-driver - VAAPI driver for Intel G45 & HD Graphics family
i libva-drm1 - Video Acceleration (VA) API for Linux -- DRM runtime
i libva-intel-vaapi-driver - VAAPI driver for Intel G45 & HD Graphics family (transitional package)
i libva-wayland1 - Video Acceleration (VA) API for Linux -- Wayland runtime
i libva-x11-1 - API d'Accélération Vidéo (VA) pour Linux -- exécution X11
i libva1 - API d'accélération vidéo pour Linux - exécutables
i vainfo - Video Acceleration (VA) API for Linux -- info program


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

dpkg -L i965-va-driver | pastebinit
sudo apt-get -f install


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

Try:
export LIBVA_DRIVER_NAME=i965
DISPLAY=:0 vainfo

what does this do?


RE: Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server - mirtouf - 2018-01-06

https://paste.ubuntu.com/26334303/
Code:
sudo apt-get -f install
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
Nothing to do

Code:
export LIBVA_DRIVER_NAME=i965
DISPLAY=:0 vainfo
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns -1
libva info: User requested driver 'i965'
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 error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit