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: New Era: VAAPI with EGL interoperation - gurabli - 2015-08-10

(2015-08-10, 15:00)fritsch Wrote: https://github.com/FernetMenta/xbmc/commits/master

Many thanks!


RE: New Era: VAAPI with EGL interoperation - Ales - 2015-08-10

I have a strange issue on recent build. Kodi crashes while opening any jpeg picture.
The last line in Kodi log and crashlog is:
Code:
19:38:06 T:140235400988608   DEBUG: Loading: /usr/lib/kodi/system/libexif-x86_64-linux.so
Relevant system log is:
Code:
aug 10 19:38:06 htpc kernel: kodi.bin[4863]: segfault at 7fffd21b9f6c ip 00007f8b11f47d5d sp 00007fffd2179de8 error 6 in libc-2.21.so[7f8b11ec4000+199000]
There are no other relevant log lines i think.
I'm on Archlinux, Kodi built from FernetMenta master git branch.

The only error I have in kodi log for a long time is:
Code:
ERROR: CWinSystemX11::XErrorHandler: BadAtom (invalid Atom parameter), type:0, serial:43, error_code:5, request_code:18 minor_code:0
May I be interested in this error?


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-11

(2015-08-10, 22:18)Ales Wrote: The only error I have in kodi log for a long time is:
Code:
ERROR: CWinSystemX11::XErrorHandler: BadAtom (invalid Atom parameter), type:0, serial:43, error_code:5, request_code:18 minor_code:0
May I be interested in this error?

That one you can ignore. We try to disable the KWIn Compositor, but don't check if it is running at all.

Please also post all the stuff - that you don't think is relevant to you.

Edit: And obviously we need the complete backtrace ... if we don't find anything - blame GCC 5.1 - would not be the first time.
Edit2: The only exif change since a long time was: 3b42ef03375396480bf3a8e942b39353e68ecda9 but a backtrace will clearly show the issue, with enabled debugging - even better.


RE: New Era: VAAPI with EGL interoperation - Ales - 2015-08-11

Thank You fritsch for your kind helping!

mesa: http://paste.ubuntu.com/12054407/
vainfo: http://paste.ubuntu.com/12054409/
kodi.old.log: http://paste.ubuntu.com/12054432/
dmesg: http://paste.ubuntu.com/12054438/


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-11

The crashlog also, please this is the important one with the gdb backtrace.
GCC 5.2.0 - too much time or what? :-)

Here: [ 44.462581] kodi.bin[525]: segfault at 7fff35b8f1ac ip 00007ff61c323d5d sp 00007fff35b4f028 error 6 in libc-2.21.so[7ff61c2a0000+199000] - that looks like an arch fuckup ... man ... we want to test kodi and not the newest and greatest arch stack :-(

Btbn Wrote:The upgrade procedure for gcc 4.x to 5 is also quite fun. Upgrade
gcc, and then rebuild _everything_ 3~5 times, until there are no
errors left

Did you do this:
Btbn Wrote:fritsch, you essentialy have to rebuild until you don't find any
references to the old libgcc abi in any binary on your system.
And as stuff happily depends on each other, it's quite a few
rounds of rebuilds until that is achived.

And then you still have to deal with the potential breakage the
new gcc version might cause

Edit: All of this makes me think, that I just don't support Arch Linux in this thread - too much pain ...


RE: New Era: VAAPI with EGL interoperation - Ales - 2015-08-11

There is a crashlog just out of curiosity: http://paste.ubuntu.com/12054504/

I think the issue is in my distro too, just as you said, so I will try to fight with that myself.


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-11

Quote:/home/player/pictures/FOTKY/Balů a Larry/2008/_DSC0025.JPG
Can you rename that folder? :-) from Balů to Balu?


RE: New Era: VAAPI with EGL interoperation - Ales - 2015-08-11

I have tried it just now and it is the same. I appreciate your effort, but it really seems it is in gcc. I will try to downgrade some packages...


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-11

(2015-08-11, 11:49)Ales Wrote: I have tried it just now and it is the same. I appreciate your effort, but it really seems it is in gcc. I will try to downgrade some packages...

Recompile complete packages - this always needs to be done, when libgcc is bumped - I am afraid. Do it 3 to 5 times as mentioned above.


RE: New Era: VAAPI with EGL interoperation - wsnipex - 2015-08-11

(2015-08-11, 11:57)fritsch Wrote:
(2015-08-11, 11:49)Ales Wrote: I have tried it just now and it is the same. I appreciate your effort, but it really seems it is in gcc. I will try to downgrade some packages...

Recompile complete packages - this always needs to be done, when libgcc is bumped - I am afraid. Do it 3 to 5 times as mentioned above.

its only necessary cause gcc 5.2 changed the default c++11 abi


RE: New Era: VAAPI with EGL interoperation - pxpert - 2015-08-12

Hi all! I'm using XBMC, now KODI since a long time.
I came here to try the vaapi accelleration for my brand new asrock motherboard with Celeron N3150.
I'm currently using this configuration:
- Gentoo box w/ kernel 4.1.1-gentoo-r1
- Mesa GIT/SVN/CVS Build 18:08:48 26/07/2015
- x11-base/xorg-server 1.17.1-r1
- x11-drivers/xf86-video-intel GIT/SVN/CVS Build 18:38:31 26/07/2015
- x11-libs/libva GIT/SVN/CVS Build 10:07:51 12/08/2015
- x11-libs/libva-intel-driver GIT/SVN/CVS Build 10:05:51 12/08/2015

and now compiled Kodi using Fernetmenta GIT repo (12/08/2015)

All seems to work correctly, but when I enable vaapi menu, the playback window is totally black and i can only hear the video playing.

This is my log: http://pastebin.com/s9zmvNpw

It seems this is the problem from the log: failed to import VA buffer NV12 into EGL image: 12292

Can you please help me?


PS Long life Gentoo.. and kodi! Smile


RE: New Era: VAAPI with EGL interoperation - wsnipex - 2015-08-12

your mesa is most probably missing the NV12 extension. But since you cut the log, I'm just guessing


RE: New Era: VAAPI with EGL interoperation - fritsch - 2015-08-12

Yeah +1 - the mesa extension is missing. Either build mesa git (master) or pick the patches wsnipex ships in his repository.


RE: New Era: VAAPI with EGL interoperation - Ales - 2015-08-12

(2015-08-11, 11:57)fritsch Wrote: Recompile complete packages - this always needs to be done, when libgcc is bumped - I am afraid. Do it 3 to 5 times as mentioned above.

I have spent few hours of compiling yesterday and it works perfectly again.
Thanks very much!

PS: I'm considering migrating to Ubuntu with this hw. Smile


RE: New Era: VAAPI with EGL interoperation - trsqr - 2015-08-13

I mentioned yesterday that there seems to be some strange behaviour when it comes to memory usage of kodi. With the OpenELEC build from post #2 it crashes after watching n videos (where n seems to be something between 50 and 100 in my system). After each video, kodi seems to consume more memory according to system info page. The system became unusable when memory usage was at 72%.

Then I prepared an ubuntu system according to post #1 and #2. The memory usage is approximately 300 megs when I start kodi. After each video it seems to raise a bit. I took screen shots from the situation and stored them at http://trsqr.net/kodi . Strange thing is, the memory consumption reaches 83% (on my 4GB RAM system that corresponds to Kodi using 3120 MB RAM), but never goes further from that. Also, the system stays completely usable. When I quit Kodi everything is fine and all memory is available. When I start it again, this sequence starts from the beginning.

I did run valgrind with parameters --logfile=filename, --leak-check=full and --undef-value-errors=no, but the results do not show anything. The result is in the text file in the above link.

Another strange thing is, that if I disable VA-API from Kodi settings, the memory usage stays at around 300 megs no matter how many times I watch Big Buck Bunny. With VA-API enabled, it seemed to go up 5-30 MB after each video viewing. It seemed to grow fastest when using the video http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_60fps_normal.mp4 .

dmesg: http://paste.ubuntu.com/12066513/
dpkg -l: http://paste.ubuntu.com/12065976/
vainfo: http://paste.ubuntu.com/12066521/
kodi.log with debugging, watched two movies with VA-API and exited (memory usage was 500 megs at that point): http://paste.ubuntu.com/12066571/

Can I somehow further debug this?