PSA: The forum server will be physically migrated to a new datacenter. Expect a large downtime of the forum between the 27th and the 29th of September.

Intel VAAPI howto with Krypton v17 based on Ubuntu 16.04 server

  Thread Rating:
  • 15 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
redstorm Offline
Senior Member
Posts: 244
Joined: Sep 2009
Reputation: 2
Post: #4531
Hard to pin down whats causing this but every now and then sound is lost and a buzzing sound is played, the kodi.log starts showing errors around ActiveAE. Stopping and starting kodi does not resolve the situation only a full reboot. Can go days without a re occurrence, can happen watching TV , or recorded content. latest occurrence occurred while watching you-tube clips.

ERROR: ActiveAE::InitSink - failed to init
ERROR: ActiveAE::FlushEngine - failed to flush

Logs
Kodi
http://paste.ubuntu.com/25561342/

dpkg
http://paste.ubuntu.com/25561367/

DISPLAY
http://paste.ubuntu.com/25561375/

dmesg
http://paste.ubuntu.com/25561380/

id
http://paste.ubuntu.com/25561398/

amixer
http://paste.ubuntu.com/25561403/

aplay -l
http://paste.ubuntu.com/25561408/

Hardware is a Asrock Z87 with a Haswell CPU Intel® Core™ i5-4570S
cat /proc/cpuinfo
http://paste.ubuntu.com/25561411/

Linux 16.04
Linux xbmc 4.4.0-91-generic #114-Ubuntu SMP Tue Aug 8 11:56:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

AVR is a Onyko TX-NR737 connected to a Sony TV via HDMI
Sound is configured for HDMI and Passthrough is HDMI device
Sync playback to display is OFF as per page 1 when using passthrough audio.

kmshelper is configured to load the extracted edid.bin rom when all systems were on and running, enabling booting with AVR/TV off. (instructions in this thread somewhere) video=HDMI-A-3:[email protected] drm_kms_helper.edid_firmware=HDMI-A-3:edid/edid.bin

guisettings.xml
http://paste.ubuntu.com/25561436/

Install is not using openbox. kodi.service
http://paste.ubuntu.com/25561483/

I have turned debug logging on to get a more detailed log when it occurs again. Incase their is not enough info in tracking down what is happening. bug or config issue.

Video of the noise when the issue occurs.
Video of the issue at hand.
(This post was last modified: 2017-09-18 03:49 by redstorm.)
find quote
fritsch Online
Team-Kodi Developer
Posts: 18,254
Joined: Aug 2011
Reputation: 567
Location: Stuttgart*
Post: #4532
Upgrade your kernel, please.

"Your most vocal users are not reflective of your userbase" J.M.
"Of course, they [XP Users and people with outdated hardware] need to tell the world about the kind of hero they are, and block innovation for everyone else because their decades old OS / hardware needs to work =p" nevcairiel (ffmpeg)
No Debug Log no issue.
find quote
redstorm Offline
Senior Member
Posts: 244
Joined: Sep 2009
Reputation: 2
Post: #4533
(2017-09-18 09:36)fritsch Wrote:  Upgrade your kernel, please.

Thanks upgraded to 4.4.0-93 is what you were thinking (staying on LTS) or would you rather i grabbed a 4.11 or 4.12 kernel

also had it happen again today watching youtube and stumbled across this as a possible solution.
https://ubuntuforums.org/showthread.php?t=1544262


/etc/asound.conf
http://paste.ubuntu.com/25565067/

I have removed my asound.conf for now and will see how it goes with a newer kernel.

Thanks
Red.
find quote
fritsch Online
Team-Kodi Developer
Posts: 18,254
Joined: Aug 2011
Reputation: 567
Location: Stuttgart*
Post: #4534
4.12

"Your most vocal users are not reflective of your userbase" J.M.
"Of course, they [XP Users and people with outdated hardware] need to tell the world about the kind of hero they are, and block innovation for everyone else because their decades old OS / hardware needs to work =p" nevcairiel (ffmpeg)
No Debug Log no issue.
find quote
redstorm Offline
Senior Member
Posts: 244
Joined: Sep 2009
Reputation: 2
Post: #4535
(2017-09-18 15:13)fritsch Wrote:  4.12

thanks. I remember that they asound.conf was for getting sound working if i ran MAME in the same way as i run kodi. have commented it out for now.

4.12.13 kernel installed.

Code:
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.12.13-041213-generic /boot/vmlinuz-4.12.13-041213-generic
ERROR (dkms apport): kernel package linux-headers-4.12.13-041213-generic is not supported
Error! Bad return status for module build on kernel: 4.12.13-041213-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information.
Setting up linux-image-4.12.13-041213-generic (4.12.13-041213.201709132217) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.12.13-041213-generic /boot/vmlinuz-4.12.13-041213-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.12.13-041213-generic /boot/vmlinuz-4.12.13-041213-generic
ERROR (dkms apport): kernel package linux-headers-4.12.13-041213-generic is not supported
Error! Bad return status for module build on kernel: 4.12.13-041213-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.12.13-041213-generic /boot/vmlinuz-4.12.13-041213-generic
update-initramfs: Generating /boot/initrd.img-4.12.13-041213-generic
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_01.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_huc_ver02_00_1810.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_huc_ver01_07_1398.bin for module i915
W: Possible missing firmware /lib/firmware/i915/skl_huc_ver01_07_1398.bin for module i915

Broadcom wifi driver not supported ,- typical with newer kernels (I don't use it so not an issue)
also looks like firmware for Kerbylake, skylake and broxton cpu's is missing, Im on haswell so shouldn't be an issue.

Fixed the above issues. patched wifi source and firmware located for the newer Intel chips. will see how it goes. (reminds me of why i like to stay on the LTS release if at all possible Smile)
(This post was last modified: 2017-09-19 09:38 by redstorm.)
find quote
qp9013625 Offline
Senior Member
Posts: 130
Joined: Jul 2015
Reputation: 4
Post: #4536
(2017-09-18 15:27)redstorm Wrote:  
(2017-09-18 15:13)fritsch Wrote:  4.12
reminds me of why i like to stay on the LTS release if at all possible Smile)

Instead of upgrading to the 4.12 mainline kernel, you simply could have upgraded to the Ubuntu LTS HWE kernel and graphics stack.

The HWE stack provides the new Ubuntu kernels and graphics stacks for the current LTS release.

Meaning 16.04.2 has the kernel and graphics stack from 16.10 (kernel 4.8), then 16.04.3 has the kernel and graphics stack from 17.04 (kernel 4.10), then 16.04.4 has the kernel and graphics stack from 17.10 (kernel 4.13) and so on...

Doing so is as simple as:

Code:
sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

as outlined on:

https://wiki.ubuntu.com/Kernel/LTSEnablementStack
find quote
redstorm Offline
Senior Member
Posts: 244
Joined: Sep 2009
Reputation: 2
Post: #4537
(2017-09-20 11:32)qp9013625 Wrote:  Instead of upgrading to the 4.12 mainline kernel, you simply could have upgraded to the Ubuntu LTS HWE kernel and graphics stack.

The HWE stack provides the new Ubuntu kernels and graphics stacks for the current LTS release.

Meaning 16.04.2 has the kernel and graphics stack from 16.10 (kernel 4.8), then 16.04.3 has the kernel and graphics stack from 17.04 (kernel 4.10), then 16.04.4 has the kernel and graphics stack from 17.10 (kernel 4.13) and so on...

Doing so is as simple as:

Code:
sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

as outlined on:

https://wiki.ubuntu.com/Kernel/LTSEnablementStack

Thanks ill remember that for next time, all the issues were able to be fixed with minimal effort, ill stick with the mainline kernel till 18.04 lts next year.

I don't think the kernel was at fault this time and it was more to do with the long forgotten asound.conf i had lying around. The asound.conf was set to re sample to 48000hz. I have now removed it and played lots of 44100 content and had no further problems.

Its possibly a alsa bug, when you play content with 44100hz audio with the below asound.conf every now and then it falls apart.

asound.conf

I remember compiling kernels around the 3.18 era to fix haswell hdmi bugs. eventually fixed in kernel 3.19 IIRC due to being an early adopter of the Haswell gen CPU's not all was well for quite some time. But thanks to all the work from Fritsch and others we are now in great shape.
find quote
davincino Offline
Junior Member
Posts: 1
Joined: Sep 2017
Reputation: 0
Post: #4538
Hi, i got a Deskmini with Kaby Lake and Ubuntu 17.04 Server with Kernel 4.12.14

I followed all steps from first post. But i get one big issue: my usb-keyboard, usb-mouse and 2.4ghz remote doesn't work.

Kodi starts up after boot. Kodi log doesn't show any keyboard-issue. Looking with dmesg, my rf-usb-dongle is recognized fine and testing rf-inputs with lirc/irw the buttons works fine.

Kodi doesn't seem to be freezed, the clock on upper right side is going straight forward...
Looking if there would be any right-issues with user kodi, i wanted to start kodi with root-user. But if i change user in kodi.service to root, i don't get kodi-screen at all, there is only black screen but WITH mouse pointer.

Any help is appreciated. Thanks

EDIT:

LOGs:

dpkg -l | grep mesa

kodi.log

dmesg

id

amixer


vainfo is not installable cause conflict with libva but i think its not important, isn't it?

apt install vainfo
vainfo depends from libva1 < 1.7.3.1, but 1.8.3-1 is installed
(This post was last modified: 2017-09-24 13:38 by davincino.)
find quote
TimoJ Offline
Member
Posts: 56
Joined: Sep 2014
Reputation: 1
Post: #4539
When using hardware graphic acceleration video skipping performance is much worse than with just CPU. Is this a known "feature" or something wrong in my system? CPU is i7 Haswell with internal Intel graphics, H87 chipset.

I mean a situation where you are using fixed 20 second skip and press the button continuously or keep the button pressed i.e. skips are continuously repeating. With VAAPI skipping slowness/delays are still accetable but with VDPAU and Nvidia video card skipping was quite bad, it had long delays/pauses. In Kodi.log there appears a lot of lines like this, with Nvidia card there was much more stuff like loading sharpess etc. Looks like after each skip step these same lines appear, those lines do not appear when using CPU :

Code:
14:21:32.993 T:140678391277952  NOTICE: VAAPI::Close
14:21:33.003 T:140673314957056  NOTICE: COutput::OnExit: Output Thread terminated
14:21:33.145 T:140673314957056  NOTICE: COutput::OnStartup: Output Thread created
14:21:33.151 T:140676058986240 WARNING: CVideoSurfaces::ClearReference - surface invalid
14:21:33.173 T:140678391277952  NOTICE: VAAPI::Close
find quote
Post Reply