# LIRC Remote Button Presses Repeat Until Process is Killed

**URL:** <https://forums.plex.tv/t/lirc-remote-button-presses-repeat-until-process-is-killed/799814>\
**Category:** Plex Players\
**Tags:** plex-htpc\
**Created:** [July 6, 2022, 7:58pm UTC](https://forums.plex.tv/t/lirc-remote-button-presses-repeat-until-process-is-killed/799814 "2022-07-06T19:58:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![defender](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/defender/32/256_2.png) [@defender](https://forums.plex.tv/u/defender)\
**Post date:** [July 6, 2022, 7:58pm UTC](https://forums.plex.tv/t/lirc-remote-button-presses-repeat-until-process-is-killed/799814/1 "2022-07-06T19:58:17Z")

</div>

Hi folks 🙂

I had a similar issue with PLEX Media Player which was related to missing “UP” presses after a “DOWN” press. I could fix this by using `lircd-uinput` and the `release_suffix=_LIRCUP` option but this does not seem to be working.

LIRC is working fine with KODI and my own applications. Is there a new suffix I need to use?

I tried in vain with `:1` and `:2` as the suffix. I fully expected that to fail but I tried it anyway.

Currently, I am using the LIRC `devinput` driver but I also have a configuration for the `default` driver. I have an MCEUSB remote.

```auto
Jul 06, 2022 15:37:55.788 [HASH] INFO - Starting Plex HTPC version: 1.20.1.3105-ac120bc6
Jul 06, 2022 15:37:55.788 [HASH] INFO - Running on: Ubuntu Core 20 [5.18.9-200.fc36.x86_64] x86_64
Jul 06, 2022 15:37:55.788 [HASH] INFO - Happy Plexing!

```

```auto
Jul 06, 2022 15:38:01.258 [sorry_buddy] INFO - [Web] [AppSplash] Destroying splash screen.
Jul 06, 2022 15:38:02.889 [sorry_buddy] INFO - LIRC Got Key : KEY_OK, repeat count: 0, from remote devinput-32
Jul 06, 2022 15:38:02.889 [sorry_buddy] DEBUG - [InputManager] Input received: source: LIRC keycode: KEY_OK:0
Jul 06, 2022 15:38:02.889 [sorry_buddy] DEBUG - [InputManager] Emit input action: ["enter"]
Jul 06, 2022 15:38:02.889 [sorry_buddy] INFO - [InputManager] [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.523 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.523 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.581 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.581 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.641 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.641 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.701 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.701 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.704 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:03:703 [defender:redacted] INFO [UserManager] Switching to user: defender
Jul 06, 2022 15:38:03.761 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.761 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.762 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:03:761 [defender:redacted] DEBUG Blocked key undefined
Jul 06, 2022 15:38:03.821 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.821 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.823 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:03:822 [defender:redacted] DEBUG Blocked key undefined
Jul 06, 2022 15:38:03.858 [sorry_buddy] ERROR - [Web] 06/03/2022 15:38:03:858 [defender:redacted] WARN Failed to switch user: [UserManager] Could not switch with given pin code to user defender
Jul 06, 2022 15:38:03.881 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.881 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:03.945 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:03.945 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.005 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.005 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.065 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.065 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.067 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:04:066 [defender:redacted] INFO [UserManager] Switching to user: defender
Jul 06, 2022 15:38:04.129 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.129 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.131 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:04:130 [defender:redacted] DEBUG Blocked key undefined
Jul 06, 2022 15:38:04.189 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.189 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.190 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:04:190 [defender:redacted] DEBUG Blocked key undefined
Jul 06, 2022 15:38:04.206 [sorry_buddy] ERROR - [Web] 06/03/2022 15:38:04:205 [defender:redacted] WARN Failed to switch user: [UserManager] Could not switch with given pin code to user defender
Jul 06, 2022 15:38:04.249 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.249 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.309 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.309 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.369 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.369 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.433 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.433 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.435 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:04:434 [defender:redacted] INFO [UserManager] Switching to user: defender
Jul 06, 2022 15:38:04.493 [sorry_buddy] DEBUG - Emit input action (autorepeat): ["enter"]
Jul 06, 2022 15:38:04.493 [sorry_buddy] INFO - [InputConnector] Sending actions to UI: ["enter"]
Jul 06, 2022 15:38:04.495 [sorry_buddy] INFO - [Web] 06/03/2022 15:38:04:494 [defender:redacted] DEBUG Blocked key undefined

```

---

<div class="post-metadata">

**Author:** ![gbooker02](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gbooker02/32/9726_2.png) [@gbooker02](https://forums.plex.tv/u/gbooker02)\
**Post date:** [July 7, 2022, 4:10pm UTC](https://forums.plex.tv/t/lirc-remote-button-presses-repeat-until-process-is-killed/799814/2 "2022-07-07T16:10:35Z")

</div>

> [@defender](#):
>
> Is there a new suffix I need to use?

`_LIRCUP` is the expected suffix. Likely you don’t have `release` set to `true`.

Use `nc -U /run/lirc/lircd` to see the commands on the socket. Make sure the `_LIRCUP` is being sent.

> [@defender](#):
>
> `[sorry_buddy]`

These are thread IDs. Mangling useful information in logs like this renders them useless.

---

<div class="post-metadata">

**Author:** ![defender](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/defender/32/256_2.png) [@defender](https://forums.plex.tv/u/defender)\
**Post date:** [July 7, 2022, 4:46pm UTC](https://forums.plex.tv/t/lirc-remote-button-presses-repeat-until-process-is-killed/799814/3 "2022-07-07T16:46:13Z")

</div>

> [@gbooker02](#):
>
> > [@defender](#):
> >
> > `[sorry_buddy]`
> 
> These are thread IDs. Mangling useful information in logs like this renders them useless.

I apologize. I value my privacy and security. I did not know if your logs were sanitized or not and I like to be cautious. Frequently, logs contain personal information.

Trying to sanitize my logs that are posted in a public forum is not useless to me. 🙂

> [@gbooker02](#):
>
> `_LIRCUP` is the expected suffix. Likely you don’t have `release` set to `true`.
> 
> Use `nc -U /run/lirc/lircd` to see the commands on the socket. Make sure the `_LIRCUP` is being sent.

I had this issue a long time and had to patch the PMP code to fix it previously. In later versions of lirc, --release is deprecated in the lircd executable and the “work” is shifted to lircd-uinput. Unfortunately, as far as I can tell, the release events are sent to `/dev/uinput` and not to the lircd socket.

I am a bit out of my depth here, but I put in a lot of hours trying to fix this for PMP with LIRC and wound up breaking every other LIRC program that failed to work afterword. That’s why I did that quick fix here:

> <https://github.com/plexinc/plex-media-player/issues/326>
>
> This affects PMP from a 1.1.0rc git pull from April 23, 2016. In Fedora 23, Qt-…5.6.0 final from RPMs, using LIRC 0.9.3a, PMP repeats the last key pressed until another key is pressed on the remote. When looking at the log, it seems that the up key press is not registered.
> 
> I changed this in /src/input/InputLIRC.cpp
> 
> \`\`\` c++
> if ((repeatCount % 3) == 0)
> {
> bool up = (command.endsWith("\_UP") && (command != "KEY\_UP"));
> emit receivedInput("LIRC", command, !up);
> }
> \`\`\`
> 
> changes to
> 
> \`\`\` c++
> if ((repeatCount % 3) == 0)
> {
> emit receivedInput("LIRC", command, true);
> emit receivedInput("LIRC", command, false);
> }
> \`\`\`
> 
> Perhaps the developers have a better way, but this fixes the issue for me.

Removing that search for the UP event fixed it for me cleanly and completely and I never had an issue with repeating button presses / etc.

Your team liked your code the way it is, and that is fine! Currently, I don’t have a way to take a wrench to your code locally.

So I found my old FLIRC device, hacked a way to turn the FLIRC usb port on and off from my dashboard code, and now things are working. The new Plex HTPC app seems very good so far.

EDIT: I had the wrong github issue. My issue is number 326.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [October 5, 2022, 4:46pm UTC](https://forums.plex.tv/t/lirc-remote-button-presses-repeat-until-process-is-killed/799814/4 "2022-10-05T16:46:58Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
