From 2284621815598261bd444cded4053eb0d8e02f8e Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Wed, 17 Aug 2022 14:45:50 +0200 Subject: [PATCH 1/2] Quirks no more needed --- lenovo/thinkpad/x1/7th-gen/audio.nix | 15 --------------- lenovo/thinkpad/x1/7th-gen/default.nix | 1 - 2 files changed, 16 deletions(-) delete mode 100644 lenovo/thinkpad/x1/7th-gen/audio.nix diff --git a/lenovo/thinkpad/x1/7th-gen/audio.nix b/lenovo/thinkpad/x1/7th-gen/audio.nix deleted file mode 100644 index f6ecf58..0000000 --- a/lenovo/thinkpad/x1/7th-gen/audio.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, pkgs, ... }: -{ - # This can be removed when the default kernel is at least version 5.6 - # https://github.com/NixOS/nixpkgs/pull/86168 - boot.kernelPackages = lib.mkIf - (lib.versionOlder pkgs.linux.version "5.6") - (lib.mkDefault pkgs.linuxPackages_latest); - - # This can be removed when PulseAudio is at least version 14 - # https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_7)#Audio - hardware.pulseaudio.extraConfig = '' - load-module module-alsa-sink device=hw:0,0 channels=4 - load-module module-alsa-source device=hw:0,6 channels=4 - ''; -} diff --git a/lenovo/thinkpad/x1/7th-gen/default.nix b/lenovo/thinkpad/x1/7th-gen/default.nix index d9af5eb..c886002 100644 --- a/lenovo/thinkpad/x1/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/7th-gen/default.nix @@ -3,6 +3,5 @@ ../. ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd - ./audio.nix ]; } From adbeb1a5d672df746b1009cddc7d68919f81e7e3 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Wed, 17 Aug 2022 14:50:42 +0200 Subject: [PATCH 2/2] Enable `throttled` for Thinkpad X1 gen 7 too Even if this device is currently not mentioned upstream between the devices that need this I stressed my machine (using `s-tui`) with and without and I can confirm that it incremented the average CPU frequency during the stress test (from 1.8/2GHz to around 3GHz). --- lenovo/thinkpad/x1/7th-gen/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lenovo/thinkpad/x1/7th-gen/default.nix b/lenovo/thinkpad/x1/7th-gen/default.nix index c886002..1547e05 100644 --- a/lenovo/thinkpad/x1/7th-gen/default.nix +++ b/lenovo/thinkpad/x1/7th-gen/default.nix @@ -1,7 +1,10 @@ +{ lib, ... }: { imports = [ ../. ../../../../common/pc/laptop/acpi_call.nix ../../../../common/pc/laptop/ssd ]; + + services.throttled.enable = lib.mkDefault true; }