IR Remote Keys Repeat Many Times Starting with Kernel 5.8.0-49

Bug #1926030 reported by Ted L
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
Groovy
Undecided
Po-Hsu Lin

Bug Description

[Impact]
Patch:
  * media: rc: fix timeout handling after switch to microsecond durations
  * media: rc: ite-cir: fix min_timeout calculation

Were applied to Groovy with our stable update process (bug 1918516)

User reported that IR Remote key press will be repeated for multiple times
with these patches applied.

Commit 528222d853f92 ("media: rc: harmonize infrared durations to microseconds") that needs to be fixed by these two does not exist in 5.8 kernel. The patch author Matthias Reichl also state these are for 5.10 and onward.

[Fix]
Revert these two patches for groovy.

[Test]
Test kernels for G-5.8 / F-5.8 can be found here:
https://people.canonical.com/~phlin/kernel/lp-1926030-revert-for-ir/

User Ted L confirmed that F-5.8 test kernel can fix the problem.

[Where problems could occur]
The chance to cause regression can be considered as low since the original patch that need to be fix by these two patches does not exist in 5.8 at all.

[Original Bug Report]
I use an IR remote with the ir-keytable package. Everything was working fine until kernel 5.8.0-49 was automatically installed by Software Updater on Ubuntu 20.04.2. When any key is pressed on the remote, the key is repeated about 500 times. The kernel is now 5.8.0-50, and the problem persists.

Other users on the MythTV mailing list are reporting the issue, and it appears that the problem is related to changes in the following files:

drivers/media/rc/ir-mce_kbd-decoder.c
drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
drivers/media/rc/serial_ir.c

It has been reported that reverting the ir-mce_kbd-decoder.c and rc-main.c files to the older versions fixes the problem.

/proc/version_signature > version.log:
Ubuntu 5.8.0-50.56~20.04.1-generic 5.8.18

lspci -vnvn:
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:590f] (rev 06)
 Subsystem: ASUSTeK Computer Inc. Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [1043:8694]
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
 Latency: 0
 Capabilities: [e0] Vendor Specific Information: Len=10 <?>
 Kernel driver in use: skl_uncore

ir-keytable -V:
IR keytable control version 1.18.0

lsb_release -rd:
Description: Ubuntu 20.04.2 LTS
Release: 20.04
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ted 1020 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-09-19 (217 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
IwConfig:
 lo no wireless extensions.

 enp3s0 no wireless extensions.

 enp0s31f6 no wireless extensions.
MachineType: System manufacturer System Product Name
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.8.0-50-generic root=UUID=529cae8e-19cd-4732-80d5-b3dca123afc6 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.8.0-50.56~20.04.1-generic 5.8.18
RelatedPackageVersions:
 linux-restricted-modules-5.8.0-50-generic N/A
 linux-backports-modules-5.8.0-50-generic N/A
 linux-firmware 1.187.11
RfKill:

Tags: focal
Uname: Linux 5.8.0-50-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd mythtv plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 07/05/2017
dmi.bios.release: 5.12
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 3405
dmi.board.asset.tag: Default string
dmi.board.name: H110T
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr3405:bd07/05/2017:br5.12:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnH110T:rvrRevX.0x:cvnDefaultstring:ct3:cvrDefaultstring:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Ted L (heyted) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1926030

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: focal
Revision history for this message
Paul Harrison (mythtv-paulh) wrote :

This bug has been discussed on the MythTV mailing list and the problem commit has been found.
https://lists.archive.carbon60.com/mythtv/users/636833

In summary the bad commit is this one:-

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.

Revision history for this message
Ted L (heyted) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Ted L (heyted) wrote :

Message from Matthias R:

>Hi,
>
>Sorry, I don't have an account on that bugtracker and also I'm not
>really familiar with the Ubuntu kernels.
>
>From a quick glance it looks like my two commits
>"media: rc: fix timeout handling after switch to microsecond durations"
>and
>"media: rc: ite-cir: fix min_timeout calculation"
>should not have been backported to the 5.8 kernel as both of them fix
>issues that first appeared in kernel 5.10 - more precisely after commit
>528222d853f92 "media: rc: harmonize infrared durations to microseconds",
>as also mentioned in the connit message of these patches.
>
>so long,
>
>Hias

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Is it fixed in upstream kernel?

Revision history for this message
Ted L (heyted) wrote :

I emailed Matthias R and asked him to take a look at this bug report. According to his reply in comment #20 above, the fix was successfully applied to kernel 5.10 but should not have been backported since the problem did not exist in kernels < 5.10. A user on the MythTV forum is successfully using kernel 5.10 with an IR remote with no issue. The problem in focal affecting many people occurred due to LP #1918516 as referenced in Kernel SRU Workflow 1921052 (https://bugs.launchpad.net/kernel-sru-workflow/+bug/1921052). Thanks for anything that can be done to fix this.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hello Ted (or anyone else that's affected by this issue),
can you give this F-hwe-5.8 / G-5.8 kernel a try:
https://people.canonical.com/~phlin/kernel/lp-1926030-revert-for-ir/

They all have these two commits reverted:
  * media: rc: fix timeout handling after switch to microsecond durations
  * media: rc: ite-cir: fix min_timeout calculation

Thanks!

Revision history for this message
Ted L (heyted) wrote :

Thank you Po-Hsu. The 5.8.0-52.59 kernel appears to be working fine on Focal.

Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Thanks for the quick test, I have submitted a SRU request for this:
https://lists.ubuntu.com/archives/kernel-team/2021-May/120150.html

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu Groovy):
status: New → Confirmed
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Groovy):
status: Confirmed → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Changed in linux (Ubuntu Groovy):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-groovy' to 'verification-done-groovy'. If the problem still exists, change the tag 'verification-needed-groovy' to 'verification-failed-groovy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-groovy
Revision history for this message
Ted L (heyted) wrote :

This test F-hwe-5.8 / G-5.8 kernel fixes the issue:
https://people.canonical.com/~phlin/kernel/lp-1926030-revert-for-ir/

The latest automatically updated kernel (5.8.0-55-generic) does not fix the issue.

no longer affects: focal (Ubuntu Groovy)
Changed in focal (Ubuntu):
status: New → Confirmed
tags: added: verification-done-focal
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi Ted,
You will need to enable -proposed to get this kernel, as described in https://wiki.ubuntu.com/Testing/EnableProposed from comment #27
You can turn this option off after the test.

It should be 5.8.0-56.63 from proposed on Groovy. (The 5.8 proposed kernel is not ready for Focal yet, so you can either verify this on Groovy 5.8 or wait for the 5.8 proposed kernel on Focal)
Thanks!

tags: removed: verification-done-focal
Po-Hsu Lin (cypressyew)
no longer affects: focal (Ubuntu)
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hello Ted,
this patch should be available in Focal 5.8.0-57.64~20.04.1 and Groovy 5.8.0-57.64 from proposed. Can you give it a try?
Thanks

Revision history for this message
Ted L (heyted) wrote :

I tested 5.8.0-57.64~20.04.1 proposed on Focal, and it appears to be working fine. Thank you for the fix.

tags: added: verification-done-groovy
removed: verification-needed-groovy
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (23.2 KiB)

This bug was fixed in the package linux - 5.8.0-59.66

---------------
linux (5.8.0-59.66) groovy; urgency=medium

  * UAF on CAN J1939 j1939_can_recv (LP: #1932209)
    - SAUCE: can: j1939: delay release of j1939_priv after synchronize_rcu

  * UAF on CAN BCM bcm_rx_handler (LP: #1931855)
    - SAUCE: can: bcm: delay release of struct bcm_op after synchronize_rcu

linux (5.8.0-57.64) groovy; urgency=medium

  * groovy/linux: 5.8.0-57.64 -proposed tracker (LP: #1932047)

  * pmtu.sh from selftests.net in linux ADT test failure with linux/5.8.0-56.63
    (LP: #1931731)
    - net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb

linux (5.8.0-56.63) groovy; urgency=medium

  * groovy/linux: 5.8.0-56.63 -proposed tracker (LP: #1930052)

  * Packaging resync (LP: #1786013)
    - update dkms package versions

  * scsi: storvsc: Parameterize number hardware queues (LP: #1930626)
    - scsi: storvsc: Parameterize number hardware queues

  * CVE-2021-33200
    - bpf: Wrap aux data inside bpf_sanitize_info container
    - bpf: Fix mask direction swap upon off reg sign change
    - bpf: No need to simulate speculative domain for immediates

  * CVE-2021-3490
    - SAUCE: Revert "UBUNTU: SAUCE: bpf: verifier: fix ALU32 bounds tracking with
      bitwise ops"
    - gpf: Fix alu32 const subreg bound tracking on bitwise operations

  * CVE-2021-3489
    - SAUCE: Revert "UBUNTU: SAUCE: bpf: prevent writable memory-mapping of read-
      only ringbuf pages"
    - bpf: Prevent writable memory-mapping of read-only ringbuf pages

  * Realtek USB hubs in Dell WD19SC/DC/TB fail to work after exiting s2idle
    (LP: #1928242)
    - USB: Verify the port status when timeout happens during port suspend

  * CVE-2020-26145
    - ath10k: drop fragments with multicast DA for SDIO
    - ath10k: add CCMP PN replay protection for fragmented frames for PCIe
    - ath10k: drop fragments with multicast DA for PCIe

  * CVE-2020-26141
    - ath10k: Fix TKIP Michael MIC verification for PCIe

  * CVE-2020-24587
    - ath11k: Clear the fragment cache during key install

  * CVE-2020-24588
    - mac80211: properly handle A-MSDUs that start with an RFC 1042 header
    - cfg80211: mitigate A-MSDU aggregation attacks
    - mac80211: drop A-MSDUs on old ciphers
    - ath10k: drop MPDU which has discard flag set by firmware for SDIO

  * CVE-2020-26139
    - mac80211: do not accept/forward invalid EAPOL frames

  * CVE-2020-24586 // CVE-2020-24587 // CVE-2020-24587 for such cases.
    - mac80211: extend protection against mixed key and fragment cache attacks

  * CVE-2020-24586 // CVE-2020-24587
    - mac80211: prevent mixed key and fragment cache attacks
    - mac80211: add fragment cache to sta_info
    - mac80211: check defrag PN against current frame
    - mac80211: prevent attacks on TKIP/WEP as well

  * CVE-2020-26147
    - mac80211: assure all fragments are encrypted

  * raid10: Block discard is very slow, causing severe delays for mkfs and
    fstrim operations (LP: #1896578)
    - md: add md_submit_discard_bio() for submitting discard bio
    - md/raid10: extend r10bio devs to raid disks
    - md/raid10: pull the code that wait for blocked dev into one...

Changed in linux (Ubuntu Groovy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers