I have tried to set up LIRC with Raspberry PI 2B for a couple of days now with no luck. The receiver works fine, but not the IR emitter. This is what I figured out, if I turned off device tree with "device_tree=" in config.txt, LIRC works fine with the right pin assignment.

sudo cat /sys/kernel/debug/gpio
[sudo] password for root: 
GPIOs 0-53, bcm2708_gpio:
 gpio-17  (lirc_rpi ir/out     ) in  lo    
 gpio-18  (lirc_rpi ir/in      ) in  lo    
 gpio-47  (led0                ) out lo  

and following is when I leave the device tree on:

sudo cat /sys/kernel/debug/gpio
[sudo] password for root: 
GPIOs 0-53, platform/3f200000.gpio, pinctrl-bcm2835:
 gpio-35  (?                   ) in  hi    
 gpio-47  (?                   ) out lo 

Does anyone have any advice? I need the device tree on since it is required for the touch display to work.

  • What device tree settings have you put in /boot/config.txt for LIRC?
    – joan
    Oct 22, 2015 at 11:46

1 Answer 1


I haven't used lirc but I can quote you some stuff that you should be able to find in /boot/overlays/README:

Overlays are loaded using the "dtoverlay" directive. As an example, consider the popular lirc-rpi module, the Linux Infrared Remote Control driver. In the pre-DT world this would be loaded from /etc/modules, with an explicit "modprobe lirc-rpi" command, or programmatically by lircd. With DT enabled, this becomes a line in config.txt:


This causes the file /boot/overlays/lirc-rpi-overlay.dtb to be loaded. By default it will use GPIOs 17 (out) and 18 (in), but this can be modified using DT parameters:


You can have multiple dtoverlay lines; if there is a conflict I think the one that's later in config.txt will take precedence. So as long as the right gpios are used in each case, you should be able to do this with the touchscreen.

  • that's how I works in jessie for me. I can't tell if it's still valid for stretch.
    – sparkie
    Dec 3, 2017 at 16:02

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.