How to completely disable IR remote button in kodi

Now what? You don’t see correct /dev/input device?

Sorry @vpeter, yes I don’t see any names there:
cat /storage/.kodi/temp/kodi.log | grep -i input

2025-07-30 13:42:09.186 T:1424    debug <general>: CAddonInfoBuilder::ParseXMLTypes: Binary addon found: inputstream.adaptive
2025-07-30 13:42:09.231 T:1424     info <general>: Addon Mananger: Found addon: 'inputstream.adaptive v22.2.6.1'
2025-07-30 13:42:09.233 T:1424     info <general>: Addon Mananger: Found addon: 'kodi.binary.instance.inputstream v3.3.0'
2025-07-30 13:42:09.419 T:1424    debug <general>: libinput: event11: device is ignored
2025-07-30 13:42:09.423 T:1424    debug <general>: libinput: event9: device is ignored
2025-07-30 13:42:09.523 T:1424  warning <general>: CLibInputKeyboard::CLibInputKeyboard(): Failed to compile localized compose table, composed key support will be disabled
2025-07-30 13:42:09.564 T:1430    debug <general>: Thread libinput start, auto delete: false
2025-07-30 13:42:09.564 T:1424    debug <general>: [threads] name: 'libinput' priority: '1'
2025-07-30 13:42:09.635 T:1429     info <general>: * Adding remote mapping for device 'linux-input-layer'
2025-07-30 13:42:09.635 T:1429     info <general>: * Linking remote mapping for 'linux-input-layer' to 'cx23885_remote'
2025-07-30 13:42:09.635 T:1429     info <general>: * Adding remote mapping for device 'devinput'
2025-07-30 13:42:09.635 T:1429     info <general>: * Adding remote mapping for device 'devinput-32'
2025-07-30 13:42:09.635 T:1429     info <general>: * Adding remote mapping for device 'devinput-64'
2025-07-30 13:42:09.639 T:1429     info <general>: * Adding remote mapping for device 'linux-input-layer'
2025-07-30 13:42:09.639 T:1429     info <general>: * Linking remote mapping for 'linux-input-layer' to 'cx23885_remote'
2025-07-30 13:42:09.639 T:1429     info <general>: * Adding remote mapping for device 'devinput'
2025-07-30 13:42:09.639 T:1429     info <general>: * Adding remote mapping for device 'devinput-32'
2025-07-30 13:42:09.640 T:1429     info <general>: * Adding remote mapping for device 'devinput-64'
2025-07-30 13:42:09.765 T:1430    debug <general>: CLibInputHandler::DeviceAdded - keyboard type device added: input_btrcu (event3)
2025-07-30 13:42:09.765 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - could not get key repeat for event3 (Function not implemented)
2025-07-30 13:42:09.765 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - delay: 400ms repeat: 80ms for input_btrcu (event3)
2025-07-30 13:42:09.765 T:1430    debug <general>: CLibInputHandler::DeviceAdded - keyboard type device added: input_ethrcu (event2)
2025-07-30 13:42:09.765 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - could not get key repeat for event2 (Function not implemented)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - delay: 400ms repeat: 80ms for input_ethrcu (event2)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputHandler::DeviceAdded - keyboard type device added: XING WEI 2.4G USB USB Composite Device (event4)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - delay: 500ms repeat: 33ms for XING WEI 2.4G USB USB Composite Device (event4)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputHandler::DeviceAdded - pointer type device added: XING WEI 2.4G USB USB Composite Device Mouse (event5)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputHandler::DeviceAdded - pointer type device added: XING WEI 2.4G USB USB Composite Device Consumer Control (event6)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputHandler::DeviceAdded - keyboard type device added: XING WEI 2.4G USB USB Composite Device Consumer Control (event6)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - could not get key repeat for event6 (Function not implemented)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - delay: 400ms repeat: 80ms for XING WEI 2.4G USB USB Composite Device Consumer Control (event6)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputHandler::DeviceAdded - keyboard type device added: XING WEI 2.4G USB USB Composite Device System Control (event7)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - could not get key repeat for event7 (Function not implemented)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - delay: 400ms repeat: 80ms for XING WEI 2.4G USB USB Composite Device System Control (event7)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputHandler::DeviceAdded - keyboard type device added: vad_keypad (event1)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - could not get key repeat for event1 (Function not implemented)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - delay: 400ms repeat: 80ms for vad_keypad (event1)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputHandler::DeviceAdded - keyboard type device added: cec_input (event0)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - could not get key repeat for event0 (Function not implemented)
2025-07-30 13:42:09.766 T:1430    debug <general>: CLibInputKeyboard::GetRepeat - delay: 400ms repeat: 80ms for cec_input (event0)
2025-07-30 13:42:10.261 T:1443    debug <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 2 Output Channel Count: 2
2025-07-30 13:42:10.350 T:1424    debug <general>: LocalizeStrings: loaded 73 strings from file /storage/.kodi/addons/inputstream.adaptive/resources/language/resource.language.en_gb/strings.po
2025-07-30 13:42:14.440 T:1424     info <general>: Loading skin file: Custom_1104_PVRChannelNumberInput.xml, load type: LOAD_ON_GUI_INIT
2025-07-30 13:46:04.480 T:1429    debug <general>: LIRC: - NEW 160 0 KEY_OK devinput (KEY_OK)

etc

Install system tools addon and there is a command line tool evtest. There are all inputs listed. I doubt that yours would not be.

Stop kodi before you run evtest and evtest will print you keys pressed.

evtest

<snip>
Testing ... (interrupt to exit)
***********************************************
  This device is grabbed by another process.
  No events are available to evtest while the
  other grab is active.
  In most cases, this is caused by an X driver,
  try VT-switching and re-run evtest again.
  Run the following command to see processes with
  an open fd on this device
 "fuser -v /dev/input/event9"
***********************************************
q^C
:~ # fuser -v /dev/input/event9
fuser: invalid option -- 'v'
BusyBox v1.37.0 (2025-07-31 01:44:17 IDT) multi-call binary.

Usage: fuser [-msk46] [-SIGNAL] FILE or PORT/PROTO

Find processes which use FILEs or PORTs

        -m      Find processes which use same fs as FILEs
        -4,-6   Search only IPv4/IPv6 space
        -s      Don't display PIDs
        -k      Kill found processes
        -SIGNAL Signal to send (default: KILL)
:~ # fuser /dev/input/event9
510 539

I had to kill these two processes so I didn’t get the message that the device was grabbed:
539 root 0:00 /usr/lib/systemd/systemd-logind
510 root 0:00 /usr/sbin/eventlircd -f --evmap=/etc/eventlircd.d --socket=/run/lirc/lircd
but then it worked:
evtest

No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      cec_input
/dev/input/event1:      vad_keypad
/dev/input/event11:     meson-ir
/dev/input/event2:      input_ethrcu
/dev/input/event3:      input_btrcu
/dev/input/event4:      XING WEI 2.4G USB USB Composite Device
/dev/input/event5:      XING WEI 2.4G USB USB Composite Device Mouse
/dev/input/event6:      XING WEI 2.4G USB USB Composite Device Consumer Control
/dev/input/event7:      XING WEI 2.4G USB USB Composite Device System Control
/dev/input/event8:      XING WEI 2.4G USB USB Composite Device
/dev/input/event9:      Media Center Ed. eHome Infrared Remote Transceiver (0471:060c)
Select the device event number [0-11]: 9
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x471 product 0x60c version 0x101
Input device name: "Media Center Ed. eHome Infrared Remote Transceiver (0471:060c)"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 28 (KEY_ENTER)
    Event code 103 (KEY_UP)
    Event code 105 (KEY_LEFT)
    Event code 106 (KEY_RIGHT)
    Event code 108 (KEY_DOWN)
    Event code 111 (KEY_DELETE)
    Event code 113 (KEY_MUTE)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 119 (KEY_PAUSE)
    Event code 128 (KEY_STOP)
    Event code 142 (KEY_SLEEP)
    Event code 161 (KEY_EJECTCD)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 167 (KEY_RECORD)
    Event code 168 (KEY_REWIND)
    Event code 174 (KEY_EXIT)
    Event code 207 (KEY_PLAY)
    Event code 208 (KEY_FASTFORWARD)
    Event code 210 (KEY_PRINT)
    Event code 212 (KEY_CAMERA)
    Event code 224 (KEY_BRIGHTNESSDOWN)
    Event code 225 (KEY_BRIGHTNESSUP)
    Event code 226 (KEY_MEDIA)
    Event code 352 (KEY_OK)
    Event code 356 (KEY_POWER2)
    Event code 358 (KEY_INFO)
    Event code 365 (KEY_EPG)
    Event code 366 (KEY_PVR)
    Event code 368 (KEY_LANGUAGE)
    Event code 369 (KEY_TITLE)
    Event code 370 (KEY_SUBTITLE)
    Event code 372 (KEY_ZOOM)
    Event code 373 (KEY_MODE)
    Event code 377 (KEY_TV)
    Event code 385 (KEY_RADIO)
    Event code 386 (KEY_TUNER)
    Event code 387 (KEY_PLAYER)
    Event code 389 (KEY_DVD)
    Event code 392 (KEY_AUDIO)
    Event code 393 (KEY_VIDEO)
    Event code 398 (KEY_RED)
    Event code 399 (KEY_GREEN)
    Event code 400 (KEY_YELLOW)
    Event code 401 (KEY_BLUE)
    Event code 402 (KEY_CHANNELUP)
    Event code 403 (KEY_CHANNELDOWN)
    Event code 407 (KEY_NEXT)
    Event code 412 (KEY_PREVIOUS)
    Event code 425 (KEY_PRESENTATION)
    Event code 430 (KEY_MESSENGER)
    Event code 512 (KEY_NUMERIC_0)
    Event code 513 (KEY_NUMERIC_1)
    Event code 514 (KEY_NUMERIC_2)
    Event code 515 (KEY_NUMERIC_3)
    Event code 516 (KEY_NUMERIC_4)
    Event code 517 (KEY_NUMERIC_5)
    Event code 518 (KEY_NUMERIC_6)
    Event code 519 (KEY_NUMERIC_7)
    Event code 520 (KEY_NUMERIC_8)
    Event code 521 (KEY_NUMERIC_9)
    Event code 522 (KEY_NUMERIC_STAR)
    Event code 523 (KEY_NUMERIC_POUND)
  Event type 2 (EV_REL)
    Event code 0 (REL_X)
    Event code 1 (REL_Y)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    500
    Repeat code 1 (REP_PERIOD)
      Value    125
Properties:
  Property type 5 (INPUT_PROP_POINTING_STICK)
Testing ... (interrupt to exit)
Event: time 1753953644.231697, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f0410
Event: time 1753953644.231697, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1753953644.231697, -------------- SYN_REPORT ------------
Event: time 1753953644.337598, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f0410
Event: time 1753953644.337598, -------------- SYN_REPORT ------------
Event: time 1753953644.444599, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f0410
Event: time 1753953644.444599, -------------- SYN_REPORT ------------
Event: time 1753953644.580275, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 1753953644.580275, -------------- SYN_REPORT ------------
Event: time 1753953678.641595, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f0417
Event: time 1753953678.641595, type 1 (EV_KEY), code 167 (KEY_RECORD), value 1
Event: time 1753953678.641595, -------------- SYN_REPORT ------------
Event: time 1753953678.748663, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f0417
Event: time 1753953678.748663, -------------- SYN_REPORT ------------
Event: time 1753953678.854661, type 4 (EV_MSC), code 4 (MSC_SCAN), value 800f0417
Event: time 1753953678.854661, -------------- SYN_REPORT ------------
Event: time 1753953678.988281, type 1 (EV_KEY), code 167 (KEY_RECORD), value 0
Event: time 1753953678.988281, -------------- SYN_REPORT ------------

So it was /dev/input/event9 but being hogged by /usr/sbin/eventlircd and /usr/lib/systemd/systemd-logind.

I don’t have a strong understanding of how it all fits together, but I think I need to get them to not take control of the device (or kill them?) so I can then run input_keys_eater and then start irexec and then start kodi.

What do you think would be the best way to achieve all this? Is it safe to just kill those processes? Can I do it safely all in autostart.sh?

My current autostart.sh:

#!/bin/sh

(
sleep 20
irexec -d /storage/.config/irexec.lircrc
)&

2025-07-30 13:42:09.423 T:1424 debug <general>: libinput: event9: device is ignored

yes, ignored by kodi.

Need to think how all this works.

If you stop eventlircd service and then restart kodi does remote work as it should?

systemctl stop kodi
systemctl stop eventlircd
systemctl start kodi

Interesting. So it says it’s ignoring that input but isn’t!

Can’t test right now will get back to it later on.

1 Like

I think without eventlircd your irexec will also not work.

You could try this

systemctl stop kodi
systemctl stop eventlircd
killall -9 irexec
./input_keys_eater /dev/input/event9 KEY_VOLUMEUP,KEY_VOLUMEDOWN
systemctl start eventlircd
systemctl start kodi
irexec -d /storage/.config/irexec.lircrc

You will have to play a little with some combinations. Main one is if eventlircd is needed or not.

The remote does not work in kodi in this case.

I just had quite a go at it, I wrote a script but it doesn’t work:

─
#!/usr/bin/env bash

systemctl stop kodi && echo stopped kodi...
systemctl stop eventlircd && echo stopped eventlircd...
killall -9 irexec && echo killed irexec
killall -9 input_keys_eater && echo killed input_keys_eater

#/storage/.config/input_keys_eater /dev/input/event9 KEY_VOLUMEUP,KEY_VOLUMEDOWN,KEY_MUTE,KEY_RECORD,KEY_EJECTCD &
/storage/.config/input_keys_eater /dev/input/event9 KEY_VOLUMEUP,KEY_VOLUMEDOWN &
echo started input_keys_eater
irexec -d /storage/.config/irexec.lircrc && echo started irexec
systemctl start eventlircd && echo started eventlircd
systemctl start kodi && echo started kodi

I don’t think it’s a solvable problem because input_keys_eater gives the error “Failed to grab device: Device or resource busy” if irexec is running, so I can’t start irexec before input_keys_eater, but I must start irexec before input_keys_eater because otherwise irexec doesn’t see the volume keys because they get eaten!

Also, not that important because it isn’t working anyway, but I would actually need the keys KEY_MUTE,KEY_RECORD,KEY_EJECTCD added to input_keys_eater as well, because my irexec uses those as well.

I’m not sure how to proceed, but I do appreciate very much your work at this puzzle for me.

Will try to make similar setup here so I could test myself. This way it’s much faster :slight_smile:

Once again, thanks for your efforts.

“Normies” would think this is a crazy amount of effort to put into just getting volume keys to not stop the screensaver, but I always end up learning things from the experience even if it isn’t successful in the end.

Sadly I can’t replicate this setup because I don’t have any USB receiver. The build-in ir remote works differently because irw doesn’t show any key. Only keytable -t.

Also don’t really understand how kodi get keys. I assume through lirc which means not easy to discharge some keys like I want.

I think that’s correct. At least the keys being stored in Lircmap.xml is a strong indicator in that direction.

In any case, thank you so much for your efforts!