feat: add tlp-service and thermald-service in system declaration to improve battery life

pull/1/head
anemofilia 2023-08-27 14:20:46 -03:00
parent 8cd08991f8
commit b044c92cec
No known key found for this signature in database
GPG Key ID: 5A8F3D62C87A2B33
1 changed files with 21 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#|D|# desktop #|D|# desktop
#|M|# mcron #|M|# mcron
#|N|# networking #|N|# networking
#|P|# pm
#|S|# sound sysctl) #|S|# sound sysctl)
(use-package-modules (use-package-modules
@ -214,6 +215,26 @@
(dhcp-client-configuration (dhcp-client-configuration
(interfaces 'all))) (interfaces 'all)))
#|Power management services|#
(service tlp-service-type
(tlp-configuration
(cpu-scaling-governor-on-ac '("performance"))
(cpu-scaling-governor-on-bat '("powersave"))
(cpu-scaling-min-freq-on-ac 1500000)
(cpu-scaling-max-freq-on-ac 3500000)
(cpu-scaling-min-freq-on-bat 1000000)
(cpu-scaling-max-freq-on-bat 3000000)
(cpu-min-perf-on-ac 0)
(cpu-max-perf-on-ac 100)
(cpu-min-perf-on-bat 0)
(cpu-max-perf-on-bat 40)
(cpu-boost-on-ac? #t)
(cpu-boost-on-bat? #f)
(nmi-watchdog? #t)
(start-charge-thresh-bat0 70)
(stop-charge-thresh-bat0 90)))
(service thermald-service-type)
#|Thinkfan services|# #|Thinkfan services|#
(simple-service 'thinkfan-config etc-service-type (simple-service 'thinkfan-config etc-service-type
`(("modprobe.d/thinkfan.conf" ,file:thinkfan-modprobe-config) `(("modprobe.d/thinkfan.conf" ,file:thinkfan-modprobe-config)