The (gnu services pm)
module provides a Guix service definition for
the Linux Power Profiles Daemon, which makes power profiles handling
available over D-Bus.
The available profiles consist of the default ‘balanced’ mode, a ‘power-saver’ mode and on supported systems a ‘performance’ mode.
Important: The
power-profiles-daemon
conflicts with other power management tools liketlp
. Using both together is not recommended.
This is the service type for the
Power
Profiles Daemon. The value for this service is a
power-profiles-daemon-configuration
.
To enable the Power Profiles Daemon with default configuration add this line to your services:
(service power-profiles-daemon-service-type)
Data type representing the configuration of
power-profiles-daemon-service-type
.
power-profiles-daemon
(default: power-profiles-daemon
) (type: file-like)Package object of power-profiles-daemon.
The (gnu services pm)
module provides a Guix service definition for
the Linux power management tool TLP.
TLP enables various powersaving modes in userspace and kernel. Contrary to
upower-service
, it is not a passive, monitoring tool, as it will
apply custom settings each time a new power source is detected. More
information can be found at TLP
home page.
The service type for the TLP tool. The default settings are optimised for
battery life on most systems, but you can tweak them to your heart’s content
by adding a valid tlp-configuration
:
(service tlp-service-type
(tlp-configuration
(cpu-scaling-governor-on-ac (list "performance"))
(sched-powersave-on-bat? #t)))
Each parameter definition is preceded by its type; for example,
‘boolean foo’ indicates that the foo
parameter should be
specified as a boolean. Types starting with maybe-
denote parameters
that won’t show up in TLP config file when their value is left unset, or is
explicitly set to the %unset-value
value.
Available tlp-configuration
fields are:
tlp-configuration
parameter: package tlp ¶The TLP package.
tlp-configuration
parameter: boolean tlp-enable? ¶Set to true if you wish to enable TLP.
Defaults to ‘#t’.
tlp-configuration
parameter: string tlp-default-mode ¶Default mode when no power supply can be detected. Alternatives are AC and BAT.
Defaults to ‘"AC"’.
tlp-configuration
parameter: non-negative-integer disk-idle-secs-on-ac ¶Number of seconds Linux kernel has to wait after the disk goes idle, before syncing on AC.
Defaults to ‘0’.
tlp-configuration
parameter: non-negative-integer disk-idle-secs-on-bat ¶Same as disk-idle-ac
but on BAT mode.
Defaults to ‘2’.
tlp-configuration
parameter: non-negative-integer max-lost-work-secs-on-ac ¶Dirty pages flushing periodicity, expressed in seconds.
Defaults to ‘15’.
tlp-configuration
parameter: non-negative-integer max-lost-work-secs-on-bat ¶Same as max-lost-work-secs-on-ac
but on BAT mode.
Defaults to ‘60’.
tlp-configuration
parameter: maybe-space-separated-string-list cpu-scaling-governor-on-ac ¶CPU frequency scaling governor on AC mode. With intel_pstate driver, alternatives are powersave and performance. With acpi-cpufreq driver, alternatives are ondemand, powersave, performance and conservative.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-space-separated-string-list cpu-scaling-governor-on-bat ¶Same as cpu-scaling-governor-on-ac
but on BAT mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-scaling-min-freq-on-ac ¶Set the min available frequency for the scaling governor on AC.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-scaling-max-freq-on-ac ¶Set the max available frequency for the scaling governor on AC.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-scaling-min-freq-on-bat ¶Set the min available frequency for the scaling governor on BAT.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-scaling-max-freq-on-bat ¶Set the max available frequency for the scaling governor on BAT.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-min-perf-on-ac ¶Limit the min P-state to control the power dissipation of the CPU, in AC mode. Values are stated as a percentage of the available performance.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-max-perf-on-ac ¶Limit the max P-state to control the power dissipation of the CPU, in AC mode. Values are stated as a percentage of the available performance.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-min-perf-on-bat ¶Same as cpu-min-perf-on-ac
on BAT mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer cpu-max-perf-on-bat ¶Same as cpu-max-perf-on-ac
on BAT mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-boolean cpu-boost-on-ac? ¶Enable CPU turbo boost feature on AC mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-boolean cpu-boost-on-bat? ¶Same as cpu-boost-on-ac?
on BAT mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: boolean sched-powersave-on-ac? ¶Allow Linux kernel to minimize the number of CPU cores/hyper-threads used under light load conditions.
Defaults to ‘#f’.
tlp-configuration
parameter: boolean sched-powersave-on-bat? ¶Same as sched-powersave-on-ac?
but on BAT mode.
Defaults to ‘#t’.
tlp-configuration
parameter: boolean nmi-watchdog? ¶Enable Linux kernel NMI watchdog.
Defaults to ‘#f’.
tlp-configuration
parameter: maybe-string phc-controls ¶For Linux kernels with PHC patch applied, change CPU voltages. An example value would be ‘"F:V F:V F:V F:V"’.
Defaults to ‘disabled’.
tlp-configuration
parameter: string energy-perf-policy-on-ac ¶Set CPU performance versus energy saving policy on AC. Alternatives are performance, normal, powersave.
Defaults to ‘"performance"’.
tlp-configuration
parameter: string energy-perf-policy-on-bat ¶Same as energy-perf-policy-ac
but on BAT mode.
Defaults to ‘"powersave"’.
tlp-configuration
parameter: space-separated-string-list disks-devices ¶Hard disk devices.
tlp-configuration
parameter: space-separated-string-list disk-apm-level-on-ac ¶Hard disk advanced power management level.
tlp-configuration
parameter: space-separated-string-list disk-apm-level-on-bat ¶Same as disk-apm-bat
but on BAT mode.
tlp-configuration
parameter: maybe-space-separated-string-list disk-spindown-timeout-on-ac ¶Hard disk spin down timeout. One value has to be specified for each declared hard disk.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-space-separated-string-list disk-spindown-timeout-on-bat ¶Same as disk-spindown-timeout-on-ac
but on BAT mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-space-separated-string-list disk-iosched ¶Select IO scheduler for disk devices. One value has to be specified for each declared hard disk. Example alternatives are cfq, deadline and noop.
Defaults to ‘disabled’.
tlp-configuration
parameter: string sata-linkpwr-on-ac ¶SATA aggressive link power management (ALPM) level. Alternatives are min_power, medium_power, max_performance.
Defaults to ‘"max_performance"’.
tlp-configuration
parameter: string sata-linkpwr-on-bat ¶Same as sata-linkpwr-ac
but on BAT mode.
Defaults to ‘"min_power"’.
tlp-configuration
parameter: maybe-string sata-linkpwr-blacklist ¶Exclude specified SATA host devices for link power management.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-on-off-boolean ahci-runtime-pm-on-ac? ¶Enable Runtime Power Management for AHCI controller and disks on AC mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-on-off-boolean ahci-runtime-pm-on-bat? ¶Same as ahci-runtime-pm-on-ac
on BAT mode.
Defaults to ‘disabled’.
tlp-configuration
parameter: non-negative-integer ahci-runtime-pm-timeout ¶Seconds of inactivity before disk is suspended.
Defaults to ‘15’.
tlp-configuration
parameter: string pcie-aspm-on-ac ¶PCI Express Active State Power Management level. Alternatives are default, performance, powersave.
Defaults to ‘"performance"’.
tlp-configuration
parameter: string pcie-aspm-on-bat ¶Same as pcie-aspm-ac
but on BAT mode.
Defaults to ‘"powersave"’.
tlp-configuration
parameter: maybe-non-negative-integer start-charge-thresh-bat0 ¶Percentage when battery 0 should begin charging. Only supported on some laptops.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer stop-charge-thresh-bat0 ¶Percentage when battery 0 should stop charging. Only supported on some laptops.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer start-charge-thresh-bat1 ¶Percentage when battery 1 should begin charging. Only supported on some laptops.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-non-negative-integer stop-charge-thresh-bat1 ¶Percentage when battery 1 should stop charging. Only supported on some laptops.
Defaults to ‘disabled’.
tlp-configuration
parameter: string radeon-power-profile-on-ac ¶Radeon graphics clock speed level. Alternatives are low, mid, high, auto, default.
Defaults to ‘"high"’.
tlp-configuration
parameter: string radeon-power-profile-on-bat ¶Same as radeon-power-ac
but on BAT mode.
Defaults to ‘"low"’.
tlp-configuration
parameter: string radeon-dpm-state-on-ac ¶Radeon dynamic power management method (DPM). Alternatives are battery, performance.
Defaults to ‘"performance"’.
tlp-configuration
parameter: string radeon-dpm-state-on-bat ¶Same as radeon-dpm-state-ac
but on BAT mode.
Defaults to ‘"battery"’.
tlp-configuration
parameter: string radeon-dpm-perf-level-on-ac ¶Radeon DPM performance level. Alternatives are auto, low, high.
Defaults to ‘"auto"’.
tlp-configuration
parameter: string radeon-dpm-perf-level-on-bat ¶Same as radeon-dpm-perf-ac
but on BAT mode.
Defaults to ‘"auto"’.
tlp-configuration
parameter: on-off-boolean wifi-pwr-on-ac? ¶Wifi power saving mode.
Defaults to ‘#f’.
tlp-configuration
parameter: on-off-boolean wifi-pwr-on-bat? ¶Same as wifi-power-ac?
but on BAT mode.
Defaults to ‘#t’.
tlp-configuration
parameter: y-n-boolean wol-disable? ¶Disable wake on LAN.
Defaults to ‘#t’.
tlp-configuration
parameter: non-negative-integer sound-power-save-on-ac ¶Timeout duration in seconds before activating audio power saving on Intel HDA and AC97 devices. A value of 0 disables power saving.
Defaults to ‘0’.
tlp-configuration
parameter: non-negative-integer sound-power-save-on-bat ¶Same as sound-powersave-ac
but on BAT mode.
Defaults to ‘1’.
tlp-configuration
parameter: y-n-boolean sound-power-save-controller? ¶Disable controller in powersaving mode on Intel HDA devices.
Defaults to ‘#t’.
tlp-configuration
parameter: boolean bay-poweroff-on-bat? ¶Enable optical drive in UltraBay/MediaBay on BAT mode. Drive can be powered on again by releasing (and reinserting) the eject lever or by pressing the disc eject button on newer models.
Defaults to ‘#f’.
tlp-configuration
parameter: string bay-device ¶Name of the optical drive device to power off.
Defaults to ‘"sr0"’.
tlp-configuration
parameter: string runtime-pm-on-ac ¶Runtime Power Management for PCI(e) bus devices. Alternatives are on and auto.
Defaults to ‘"on"’.
tlp-configuration
parameter: string runtime-pm-on-bat ¶Same as runtime-pm-ac
but on BAT mode.
Defaults to ‘"auto"’.
tlp-configuration
parameter: boolean runtime-pm-all? ¶Runtime Power Management for all PCI(e) bus devices, except blacklisted ones.
Defaults to ‘#t’.
tlp-configuration
parameter: maybe-space-separated-string-list runtime-pm-blacklist ¶Exclude specified PCI(e) device addresses from Runtime Power Management.
Defaults to ‘disabled’.
tlp-configuration
parameter: space-separated-string-list runtime-pm-driver-blacklist ¶Exclude PCI(e) devices assigned to the specified drivers from Runtime Power Management.
tlp-configuration
parameter: boolean usb-autosuspend? ¶Enable USB autosuspend feature.
Defaults to ‘#t’.
tlp-configuration
parameter: maybe-string usb-blacklist ¶Exclude specified devices from USB autosuspend.
Defaults to ‘disabled’.
tlp-configuration
parameter: boolean usb-blacklist-wwan? ¶Exclude WWAN devices from USB autosuspend.
Defaults to ‘#t’.
tlp-configuration
parameter: maybe-string usb-whitelist ¶Include specified devices into USB autosuspend, even if they are already
excluded by the driver or via usb-blacklist-wwan?
.
Defaults to ‘disabled’.
tlp-configuration
parameter: maybe-boolean usb-autosuspend-disable-on-shutdown? ¶Enable USB autosuspend before shutdown.
Defaults to ‘disabled’.
tlp-configuration
parameter: boolean restore-device-state-on-startup? ¶Restore radio device state (bluetooth, wifi, wwan) from previous shutdown on system startup.
Defaults to ‘#f’.
The (gnu services pm)
module provides an interface to thermald, a CPU
frequency scaling service which helps prevent overheating.
This is the service type for thermald, the Linux Thermal Daemon, which is responsible for controlling the thermal state of processors and preventing overheating.
Data type representing the configuration of thermald-service-type
.
adaptive?
(default: #f
)Use DPTF (Dynamic Power and Thermal Framework) adaptive tables when present.
ignore-cpuid-check?
(default: #f
)Ignore cpuid check for supported CPU models.
thermald
(default: thermald)Package object of thermald.
The (gnu services pm)
module also provides a service definition for
PowerTOP, a power consumption analysis and
tuning tool. When started, it tunes Linux kernel settings to reduce power
consumption.
The service type for PowerTOP. No configuration is necessary. When the
service starts, it executes powertop --auto-tune
.
(service powertop-service-type)
Available powertop-configuration
fields are:
powertop-configuration
parameter: package powertop ¶The PowerTOP package. Defaults to powertop
in the (gnu
packages linux)
module