Kodi Community Forum

Full Version: Lirc support broken in Leia ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I've been using Kodi 17 for a while, using Debian's package and it worked fine but I wanted to get better support for HEVC and 4K with VAAPI so I did compile Kodi Leia yesterday using the git repo (I'm at commit 3af76f1).
I know that using Kodi's master branch or nightlies comes with risks and is unsupported, but I just wanted to know if there is any ongoing Lirc problems right now?
I can't make Lirc work with this version, whereas it worked fine on Krypton.

Irw works fine:
html:
htpc ~ $ irw
000000037ff07bdf 00 LEFT mceharmony
000000037ff07be0 00 DOWN mceharmony
000000037ff07bed 00 CHANNELUP mceharmony
000000037ff07bdb 00 MENU mceharmony

I use the same profile as with Kodi 17 with my Lircmap.xml and keymaps/remote.xml files. They used to work fine and I don't see any issue in it.
But when I start Kodi (even with --debug), I don't have any log line about lirc (absolutely none) and pressing any button on the remote doesn't have any effect on the UI nor the log.

I tried some stuff with no success:
html:
systemctl stop lircd-uinput.service
systemctl disable lircd-uinput.service
then restart lircd and kodi: nothing changed

Adding this in kodi-standalone script (I'm using Kodi in standalone mode and /var/run/lirc/lircd exists):
html:
export LIRC_SOCKET_PATH=/var/run/lirc/lircd

and even changing the $APP line with:
html:
LIRC_SOCKET_PATH=/var/run/lirc/lircd $APP

Then restart Kodi. This had absolutely no effect.

So, did something changed for Lirc in Leia or have I done something wrong?
Maybe there's a compilation option but the new build tutorial doesn't state any ./configuration step.

Also, Kodi never stops when I stop lightdm, a gentle kill on kodi and kodi-x11 doesn't kill kodi-x11, I need to issue a kill -9 kodi-x11.
If anyone has a clue about that, I'd appreciate.

Thanks! Smile
Ok so, posting a thread cleared my mind. I found the problem: liblirc-dev was not installed on my computer.

I did not check the configure result yesterday:
html:
-- Could NOT find LircClient (missing:  LIRCCLIENT_LIBRARY LIRCCLIENT_INCLUDE_DIR)

This is better:
html:
$ apt-get install liblirc-dev
$ cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local
...
-- Found LircClient: /usr/lib/x86_64-linux-gnu/liblirc_client.so
...
-- LIRCCLIENT enabled: Yes

As for the stopping issue, I'm trying the tag 18.0b2-Leia to see if it helps.
Ok Lirc works fine now !

But I still have the issue where kodi-x11 doesn't stop unless I issue a kill -9 Sad
The only thing I see when stopping lightdm is this:
html:
17:16:33.277 T:140334072654208   ERROR: CPythonInvoker(0, /home/salon/.kodi/addons/script.common.plugin.cache/default.py): script didn't stop in 5 seconds - let's kill it

Also, while building Kodi 18, I had to make a small modification to VaapiEGL.cpp because my kernel doesn't know DRM_FORMAT_GR1616 (latest Debian stable kernel is 4.9 and DRM_FORMAT_GR1616 appears in 4.11):
cpp:
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VaapiEGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VaapiEGL.cpp
index 35113d6421..b0a550c269 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VaapiEGL.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VaapiEGL.cpp
@@ -439,7 +439,7 @@ bool CVaapi1Texture::TestInteropDeepColor(VADisplay vaDpy, EGLDisplay eglDisplay
     {
       EGLImageKHR eglImage;
       EGLint attribs = {
-        EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_GR1616,
+        EGL_LINUX_DRM_FOURCC_EXT, fourcc_code('G', 'R', '3', '2'),
         EGL_WIDTH, (image.width + 1) >> 1,
         EGL_HEIGHT, (image.height + 1) >> 1,
         EGL_DMA_BUF_PLANE0_FD_EXT, static_cast<EGLint> (bufferInfo.handle),
Install libdrm-dev from stretch-backports.
Thanks that solved the DRM_FORMAT_GR1616 thing.

The only issue left is that kodi-x11 doesn't stop when I stop lightdm. But when I stop Kodi from Kodi's menu it all stops correctly. I can live with that and Kodi is meant to be always running on my HTPC anyway Smile
I don't know about Debian but someone pointed this article out to me, and this is what finally helped me get LIRC installed in Ubuntu 18.04. The method shown here probably won't work exactly as described in Debian, but it might give you some ideas.

Make LIRC work in Ubuntu 18.04, so that you can use your infrared remote in Kodi

You said you found a solution but I wonder if it is working right for you, I have seen several other solutions where Kodi responds slowly to button presses or not at all to some buttons.  The method shown in that article was the only way I could get my remote working 100%.  In fact until I did what that article suggests I could not even get LIRC to show me its configuration screen.  Even running "sudo dpkg-reconfigure lirc" didn't work.

Also I see there is now another LIRC-related article on that site, Extending the remote control capabilities of LIRC, which looks possibly rather useful.
Thanks but Lirc works perfectly for me now. I use the driver uirt2_raw and have this USB UIRT receiver/transmitter : https://www.csquad.org/2009/04/30/config...-gnulinux/