From bda6036d2e7d6f9bd475727f861b3bede3c342ae Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Wed, 3 Aug 2022 18:00:41 -0400 Subject: [PATCH] nixos/xpadneo: don't disable ertm on kernel 5.12 or later The [v0.9.2 changelog](https://github.com/atar-axis/xpadneo/releases/tag/v0.9.2) mentions that ERTM should no longer be unconditionally disabled on kernels later than 5.12. --- nixos/modules/hardware/xpadneo.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/hardware/xpadneo.nix b/nixos/modules/hardware/xpadneo.nix index dbc4ba212560..092f36729b31 100644 --- a/nixos/modules/hardware/xpadneo.nix +++ b/nixos/modules/hardware/xpadneo.nix @@ -15,7 +15,8 @@ in # https://wiki.archlinux.org/index.php/Gamepad#Connect_Xbox_Wireless_Controller_with_Bluetooth extraModprobeConfig = mkIf - config.hardware.bluetooth.enable + (config.hardware.bluetooth.enable && + (lib.versionOlder config.boot.kernelPackages.kernel.version "5.12")) "options bluetooth disable_ertm=1"; extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];