From 3ac56155f22e8d647a008973618c00cc76ed526d Mon Sep 17 00:00:00 2001 From: mexisme Date: Thu, 17 Oct 2024 18:11:04 +1300 Subject: [PATCH 1/5] microsoft/surface/go: Add comment about obsolete kvalo/ath10k-firmware repo --- microsoft/surface/common/repos.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 513f788a0..244d9702a 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -16,6 +16,7 @@ inherit rev sha256; }; + # This repo has been obsoleted: ath10k-firmware = fetchFromGitHub { owner = "kvalo"; repo = "ath10k-firmware"; From 413d3573e630246bf931452d330fc1d6ba47c779 Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 19 Oct 2024 14:47:36 +1300 Subject: [PATCH 2/5] Remove archived repo --- microsoft/surface/TODO.org | 2 ++ microsoft/surface/common/repos.nix | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/microsoft/surface/TODO.org b/microsoft/surface/TODO.org index f5526c303..3882ef891 100644 --- a/microsoft/surface/TODO.org +++ b/microsoft/surface/TODO.org @@ -11,6 +11,8 @@ - State "DONE" from "DOING" [2021-03-06 Sat 20:55] :END: * Firmware +** DONE Remove archived kvalo/ath10k-firmware repo +- The QCA6174 firmware appears to be in the standard Linux firmware repo, now ** DONE Remove old firmware binaries - Looks like the ath10k files aren't needed, any more ** DONE Create derivative for `ipts` firmware diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index 244d9702a..cb7ddba2c 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -16,14 +16,6 @@ inherit rev sha256; }; - # This repo has been obsoleted: - ath10k-firmware = fetchFromGitHub { - owner = "kvalo"; - repo = "ath10k-firmware"; - rev = "c987e38cbdb90dcb4e477d5dd21de66c77996435"; - sha256 = "16a67baxlga8vb43zbby2s7kpp4488vczg3manmr9g3wxnhhb9n3"; - }; - surface-go-ath10k-firmware_backup = fetchFromGitHub { owner = "mexisme"; repo = "linux-surface_ath10k-firmware"; From 052b3968a6540600e837b5db3c449bacb7adc9ec Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 19 Oct 2024 14:48:33 +1300 Subject: [PATCH 3/5] Deprecation warning for QCA6174 firmware --- microsoft/surface/README.md | 22 +++++++++---------- .../surface-go/firmware/ath10k/default.nix | 9 ++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/microsoft/surface/README.md b/microsoft/surface/README.md index 197a54613..a461f3187 100644 --- a/microsoft/surface/README.md +++ b/microsoft/surface/README.md @@ -91,11 +91,17 @@ See: https://github.com/linux-surface/linux-surface/blob/master/README.md ## Wifi Firmware for Surface Go -On the Surface Go, the standard firmware from the official Linux Firmware repo has issues with the -`ath10k` QCA6174 Wifi device. -You will see messages like "Can't ping firmware". +On the Surface Go, the standard firmware from the official Linux Firmware repo used to have issues +with the `ath10k` QCA6174 Wifi device. -The most effective fix to-date is to remove the `board-2.bin` file or replace it with a copy of the +This was fixed in Nov 2021: +- https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453 + +### Background: + +With the older firmware, you would see messages like "Can't ping firmware". + +The most effective fix was to remove the `board-2.bin` file or replace it with a copy of the `board.bin` file. The derivative in `surface-go/firmware/ath10k/` can configure this, with the @@ -107,14 +113,6 @@ This is the only way (currently) to force the driver to use the new firmware. For more details, see: https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wifi-firmware -_*NOTE:*_ There's some work to patch the kernel to make it easier to override which firmware file -to use for QCA6174, which would obviate this more-destructuve approach: -- https://github.com/linux-surface/kernel/commit/22ef83836c4aa89e9eb98de9b47ed24b6c2a1d45 - -_*NOTE:*_ There was an attempt to get this firmware incorporated into the aggregate `board-2.bin`, -but (as of this writing) the request appears to have been ignored: -- https://github.com/linux-surface/linux-surface/issues/41 - References: - https://github.com/jakeday/linux-surface/issues/441 - https://www.reddit.com/r/SurfaceLinux/comments/e8quqg/surface_go_official_wifi_fix/ diff --git a/microsoft/surface/surface-go/firmware/ath10k/default.nix b/microsoft/surface/surface-go/firmware/ath10k/default.nix index f861f8ebb..a7ad6a9a2 100644 --- a/microsoft/surface/surface-go/firmware/ath10k/default.nix +++ b/microsoft/surface/surface-go/firmware/ath10k/default.nix @@ -13,6 +13,15 @@ in { }; config = mkIf cfg.replace { + warnings = [''A working version of the ath10k QCA6174 firmware has been added to the kernel.org linux-firmware + repo, making this fix obsolete. + See: + - https://github.com/linux-surface/linux-surface/issues/542#issuecomment-976995453 + - https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wi-fi-firmware + + NOTE: This module option will probably be removed in the near future. + '']; + hardware.enableAllFirmware = true; hardware.firmware = [ (pkgs.callPackage ./ath10k-replace.nix {}) From 63883b888a489140603dfaa8960c2678440d695a Mon Sep 17 00:00:00 2001 From: mexisme Date: Sat, 19 Oct 2024 14:50:45 +1300 Subject: [PATCH 4/5] README tidy-up --- microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md index 516dc181a..a4c629e90 100644 --- a/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md +++ b/microsoft/surface/OLD-BEHAVIOUR-DEPRECATION.md @@ -45,5 +45,5 @@ Most "common" modules now have an `enable` option, which is `false` by default. This hasn't been finalised, partly as I now only have access to a Surface Go 1, these days, so I'm maybe not the best custodian of this code any longer. -However, hopefully the (imminent) `surface-go/` module is a reasonable exmample, and we should be +However, hopefully the `surface-go/` module is a reasonable exmample, and we should be able to gather more examples for more model specialisations over time. From bcfe64c3a5ed7562f580c922eebdb2add2267ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayan=20Nakib=20=28=D8=B1=D9=8A=D8=A7=D9=86=20=D9=86=D9=82?= =?UTF-8?q?=D9=8A=D8=A8=29?= Date: Sat, 19 Oct 2024 09:16:44 +0100 Subject: [PATCH 5/5] enable thermald, the temperature management daemon. --- hp/laptop/14s-dq2024nf/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hp/laptop/14s-dq2024nf/default.nix b/hp/laptop/14s-dq2024nf/default.nix index 08a48b353..03181188a 100644 --- a/hp/laptop/14s-dq2024nf/default.nix +++ b/hp/laptop/14s-dq2024nf/default.nix @@ -8,4 +8,8 @@ ../../../common/pc/laptop ../../../common/pc/laptop/ssd ]; + + config = { + services.thermald.enable = lib.mkDefault true; + }; }