[SOLVED] Gpio IR remote still doesn't work

I try to make Osmc work with a remote,
normally i’m pretty sure that’s a simple thing to do , but in my case, it seem complicated.

My config :

  • Raspberry Pi 2
  • Last Osmc release.

What i have done :

  • Activate Gpio in OSMC ( my config.txt have this line : dtoverlay=lirc-rpi:gpio_out_pin=17,gpio_in_pin=18)
  • Activate my remote ( a simple apple silver)

After a reboot, the remote doesn’t work.

I read lot of on this forum, so i tried to understand the problem :

  • Stop OSMC. sudo service mediacenter stop
  • Add manually the module : sudo modprobe lirc_rpi
  • Try to see if that work in command line by : mode2 -d /dev/lirc0

And that work !

But that’s still doesn’t work on OSMC, and the socket is not the same as Kodi :

  • Lirc : /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd-lirc0 --pidfile=/var/run/lirc/lircd-lirc0.pid /etc/lirc/lircd.conf
  • Kodi : /usr/lib/kodi/kodi.bin --standalone -fs --lircdev /var/run/lirc/lircd

The only change i made in my OSMC is change the kernel for work with my touchscreen.

And another thing is that when i try to launch manually Lirc with the correct socket i have an error :

  • sudo /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd.pid /etc/lirc/lircd.conf

could not open uinput
No such file or directory

If anyone understand the problem, please help :wink:
Ps : Sorry for my english, i’m french.

No need to manually modprobe lirc_rpi - if you have the dtoverlay in config.txt the module will load automatically. That’s the point of kernel overlays.

All mode2 proves is that your GPIO receiver is receiving something, and that lirc_rpi is loaded. It doesn’t prove that you have the correct lircd.conf or that the data it is receiving is usable. Kodi will only respond if there is a suitable lircd.conf to decode the remote’s IR pulses into key codes.

This is perfectly normal - we use eventlircd, so lircd sends key uinput events to eventlircd, which then sends them to Kodi via the /var/run/lirc/lircd lirc socket.

Yes, because you’re trying to launch lircd with an output socket that is already in use by eventlircd. Don’t do that.

First thing I would check is run:

irw /var/run/lirc/lircd-lirc0

And see if you get any response when pressing remote buttons. If not check your lircd.conf again. If you do try:

irw /var/run/lirc/lircd

You should also see a response here too.

If you are still having problems please post full debug logs.

Thanks for the reply,
If i try to do :
mode2 -d /dev/lirc0
without modprode before i have this answer :

mode2: could not get file information for /dev/lirc0
mode2: default_init(): No such file or directory

So i can understand that my overlay isn’t load at boot ?

And if i do : irw /var/run/lirc/lircd-lirc0 or irw /var/run/lirc/lircd i have the same response :
connect: No such file or directory

But if i do sudo modprobe lirc_rpi, the mode2 command work with push and space and the command irw /var/run/lirc/lircd-lirc0 return good values, but not the command irw /var/run/lirc/lircd, same problem of socket like explain before.

debug log file : http://paste.osmc.io/ozetoneber.vhdl][1]
[1]: http://paste.osmc.io/ozetoneber.vhdl

And this is my config.txt

hdmi_cvt 800 480 60 6 0 0 0

Thanks by advance.


A Kodi log doesn’t help for this issue, when I said debug logs I mean full debug logs from the My OSMC log uploader including the system journal.

Are you running the standard OSMC kernel or have you tried to run something like rpi-update ? Because your dtoverlay line is correct so the module should load. If it doesn’t there may be a problem with your kernel, perhaps due to a failed update.

Without the correct logs it’s impossible to know.

BTW, you have your Pi 2 running with sdram_freq=500 - this is know to be unstable on most Pi 2’s. Please drop this to 450 and see if you are still having issues.

Also is there some particular reason why you dropped the gpu memory allocation from 256 to 128 ?

Hi DbMandrake
Thanks again for the quick reply :wink:

I found the issue, it’s the custom kernel and /lib/modules of my touchscreen who cause the problem.
I restart on a fresh install without the custom kernel and modules and i think all work fine.

for the config, i put the raspberry in turbo without understand the change in the config.txt.
Thanks for the advice and the help.

All work in my fresh install,
but without the custom kernel and /lib/modules i don’t have touchscreen event
This is this screen :

So i have the ir remote but not the touchscreen. :sweat_smile: