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 - camelreef - 2017-12-13

(2017-12-13, 07:46)fritsch Wrote: Fix comes here: https://github.com/xbmc/xbmc/pull/13181 btw. you might still have older versions in /var/cache/apt/archives directory - you can install them by sudo dpkg -i just make sure you specify all .deb packages needed with the same version.
nah... I clean the cache in a script on machines that I will maintain remotely, that's one less cause for full partitions... I was a bit on autopilot, so the script came in early, before production stage..

Cool, a fix! Yay!


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

Just pushed the fix. Will be in tomorrow's ppa.


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

The audio issue is still in the latest nightly. Kodi logs continuously:

09:59:40.348 T:140694283790080 INFO: CActiveAESink::OpenSink - initialize sink
09:59:40.348 T:140694283790080 DEBUG: CActiveAESink::OpenSink - trying to open device PULSE:iec958:CARD=C20,DEV=0
09:59:40.374 T:140694283790080 ERROR: PulseAudio: Failed to connect context
09:59:40.374 T:140694283790080 NOTICE: PulseAudio might not be running. Context was not created.
09:59:40.374 T:140694283790080 ERROR: CActiveAESink::OpenSink - no sink was returned
09:59:40.374 T:140694292182784 ERROR: ActiveAE::InitSink - returned error
09:59:40.874 T:140694292182784 DEBUG: CSettingsManager: requested setting (audiooutput.dspaddonsenabled) was not found.


Here are the full debug logs:

dpkg -l | grep mesa
DISPLAY=:0 vainfo (also produces stderr):

libva info: VA-API version 0.40.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_39
libva info: va_openDriver() returns 0


kodi.log
dmesg
id
amixer

Reverting to nightly from 2 days ago resolves the issue.

Thanks for looking!
-- Stanislav


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

Thanks - you spotted another issue :-)

For the time being, start kodi with AE_SINK=ALSA kodi


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

Ouh that shows another issue :-( - does it work if you start it with: AE_SINK=ALSA kodi ? (latest version again please).


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

Yes it works, except that audio out changed to HDA Intel again (this also happened a few days ago). I changed it back to USB DAC and it is fine now.

So now my .config/openbox/autostart looks like this:

OUTPUT=`xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Full"
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Video 16:235 pass-through"
xsetroot #000000
xset -dpms
devmon &

AE_SINK=alsa MALLOC_MMAP_THRESHOLD_=131072 /usr/bin/kodi --standalone
  
while [ $? -ne 0 ]; do
  
AE_SINK=alsa MALLOC_MMAP_THRESHOLD_=131072 /usr/bin/kodi --standalone
done
openbox --exit



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

Yeah ... needs a more intrusive fix in the code.


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

Fix for using PA even if no PA Server running: https://github.com/xbmc/xbmc/pull/13184


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

(2017-12-13, 11:52)Stanislav Wrote: Yes it works, except that audio out changed to HDA Intel again (this also happened a few days ago). I changed it back to USB DAC and it is fine now.

So now my .config/openbox/autostart looks like this:

OUTPUT=`xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Full"
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Video 16:235 pass-through"
xsetroot #000000
xset -dpms
devmon &
AE_SINK=alsa MALLOC_MMAP_THRESHOLD_=131072 /usr/bin/kodi --standalone
  
while [ $? -ne 0 ]; do
  
AE_SINK=alsa MALLOC_MMAP_THRESHOLD_=131072 /usr/bin/kodi --standalonedone
openbox --exit
Also for me this change fixes the problem!


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

Should work correctly tomorrow without further changes.


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

(2017-12-13, 16:07)fritsch Wrote: Should work correctly tomorrow without further changes.
 At what time is that build happening? I'm impatient! :oP


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

Yeah - so work on that!


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

(2017-12-13, 16:07)fritsch Wrote: Should work correctly tomorrow without further changes.
 There is still an issue after the PPA update. playing never starts.

http://paste.ubuntu.com/26180636/

Nico


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

(2017-12-14, 04:58)camelreef Wrote:
(2017-12-13, 16:07)fritsch Wrote: Should work correctly tomorrow without further changes.
 There is still an issue after the PPA update. playing never starts.

http://paste.ubuntu.com/26180636/

Nico 
 Playing resumed when I removed the Sync playback to display setting.

Back to 4K testing!


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

Test1
Test 2
Do you think there is any point checking with stock 4.13 kernel and the xorg edgers PPA (updated mesa and libdrm)?
I probably will at some point, as I would really prefer to run a kernel that is getting updates through the normal mechanisms, if I can help it... But heh, it's also an appliance, it's not that exposed.

I will also check a mainline 4.13 kernel, it may be a problem introduced by an Ubuntu patch, and then it could be possible to get a fix from the standard channels.