diff options
-rw-r--r-- | suweren/services.scm | 14 | ||||
-rw-r--r-- | upstream/packages/nbfc.patch | 427 | ||||
-rw-r--r-- | upstream/packages/nbfc.scm | 56 | ||||
-rw-r--r-- | upstream/services/nbfc.scm | 65 |
4 files changed, 0 insertions, 562 deletions
diff --git a/suweren/services.scm b/suweren/services.scm deleted file mode 100644 index 5cea55c..0000000 --- a/suweren/services.scm +++ /dev/null @@ -1,14 +0,0 @@ -(define-module (suweren services) - #:use-module (gnu services) - #:use-module (gnu services cups) - #:use-module (suweren services desktop) - #:use-module (upstream services nbfc)) - -(define-public %distribution-services - (let* - ((nbfc-configuration* (nbfc-configuration (model "Acer Nitro AN515-43"))) - (nbfc-service (service nbfc-service-type - nbfc-configuration*))) - (append bluetooth-services - (list ;; nbfc-service - )))) diff --git a/upstream/packages/nbfc.patch b/upstream/packages/nbfc.patch deleted file mode 100644 index 2c5dea6..0000000 --- a/upstream/packages/nbfc.patch +++ /dev/null @@ -1,427 +0,0 @@ -From 0d7c51151629ea21325b4cc8f2d912633b842743 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Pa=C5=9Bnikowski?= <marek@marekpasnikowski.pl> -Date: Sun, 9 Jun 2024 18:59:16 +0200 -Subject: [PATCH 1/1] change temperature threshholds - ---- - share/nbfc/configs/Acer Nitro AN515-43.json | 406 +++++++++----------- - 1 file changed, 173 insertions(+), 233 deletions(-) - -diff --git a/share/nbfc/configs/Acer Nitro AN515-43.json b/share/nbfc/configs/Acer Nitro AN515-43.json -index a0c64fb..edea6e0 100644 ---- a/share/nbfc/configs/Acer Nitro AN515-43.json -+++ b/share/nbfc/configs/Acer Nitro AN515-43.json -@@ -5,237 +5,177 @@ - "ReadWriteWords": true, - "CriticalTemperature": 90, - "FanConfigurations": [ -- { -- "ReadRegister": 19, -- "WriteRegister": 55, -- "MinSpeedValue": 0, -- "MaxSpeedValue": 100, -- "IndependentReadMinMaxValues": true, -- "MinSpeedValueRead": 0, -- "MaxSpeedValueRead": 6122, -- "ResetRequired": true, -- "FanSpeedResetValue": 50, -- "FanDisplayName": "Ryzen 3550H", -- "TemperatureThresholds": [ -- { -- "UpThreshold": 40, -- "DownThreshold": 0, -- "FanSpeed": 0.0 -- }, -- { -- "UpThreshold": 42, -- "DownThreshold": 40, -- "FanSpeed": 30.0 -- }, -- { -- "UpThreshold": 44, -- "DownThreshold": 41, -- "FanSpeed": 32.0 -- }, -- { -- "UpThreshold": 48, -- "DownThreshold": 43, -- "FanSpeed": 34.0 -- }, -- { -- "UpThreshold": 52, -- "DownThreshold": 46, -- "FanSpeed": 36.0 -- }, -- { -- "UpThreshold": 54, -- "DownThreshold": 50, -- "FanSpeed": 38.0 -- }, -- { -- "UpThreshold": 58, -- "DownThreshold": 53, -- "FanSpeed": 41.0 -- }, -- { -- "UpThreshold": 62, -- "DownThreshold": 56, -- "FanSpeed": 44.0 -- }, -- { -- "UpThreshold": 64, -- "DownThreshold": 60, -- "FanSpeed": 47.0 -- }, -- { -- "UpThreshold": 68, -- "DownThreshold": 63, -- "FanSpeed": 50.0 -- }, -- { -- "UpThreshold": 72, -- "DownThreshold": 66, -- "FanSpeed": 55.0 -- }, -- { -- "UpThreshold": 74, -- "DownThreshold": 70, -- "FanSpeed": 61.0 -- }, -- { -- "UpThreshold": 78, -- "DownThreshold": 73, -- "FanSpeed": 68.0 -- }, -- { -- "UpThreshold": 82, -- "DownThreshold": 76, -- "FanSpeed": 76.0 -- }, -- { -- "UpThreshold": 84, -- "DownThreshold": 80, -- "FanSpeed": 85.0 -- }, -- { -- "UpThreshold": 88, -- "DownThreshold": 83, -- "FanSpeed": 94.0 -- }, -- { -- "UpThreshold": 90, -- "DownThreshold": 86, -- "FanSpeed": 100.0 -- } -- ], -- "FanSpeedPercentageOverrides": [] -- }, -- { -- "ReadRegister": 21, -- "WriteRegister": 58, -- "MinSpeedValue": 0, -- "MaxSpeedValue": 100, -- "IndependentReadMinMaxValues": true, -- "MinSpeedValueRead": 0, -- "MaxSpeedValueRead": 6122, -- "ResetRequired": true, -- "FanSpeedResetValue": 50, -- "FanDisplayName": "AMD RX560X", -- "TemperatureThresholds": [ -- { -- "UpThreshold": 40, -- "DownThreshold": 0, -- "FanSpeed": 0.0 -- }, -- { -- "UpThreshold": 42, -- "DownThreshold": 40, -- "FanSpeed": 22.0 -- }, -- { -- "UpThreshold": 44, -- "DownThreshold": 41, -- "FanSpeed": 24.0 -- }, -- { -- "UpThreshold": 48, -- "DownThreshold": 43, -- "FanSpeed": 26.0 -- }, -- { -- "UpThreshold": 52, -- "DownThreshold": 46, -- "FanSpeed": 28.0 -- }, -- { -- "UpThreshold": 54, -- "DownThreshold": 50, -- "FanSpeed": 30.0 -- }, -- { -- "UpThreshold": 58, -- "DownThreshold": 53, -- "FanSpeed": 34.0 -- }, -- { -- "UpThreshold": 62, -- "DownThreshold": 56, -- "FanSpeed": 38.0 -- }, -- { -- "UpThreshold": 64, -- "DownThreshold": 60, -- "FanSpeed": 42.0 -- }, -- { -- "UpThreshold": 68, -- "DownThreshold": 63, -- "FanSpeed": 46.0 -- }, -- { -- "UpThreshold": 72, -- "DownThreshold": 66, -- "FanSpeed": 52.0 -- }, -- { -- "UpThreshold": 74, -- "DownThreshold": 70, -- "FanSpeed": 59.0 -- }, -- { -- "UpThreshold": 78, -- "DownThreshold": 73, -- "FanSpeed": 67.0 -- }, -- { -- "UpThreshold": 82, -- "DownThreshold": 76, -- "FanSpeed": 76.0 -- }, -- { -- "UpThreshold": 84, -- "DownThreshold": 80, -- "FanSpeed": 86.0 -- }, -- { -- "UpThreshold": 88, -- "DownThreshold": 83, -- "FanSpeed": 96.0 -- }, -- { -- "UpThreshold": 90, -- "DownThreshold": 86, -- "FanSpeed": 100.0 -- } -- ], -- "FanSpeedPercentageOverrides": [] -- } -- ], -+ { -+ "ReadRegister": 19, -+ "WriteRegister": 55, -+ "MinSpeedValue": 0, -+ "MaxSpeedValue": 100, -+ "IndependentReadMinMaxValues": true, -+ "MinSpeedValueRead": 0, -+ "MaxSpeedValueRead": 6122, -+ "ResetRequired": true, -+ "FanSpeedResetValue": 50, -+ "FanDisplayName": "Ryzen 3550H", -+ "TemperatureThresholds": [ -+ { -+ "UpThreshold": 30, -+ "DownThreshold": 0, -+ "FanSpeed": 0 -+ }, -+ { -+ "UpThreshold": 35, -+ "DownThreshold": 25, -+ "FanSpeed": 10.0 -+ }, -+ { -+ "UpThreshold": 40, -+ "DownThreshold": 30, -+ "FanSpeed": 20.0 -+ }, -+ { -+ "UpThreshold": 45, -+ "DownThreshold": 35, -+ "FanSpeed": 30.0 -+ }, -+ { -+ "UpThreshold": 50, -+ "DownThreshold": 40, -+ "FanSpeed": 40.0 -+ }, -+ { -+ "UpThreshold": 55, -+ "DownThreshold": 45, -+ "FanSpeed": 50.0 -+ }, -+ { -+ "UpThreshold": 60, -+ "DownThreshold": 50, -+ "FanSpeed": 60.0 -+ }, -+ { -+ "UpThreshold": 65, -+ "DownThreshold": 55, -+ "FanSpeed": 70.0 -+ }, -+ { -+ "UpThreshold": 70, -+ "DownThreshold": 60, -+ "FanSpeed": 80.0 -+ }, -+ { -+ "UpThreshold": 75, -+ "DownThreshold": 65, -+ "FanSpeed": 90.0 -+ }, -+ { -+ "UpThreshold": 80, -+ "DownThreshold": 70, -+ "FanSpeed": 100.0 -+ } -+ ], -+ "FanSpeedPercentageOverrides": [] -+ }, -+ { -+ "ReadRegister": 21, -+ "WriteRegister": 58, -+ "MinSpeedValue": 0, -+ "MaxSpeedValue": 100, -+ "IndependentReadMinMaxValues": true, -+ "MinSpeedValueRead": 0, -+ "MaxSpeedValueRead": 6122, -+ "ResetRequired": true, -+ "FanSpeedResetValue": 50, -+ "FanDisplayName": "AMD RX560X", -+ "TemperatureThresholds": [ -+ { -+ "UpThreshold": 30, -+ "DownThreshold": 0, -+ "FanSpeed": 0 -+ }, -+ { -+ "UpThreshold": 35, -+ "DownThreshold": 25, -+ "FanSpeed": 10.0 -+ }, -+ { -+ "UpThreshold": 40, -+ "DownThreshold": 30, -+ "FanSpeed": 20.0 -+ }, -+ { -+ "UpThreshold": 45, -+ "DownThreshold": 35, -+ "FanSpeed": 30.0 -+ }, -+ { -+ "UpThreshold": 50, -+ "DownThreshold": 40, -+ "FanSpeed": 40.0 -+ }, -+ { -+ "UpThreshold": 55, -+ "DownThreshold": 45, -+ "FanSpeed": 50.0 -+ }, -+ { -+ "UpThreshold": 60, -+ "DownThreshold": 50, -+ "FanSpeed": 60.0 -+ }, -+ { -+ "UpThreshold": 65, -+ "DownThreshold": 55, -+ "FanSpeed": 70.0 -+ }, -+ { -+ "UpThreshold": 70, -+ "DownThreshold": 60, -+ "FanSpeed": 80.0 -+ }, -+ { -+ "UpThreshold": 75, -+ "DownThreshold": 65, -+ "FanSpeed": 90.0 -+ }, -+ { -+ "UpThreshold": 80, -+ "DownThreshold": 70, -+ "FanSpeed": 100.0 -+ } -+ ], -+ "FanSpeedPercentageOverrides": [] -+ } -+ ], - "RegisterWriteConfigurations": [ -- { -- "WriteMode": "Set", -- "WriteOccasion": "OnInitialization", -- "Register": 34, -- "Value": 12, -- "ResetRequired": true, -- "ResetValue": 4, -- "ResetWriteMode": "Set", -- "Description": "CPU fan manual mode" -- }, -- { -- "WriteMode": "Set", -- "WriteOccasion": "OnInitialization", -- "Register": 33, -- "Value": 48, -- "ResetRequired": true, -- "ResetValue": 16, -- "ResetWriteMode": "Set", -- "Description": "GPU fan manual mode" -- }, -- { -- "WriteMode": "Set", -- "WriteOccasion": "OnInitialization", -- "Register": 16, -- "Value": 0, -- "ResetRequired": true, -- "ResetValue": 1, -- "ResetWriteMode": "Set", -- "Description": "CoolBoost off" -- } -- ] --} -+ { -+ "WriteMode": "Set", -+ "WriteOccasion": "OnInitialization", -+ "Register": 34, -+ "Value": 12, -+ "ResetRequired": true, -+ "ResetValue": 4, -+ "ResetWriteMode": "Set", -+ "Description": "CPU fan manual mode" -+ }, -+ { -+ "WriteMode": "Set", -+ "WriteOccasion": "OnInitialization", -+ "Register": 33, -+ "Value": 48, -+ "ResetRequired": true, -+ "ResetValue": 16, -+ "ResetWriteMode": "Set", -+ "Description": "GPU fan manual mode" -+ }, -+ { -+ "WriteMode": "Set", -+ "WriteOccasion": "OnInitialization", -+ "Register": 16, -+ "Value": 0, -+ "ResetRequired": true, -+ "ResetValue": 1, -+ "ResetWriteMode": "Set", -+ "Description": "CoolBoost off" -+ } -+ ] -+ } --- -2.45.1 - diff --git a/upstream/packages/nbfc.scm b/upstream/packages/nbfc.scm deleted file mode 100644 index c34ecad..0000000 --- a/upstream/packages/nbfc.scm +++ /dev/null @@ -1,56 +0,0 @@ -(define-module (upstream packages nbfc) - #:use-module (gnu packages admin) - #:use-module (gnu packages autotools) - #:use-module (gnu packages linux) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages python) - #:use-module (guix utils) - #:use-module (guix build utils) - #:use-module (guix build-system gnu) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages)) - -(define-public nbfc-linux - (let ((version "0.2.7") - (revision "0")) - (package - (name "nbfc-linux") - (version version) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nbfc-linux/nbfc-linux") - (commit version))) - (file-name (git-file-name name version)) - (patches (list (local-file "nbfc.patch"))) - (sha256 - (base32 - "1ksypi6xagsjzsl583f2zrcihfg4pn380nrm0sy5rlr127zxdlnn")))) - (build-system gnu-build-system) - (arguments - `(#:make-flags (list (string-append "CC=" - ,(cc-for-target)) - (string-append "PREFIX=" - (assoc-ref %outputs "out")) - ;; (string-append "CONFDIR=" - ;; (assoc-ref %outputs "out") - ;; "/etc") - ;; (string-append "BINDIR=" - ;; (assoc-ref %outputs "out") - ;; "/bin") - ) - #:tests? #f - #:phases (modify-phases %standard-phases - (delete 'configure)))) - (native-inputs (list autoconf pkg-config)) - (inputs (list kmod)) - (propagated-inputs (list python dmidecode)) - (synopsis "NoteBook FanControl ported to Linux") - (description - "This package provides a C port of NoteBook FanControl (NBFC), a fan -control service for notebooks. It provides the same utilities with the same -interfaces as the original NBFC, although the implementation differs.") - (home-page "https://github.com/nbfc-linux/nbfc-linux") - (license license:gpl3+)))) diff --git a/upstream/services/nbfc.scm b/upstream/services/nbfc.scm deleted file mode 100644 index 4b0b646..0000000 --- a/upstream/services/nbfc.scm +++ /dev/null @@ -1,65 +0,0 @@ -(define-module (upstream services nbfc) - ;; #:use-module (gnu packages linux) - #:use-module (gnu services) - #:use-module (gnu services shepherd) - #:use-module (guix build utils) - #:use-module (guix gexp) - #:use-module (guix records) - #:use-module (upstream packages nbfc) - #:export (nbfc-configuration)) - -(define-record-type* <nbfc-configuration> - nbfc-configuration - make-nbfc-configuration - nbfc-configuration? - (package get-nbfc-configuration-package - (default nbfc-linux)) - (model get-nbfc-configuration-model - (default "undefined"))) - -(define (nbfc-etc-extension configuration-record) - (let* ((model (get-nbfc-configuration-model configuration-record)) - - (nbfc-configuration-file (mixed-text-file "nbfc.json-stored" - "{\"SelectedConfigId\": \"" - model - "\"}\n"))) - (list `("nbfc.json" ,nbfc-configuration-file)))) - -(define nbfc-profile-extension - (lambda (configuration-record) - (list (get-nbfc-configuration-package configuration-record)))) - -(define (nbfc-shepherd-extension configuration-record) - (let* ((profile (get-nbfc-configuration-package configuration-record)) - - (service-executable (file-append profile - "/bin/nbfc_service")) - - (start-command #~ (list #$ service-executable - "--config-file" - "/etc/nbfc.json")) - - (start-process #~ (make-forkexec-constructor #$ start-command)) - (symbols (list 'nbfc)) - - (default-service (shepherd-service (provision symbols) - (start start-process)))) - (list default-service))) - -(define-public nbfc-service-type - (let* ((nbfc-etc-extension* (service-extension etc-service-type - nbfc-etc-extension)) - (nbfc-profile-extension* (service-extension profile-service-type - nbfc-profile-extension)) - (nbfc-shepherd-extension* (service-extension shepherd-root-service-type - nbfc-shepherd-extension)) - - (description "C port of Stefan Hirschmann's NoteBook FanControl") - (extensions (list nbfc-etc-extension* - nbfc-profile-extension* - nbfc-shepherd-extension*))) - (service-type (name 'nbfc) - (extensions extensions) - (description description) - (default-value (nbfc-configuration))))) |