From d569ff4fcf611a0205c7b5ffd6cf652f430b4d72 Mon Sep 17 00:00:00 2001 From: Peter Ferenczy Date: Sun, 21 May 2023 21:53:56 +0300 Subject: [PATCH 1/3] Framework 12th gen: add keys workaround --- framework/12th-gen-intel/default.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/framework/12th-gen-intel/default.nix b/framework/12th-gen-intel/default.nix index c912f31..79336f6 100644 --- a/framework/12th-gen-intel/default.nix +++ b/framework/12th-gen-intel/default.nix @@ -17,9 +17,32 @@ "i915.enable_psr=1" ]; - # This enables the brightness keys to work + # This enables the brightness and airplane mode keys to work # https://community.frame.work/t/12th-gen-not-sending-xf86monbrightnessup-down/20605/11 boot.blacklistedKernelModules = [ "hid-sensor-hub" ]; + + # Further tweak to ensure the brightness and airplane mode keys work + # https://community.frame.work/t/responded-12th-gen-not-sending-xf86monbrightnessup-down/20605/67 + systemd.services.bind-keys-driver = { + description = "Bind brightness and airplane mode keys to their driver"; + wantedBy = [ "default.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + script = '' + ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* + if [ -e /sys/bus/i2c/devices/i2c-FRMW0001:00 -a ! -e /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-FRMW0001:00 ]; then + echo fixing + echo i2c-FRMW0001:00 > /sys/bus/i2c/drivers/i2c_hid_acpi/bind + ls -lad /sys/bus/i2c/devices/i2c-*:* /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*:* + echo done + else + echo no fix needed + fi + ''; + }; # Alder Lake CPUs benefit from kernel 5.18 for ThreadDirector # https://www.tomshardware.com/news/intel-thread-director-coming-to-linux-5-18 From 61509d052c2c4444d66c5671ab5c3597e051eb1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 02:56:39 +0000 Subject: [PATCH 2/3] build(deps): bump cachix/install-nix-action from 20 to 21 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 20 to 21. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v20...v21) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 080bae9..e286189 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 + - uses: cachix/install-nix-action@v21 with: nix_path: nixpkgs=channel:nixos-unstable - name: Show nixpkgs version From 468a7a108108908c7a35d6549f1e1f0236a9448a Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Wed, 31 May 2023 08:29:51 +0200 Subject: [PATCH 3/3] lenovo-thinkpad-x1-6th-gen: swap throttled with thermald --- lenovo/thinkpad/x1/6th-gen/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 24fe676..73be390 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -17,5 +17,5 @@ # See also https://certification.ubuntu.com/catalog/component/input/5313/input%3ATPPS/2ElanTrackPoint/ hardware.trackpoint.device = "TPPS/2 Elan TrackPoint"; - services.throttled.enable = lib.mkDefault true; + services.thermald.enable = lib.mkDefault true; }