[mythtv-users] Remote keys repeating way too fast
Doug Scoular (dscoular)
dscoular at cisco.com
Sat Apr 17 10:54:06 UTC 2021
Hi Stephen,
> It looks like a kernel devinput driver problem, so I think the
> obvious fix is to go back to the last kernel that worked, if you
> can.
Okay, I had managed to confuse myself over the kernel version that
caused the IR key repeat problem. In my previous email I said that
I thought it was 5.8.0-45-generic that caused the problem but now I
realise it was actually 5.8.0-49-generic that caused my grief...
* 2021-03-16 06:09:00 Install: linux-image-5.8.0-45-generic:amd64
* 2021-04-14 06:48:02 Install: linux-image-5.8.0-49-generic:amd64
I reverted back to 5.8.0-45 and the IR key repeat problem was
resolved.
> If you do a bug report (recommended), you may want to do a kernel
> bisect to see where the problem first started. At the moment, it
> could be anywhere between 5.4.0-49 and 5.8.0-45.
It's a long, long time since I compiled a kernel let alone
embarked on a bug hunt but I think I manage to narrow things down a
little (I've never even used git bisect before).
Anyway, I think we can say that the problem may have been
re-introduced by 5.8.0-49 and, unfortunately, 5.8.0-50 carries it
forward.
Looking at the diffs between 5.8.0-45 and 5.8.0-49:
root at lisa:/mnt/store1/src/groovy/drivers/media/rc# git diff Ubuntu-5.8.0-45.51..Ubuntu-5.8.0-49.55 .
I found the following suspicious Jan 5 2021 commit:
root at lisa:/mnt/store1/src/groovy/drivers/media/rc# git show c592cca3691db
It looks like there's been an effort to harmonize infrared
durations from nanosconds (one billionth of a second) to microseconds
(one millionth of a second).
The commit changed the drivers/media/rc/ir-mce_kbd-decoder.c and
the drivers/media/rc/rc-main.c files specifically the rc_repeat()
function in the latter file.
The commit comment is:
media: rc: fix timeout handling after switch to microsecond durations
BugLink: https://bugs.launchpad.net/bugs/1918516
commit 06b831588b639ad9d94e4789b0250562228722c2 upstream.
Commit 528222d853f92 ("media: rc: harmonize infrared durations to
microseconds") missed to switch some timeout calculations from
nanoseconds to microseconds. This resulted in spurious key_up+key_down
events at the last scancode if the rc device uses a long timeout
(eg 100ms on nuvoton-cir) as the device timeout wasn't properly
accounted for in the keyup timeout calculation.
Fix this by applying the proper conversion functions.
I'm not sure if this is the culprit at all but it seems to be in the
right area. I note that the kernel HEAD is still using the same
code. There have been no changes to rc-main.c since the above.
root at lisa:/mnt/store1/src/groovy/drivers/media/rc# git diff Ubuntu-5.8.0-49.55..HEAD rc-main.c
root at lisa:/mnt/store1/src/groovy/drivers/media/rc#
I'll try installing the latest kernel source, revert these two files
and see if I can figure out how to recompile and install to see if it
fixes the latest kernel.
Many thanks for responding... it gave me the confidence to dig a bit
Deeper.
Cheers,
Doug
More information about the mythtv-users
mailing list