[SOLVED][RC][LIRCD] how to disable lircd

As I don’t use LIRC on my install (only wireless remote that show up as keyboard) I wonder if there is a way to disable lircd to save some resources?

Lircd is loaded on demand by udev, so it will only load if there is a compatible device connected.

In any case the resources it uses are very minimal.

Thanks for the explanation. I agree that the resources are minimal but every byte counts :slight_smile:
Just wondering what on my RasPI is causing the Lircd to be loaded, or is CEC managed via Lircd?

CEC is not managed by Lirc, no. It is handled directly by Kodi, so it won’t be that.

I don’t suppose you turned on GPIO remote support in OSMC settings ? That will cause the lirc_rpi driver to load at boot and this will cause lircd to run, even if you’re not actively using a GPIO receiver.

Other than that you would need to check the system journal (sudo journalctl) to see what device was causing lircd to load. There should be an entry for lircd_helper saying what caused it to load. Here is an example of lircd_helper loading due to GPIO being enabled:

Mar 16 11:45:31 osmc kernel: lirc_dev: IR Remote Control driver registered, major 246
Mar 16 11:45:31 osmc kernel: lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
Mar 16 11:45:31 osmc net.agent[161]: ERROR: /sbin/ifup not found. You need to install the ifupdown package.
Mar 16 11:45:31 osmc net.agent[163]: net.agent add event for eth0 not handled.
Mar 16 11:45:32 osmc kernel: FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Mar 16 11:45:32 osmc rpcbind[169]: Starting rpcbind daemon....
Mar 16 11:45:32 osmc rpc.statd[189]: Version 1.2.8 starting
Mar 16 11:45:32 osmc sm-notify[190]: Version 1.2.8 starting
Mar 16 11:45:32 osmc kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Mar 16 11:45:32 osmc kernel: lirc_rpi: auto-detected active low receiver on GPIO pin 18
Mar 16 11:45:32 osmc kernel: lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
Mar 16 11:45:32 osmc kernel: lirc_rpi: driver registered!
Mar 16 11:45:32 osmc lircd_helper[202]: ACTION add
Mar 16 11:45:32 osmc lircd_helper[203]: lircd_driver default
Mar 16 11:45:32 osmc nfs-common[184]: Starting NFS common utilities: statd idmapd.
Mar 16 11:45:32 osmc lircd_helper[205]: DEVNAME /dev/lirc0
Mar 16 11:45:32 osmc lircd_helper[224]: add/change devname_instance lirc0

Hi DBMandrake,

once again many thanks for your detailed feedback.
Actually based on the logfile the lirc_rpi module is not loaded. I was actually not referring to the module when I was talking about the resource but about /usr/sbin/eventlircd which I can see in the process list using a small amount of memory. But if I don’t have a lircd module I assume I also have no need for an eventlircd.



eventlircd is a separate daemon to lircd and runs at boot and acts as a uinput “aggregater”. It is not used just with lircd, but also with kernel mode remote control drivers. So for some types of remotes eventlircd is required even through lircd may not be.

If you disable eventlircd all remote controls except for CEC will stop working. (Remotes that are really just keyboard devices will still work, such as flirc, and some USB mediacenter remotes) You can disable it with

sudo systemctl disable eventlircd.service

But this is not recommended and has not been tested by us to any degree.

1 Like

@DBMandrake, once more many thanks for the detailed explanation. I am very happy that you explain all the details instead of just saying that it is needed.
Looking at the small footprint of eventlircd and a potential break of something in the future I will leave it untouched for the time being.

It seems in my case this lircd is the top CPU and memory eater:

735 pi 20 0 570436 88532 44140 S 13.3 11.5 109:55.28 0 /usr/lib/arm-linux-gnueabihf/kodi/kodi_v7.bin --lircdev /var/run/lirc/lircd
465 root 20 0 160692 42032 26388 S 0.0 5.5 0:35.30 1 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

So I rather get rid of it if I don’t need it.

It’s not lircd taking the memory but Kodi and without Kodi you would not have anything.
Looks like you are on a apple TV I don’t think there is much hope for a performant system anymore

I’ll only chime in to say that I have done this Not Recommended Thing and haven’t had any issues (I’m using a FLIRC to do the remote stuff). The only reason I did it though is because while running the still test versions of OSMC with Kodi 18 my remote (which I had been using with the built in IR) started behaving strangely, and to fix it I needed access to the remote section of MyOSMC (which doesn’t yet work on the Kodi 18 test builds). So I disabled LIRC and plugged my FLIRC in. Unless you’re having a specific problem I definitely wouldn’t recommend it, but with N=1 it looks to me that it probably won’t cause problems.