From 5a6490040c1fff29f94cf3a6a80bc07709836046 Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Tue, 28 Mar 2023 01:52:45 +0200 Subject: [PATCH] linux: fix error with IR remotes Support for IR remotes was originally introduced in NixOS in 2013 with [1]. This worked fine until 2018 with the release of Linux 4.16 which contained [2], which removed the default-enable on the IR decoders. This means that kernels since then build with RC_DEVICES enabled, but RC_DECODERS disabled: ``` CONFIG_RC_DEVICES=y ``` This breaks IR remote support and also leads to the following error on every bootup when such a device is present as devices have a default keymap which uses a protocols decoder, but these decoders are not available: ``` rc_core: Loaded IR protocol module ir-rc6-decoder, but protocol rc-6 still not available ``` Fix this by also enabling RC_DECODERS in the kernel configuration. [1] https://github.com/NixOS/nixpkgs/commit/b7ccfc258abce98f999035dac83b821360016ac4 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=22756ae7319b0afc2a80fbdec365a6976a1ad350 --- pkgs/os-specific/linux/kernel/common-config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 4b1318d91159..d02afea55811 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -896,6 +896,7 @@ let REGULATOR = yes; # Voltage and Current Regulator Support RC_DEVICES = option yes; # Enable IR devices + RC_DECODERS = option yes; # Required for IR devices to work RT2800USB_RT53XX = yes; RT2800USB_RT55XX = yes;