I'm trying to set up lirc on a Pi2 B+ running the latest Raspbian buster and latest kernel / firmware set by rpi-update.

I've started from this HOW-TO.

All I get from

sudo modprobe lirc_rpi


modprobe: FATAL: Module lirc_rpi not found in directory /lib/modules/4.19.79-v7+

How do I get lirc to work?

Thanks in advance for your help!

  • Try find something more recent than 5 years old for an ancient OS.
    – Milliways
    Oct 13, 2019 at 10:39
  • 1
    You should never use rpi-update except you was asked by a developer to do it. It installs unstable kernel and firmware and will potentially increase trouble instead of fixing things.
    – Ingo
    Oct 13, 2019 at 15:01
  • 2
    Possible duplicate of Raspberry Pi 3 not lirc not running/working
    – Ingo
    Oct 15, 2019 at 8:20
  • You're 200% right, I should've paid attention to the date in that tutorial (and in a few others I'd found). I know about the warnings for rpi-update, but already had to use it on another Pi where CIFS connectivity had gotten broken because a user-mode update was depending on something not present in my old kernel.
    – sba923
    Oct 17, 2019 at 19:05

2 Answers 2


It really doesn't help using a tutorial from five years ago on a modern system. Too much has changed.

lirc_rpi has been replaced by dtoverlay=gpio-ir and dtoverlay=gpio-ir-tx in /boot/config.txt. See https://raspberrypi.org/forums/viewtopic.php?t=243583 for more details.



(1) How come LIRC stuff so old, any new tutorials and drivers out there?

(2) How to get LIRC to work in Rpi2B+ buster?


(1) You might find some updated stuff and some get around in Ref 1 below.

(2) The most updated tutorial on LIRC setup is dated 2019aug. I tried it and found it good (Ref 2, Appendix A).

/ to continue, ...


(1) Problem with LIRC on Raspberry Pi 3

(2) Setup LIRC on Rpi - StackfOverlow user1200233, 2019aug

/ to continue, ...


Appendix A - LIRC Mode 2 Command Testing Record

I installed LIRC and tested remote controller OK (Ref 2). Mode 2 command display the pulse space data OK:

$ sudo mode2 -d /dev/lirc0

Using driver default on device /dev/lirc0

Trying device: /dev/lirc0 Using device: /dev/lirc0

Running as regular user pi

space 16777215

pulse 8936

space 4383

pulse 600 ...

End of answer

  • Thanks for the pointers. I'd actually discovered the lirc_rpi -> gpio-ir change (introduced in Stretch? this is where I'd started, and switched to Buster in the hope that it would fix my problem... of course it didn't). Then I'd come across raspberrypi.org/forums/viewtopic.php?p=1475738 so I applied that patch. But now I'm facing the issue described at shallowsky.com/blog/hardware/… and I'm stuck...
    – sba923
    Oct 17, 2019 at 19:09
  • @sba, Another post on IRrecord might be useful to you: raspberrypi.stackexchange.com/questions/104008/…. And as you read in my answers, I found the IRrecord thing messy, tedious. I guess it was developed more that 10 years ago, and not regularly maintained these couple of years. So I gave up LIRC altogether and switched to UART control IR transceiver modules, which are cheap and newbie friendly (no newbie scary daemons! :), ...
    – tlfong01
    Oct 18, 2019 at 1:52
  • Note that my current situation is not that irrecord won't record (IOW generates a file with only 0x0's) but that the file it generates isn't usable. I understand modules such as amazon.fr/… are friendlier to use but they might be restricted to particular IR encodings, and I have no idea if the remote I want to reuse uses NEC codes. FWIW, the goal is to control Kodi with that remote.
    – sba923
    Oct 19, 2019 at 6:23
  • @sba, Ah, so your goal is to control Kodi, with a remote. You might like to let me know the remote you are using. It is very likely using NEC codes.
    – tlfong01
    Oct 19, 2019 at 6:30
  • @sba, you might like to let me know which remote you are using, or give me a link to it: (1) Kodi Remote: The 10 Best Ways to Control Kodi From Your Couch - Christian Cawley 2019aug19 makeuseof.com/tag/kodi-remote-control
    – tlfong01
    Oct 19, 2019 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.