I struggled this problem sometime and I believe I found the solution but it is possible it is only my case. I had stuttering unless OSD is on several days after updating Kodi to 17. I checked many parameters with no result. Deep debugging shows that Kodi uses OpenGL libraries and there was the problem. I use usual Intel videocard which uses i915 driver so OpenGL works thru MESA.
glxinfo said:
Code:
direct rendering: No
OpenGL version string: 1.4 Mesa 17.2.3
I was pretty surprised. Why 1.4 and where is DRI? The answer is
here. Intel driver i915 by default drops GL version to 1.4 and make it adequate is quite tricky: you have to add next lines to /etc/drirc
Code:
<driconf>
...
<device driver="i915">
<application name="all">
<option name="stub_occlusion_query" value="true" />
<option name="fragment_shader" value="true" />
</application>
</device>
...
</driconf>
and reboot. The problem solved - no more stuttering.
WARNING #1: If you have Optimus and use i915 instead of nvidia make sure that while nvidia is not used OpenGL uses proper GL, GLX and DRI libraries. It could be checked by
ldd /usr/bin/glxinfo. The output must not contain nvidia's GL, GLX and DRI libraries.
WARNING #2: For smooth playing some videos Kodi may require enabling of MESA VA-API MPEG4 support which is disabled by default. You could turn it on by setting environment variable VAAPI_MPEG4_ENABLED=1
Here is full list of environment variables of MESA.