IR keys repeated when Kodi is running and LG TV connected

#1

Hi,

I’ve just received my Vero 4K+ to replace my RPI3+OSMC. I’m trying to connect my one-for-all remote, like I did with my RPI. I’ve copied the LIRC config file from my RPI to Vero and selected this remote in the Remotes interface. Remote was not working…

I’ve used mode2 to debug the IR data:
sudo systemctl stop lircd_helper@lirc0
mode2 -d /dev/lirc0

I’m getting a continuous stream of output, while i’m not pressing any remote button.

space 300
pulse 90
space 710
pulse 80
space 27720
pulse 400
space 530
pulse 540
space 270
pulse 490
pulse 108322

I’ve also tried to cover the IR sensor (including the extender), but that didn’t help. Also tried the Vero in another dark room. Same issue.

Is my IR sensor broken?

Thanks for your help.

0 Likes

#2

Have you tried moving the device to another room?

0 Likes

#3

Hi Sam,

Thanks for your reply. Yes, I’ve tested in two rooms, at locations where sunlight cannot reach the IR sensor.

0 Likes

#4

Can you stop Kodi as well?

0 Likes

#5

When I stop Kodi (sudo systemctl stop mediacenter), the stream of pulses and spaces stops… When Kodi is stopped, i’m only getting output from mode2 when I’m pressing a remote control button. When I start Kodi, the garbage data is coming back.

0 Likes

#6

When you train a remote (via irrecord); you need to do so when Kodi is stopped.

We pump events in to /dev/lirc0 as a uinput aggregator.

Sam

0 Likes

#7

Hi Sam,

Thanks for your reply. I tried to learn a remote with Kodi stopped. mode2 was only showing output when I pressed a remote control button. However, it’s very hard to get any dots when irrecord is recording (first stage). I tried with different remotes. When I was using irrecord on the RPI, the bar was filling much quicker. Now it’s impossible to get the bar filled.

I used the command: irrecord -d /dev/lirc0 my-remote.conf
Also tried irrecord with eventlircd stopped.

Do you know what’s happening?

0 Likes

#8

What is the remote protocol of the device you are trying to learn?

Sam

0 Likes

#9

I’m using a Philips remote. Protocol is RC6. Here’s a part of the config generated with irrecord @ RPI:

bits 21
flags RC6|CONST_LENGTH
eps 30
aeps 100

header 2710 821
one 488 393
zero 488 393
gap 105845
toggle_bit_mask 0x10000
rc6_mask 0x10000

  begin codes
      KEY_POWER         0x0FB938
      KEY_1                    0x0EB9FE
      KEY_2                    0x0FB9FD
      KEY_3                    0x0EB9FC

I’ve tested if irrecord is working when another device is loaded on my all-in-one remote. I’ve selected a Sony sat device (setup code 0847), and irrecording seems to work without issues. Type is also RC6, but probably another subtype:

Found const length: 66686
Please keep on pressing buttons like described above.

RC-6 remote control found.
No header found.
No repeat code found.
Signals are biphase encoded.
Signal length is 29

0 Likes

#10

I’ve loaded a MCE profile into my all-in-one remote. I managed to create a lirc config using irrecord.

When I pres a button very shortly and Kodi is stopped, irw shows:
67 0 KEY_UP linux-input-layer
67 0 KEY_UP_UP linux-input-layer

When I press a button a bit longer:
67 0 KEY_UP linux-input-layer
67 1 KEY_UP linux-input-layer
67 0 KEY_UP_UP linux-input-layer

However, when I test with Kodi running, some kind of loop is created:
67 0 KEY_UP linux-input-layer
67 1 KEY_UP linux-input-layer
67 2 KEY_UP linux-input-layer
67 3 KEY_UP linux-input-layer
67 4 KEY_UP linux-input-layer
67 5 KEY_UP linux-input-layer
67 6 KEY_UP linux-input-layer
67 7 KEY_UP linux-input-layer
67 8 KEY_UP linux-input-layer
67 9 KEY_UP linux-input-layer
67 a KEY_UP linux-input-layer
67 b KEY_UP linux-input-layer
67 c KEY_UP linux-input-layer
67 d KEY_UP linux-input-layer
67 e KEY_UP linux-input-layer
67 f KEY_UP linux-input-layer
67 10 KEY_UP linux-input-layer
67 11 KEY_UP linux-input-layer
67 12 KEY_UP linux-input-layer
67 13 KEY_UP linux-input-layer
67 14 KEY_UP linux-input-layer
67 15 KEY_UP linux-input-layer
67 16 KEY_UP linux-input-layer
67 17 KEY_UP linux-input-layer
67 18 KEY_UP linux-input-layer
67 19 KEY_UP linux-input-layer
67 1a KEY_UP linux-input-layer
67 1b KEY_UP linux-input-layer
67 1c KEY_UP linux-input-layer
67 1d KEY_UP linux-input-layer
67 1e KEY_UP linux-input-layer
67 1f KEY_UP linux-input-layer
67 20 KEY_UP linux-input-layer
67 21 KEY_UP linux-input-layer
67 22 KEY_UP linux-input-layer
[… many more …]
67 a6 KEY_UP linux-input-layer
67 a7 KEY_UP linux-input-layer
67 a8 KEY_UP linux-input-layer
67 a9 KEY_UP linux-input-layer
67 aa KEY_UP linux-input-layer
67 0 KEY_UP_UP linux-input-layer

0 Likes

#11

Are you on a Kodi nightly?

Sam

0 Likes

#12

No, december 2018 build

Edit: I’ve brought the Vero to work to do some debugging. Now Kodi is responding great to the remote control, no more repeated commands. Maybe a power cycle helped, or maybe the difference is that the RF remote dongle is not plugged. I’ll let you know if it’s working at home tonight.

1 Like

#13

Hi Sam,

At the office, the remote control worked superb. At my home, the issue is still present.

I managed to pin down the source of the issue: my LG 2017 OLED TV. When the TV is connected, remote commands are repeated many times. When HDMI cable is not connected, issue is not occurring. Also tried another HDMI cable (the one from the Vero package). HDMI CEC is turned off in Kodi and TV.

Do you have any idea what’s going wrong? Only the IR remote is affected.

Thanks for your help.

0 Likes

#14

This is very strange.

Does your TV have an IR blaster?

0 Likes

#15

Yes, very strange.

TV has no IR blaster. I tested with door in front of the Vero nearly closed, to make sure no other IR signal can reach it.

Did some additional testing this morning. Issue is also present with TV switched to another source and even when TV is in standby. When I pull the HDMI cable, issue is gone.

It is possible that CEC is the issue?

Edit:
irw /var/run/lirc/lircd-lirc0 shows no repeated events
irw /var/run/lirc/lircd shows repeated events (sometimes 100+)

Kodi logs:
18:54:26.239 T:4076671344 DEBUG: LIRC: Update - NEW at 6971791:6c 0 KEY_DOWN linux-input-layer (KEY_DOWN)
18:54:26.240 T:4076671344 DEBUG: OnKey: 167 (0xa7, obc88) pressed, action is Down
18:54:29.825 T:3783238400 DEBUG: Previous line repeats 24 times.
18:54:29.825 T:3783238400 DEBUG: Thread JobWorker start, auto delete: true
18:54:29.855 T:4076671344 DEBUG: OnKey: 167 (0xa7, obc88) pressed, action is Down
18:54:34.568 T:4076671344 DEBUG: Previous line repeats 115 times.

Issue is only present when HDMI cable is connected (only to LG TV?). Issue not present when connected to LG PC monitor at work.

kodi.log when unplugging HDMI cable:
19:01:18.467 T:4024431360 DEBUG: CEGLNativeTypeAmlogic: Detected HDMI switch
19:01:26.758 T:4076671344 DEBUG: Previous line repeats 1 times.

log when plugging HDMI cable:
19:04:38.805 T:4024431360 DEBUG: CEGLNativeTypeAmlogic: Detected HDMI switch

0 Likes

#16

CEC shouldn’t be putting events through uinput.

Is there an option to disable CEC on your TV?

0 Likes

#17

Yes, CEC is disabled at TV.

I’m going to test if issue is present when i’m not using eventlircd, but a single lircd instance that is connected to Kodi. I’ve brought the Vero to work, I’m also going to test with the office TV (Samsung). I’ll keep you posted. Thanks for your help.

1 Like

#18

Hi Sam,

I managed to circumvent the “repeated keys” issue by disabling eventlircd and connecting a LIRC instance to Kodi. No repeated events anymore! Yeah! I don’t know what going wrong with the eventlircd method…

Edit: Now I’m having the following issues:

  • sometimes IR remote key presses are not recognized (irw)
  • most of the times, (fast) repeated button are registered as a single event. I have to wait +/- 500ms before pressing a button again
  • performance is fluctuating very much. Sometimes, all presses are recognised. Sometimes, presses are not recognised for +/- 20 seconds.

When I close Kodi, the issue is gone and irw registers all presses. When I unplug the HDMI cable from TV, issue is also gone.
Monitor + Samsung TV at work don’t have the issue at all.

To summarise: Kodi running + LG OLED TV connected -> weird IR issues :frowning:
RF remote is not affected.

Is there something I can do to fix/debug this?

Nick

0 Likes

#19

I would recommend keeping eventlircd; as it functions as a uinput aggregator.
Do you still experience these issues if you use the LIRC socket directly with Kodi on the display at work?

Sam

0 Likes

#20

Thanks for your input. I do prefer the eventlircd setup, but that setup is currently unusable (commands repeated 20+ times - impossible to navigate menus). For the direct LIRC socket, presses are missed, but provides are “workable” situation.

Both methods don’t have issues when using the displays at work. At home, the issue is only present when Kodi is starting. I don’t understand how Kodi can interfere with IR. It’s only reading the LIRC socket right?

0 Likes