Skip to content

Commit 9ff0319

Browse files
committed
replace tlp with power-profiles-daemon
TLP is often no longer the best choice since firmware provides power profiles instead. That's why we are removing TLP as the default option. We may want to bring back TLP to some old hardware if it makes sense i.e. certain thinkpad modules.
1 parent 3c5e126 commit 9ff0319

File tree

10 files changed

+6
-41
lines changed

10 files changed

+6
-41
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ For example:
1414

1515
```nix
1616
{ lib }: {
17-
# Using mkDefault, because the user might want to disable tlp
18-
services.tlp.enable = lib.mkDefault true;
17+
# Using mkDefault, because the user might want to disable power-profiles-daemon
18+
services.power-profiles-daemon.enable = lib.mkDefault true;
19+
1920
# No need to use mkDefault, because the setting will merge with the user's setting
2021
boot.kernelModules = [ "tmp_smapi" ];
2122
}

asus/fa507nv/default.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/[email protected]/
2323
boot.kernelParams = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"];
2424

25-
# AMD has better battery life with PPD over TLP:
26-
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
27-
services.power-profiles-daemon.enable = lib.mkDefault true;
28-
2925
# Adds the missing asus functionality to Linux.
3026
# https://asus-linux.org/manual/asusctl-manual/
3127
services = {

common/pc/laptop/default.nix

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
{ config, lib, ... }:
2-
3-
{
1+
{ lib, config, ... }: {
42
imports = [ ../. ];
53

6-
# Gnome 40 introduced a new way of managing power, without tlp.
7-
# However, these 2 services clash when enabled simultaneously.
8-
# https://github.com/NixOS/nixos-hardware/issues/260
9-
services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
10-
|| !config.services.power-profiles-daemon.enable);
4+
config.services.power-profiles-daemon.enable = lib.mkDefault config.services.tlp.enable;
115
}

dell/inspiron/14-5420/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@
88
`fwupd` is used to receive firmware updates from vendors. This device is in its [supported devices list](https://fwupd.org/lvfs/devices/)
99

1010
`thermald` is used to achieve better thermal behaviour
11-
12-
##### TLP
13-
TLP is a battery power optimizer for laptops. It is enabled by default, however, since it conflicts with power-profiles-daemon which is GNOME's power management system, TLP will not be installed with if power-profiles-daemon or a recent version of GNOME is present.

framework/13-inch/common/amd.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,4 @@
1616
]
1717
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/[email protected]/
1818
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"];
19-
20-
# AMD has better battery life with PPD over TLP:
21-
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
22-
services.power-profiles-daemon.enable = lib.mkDefault true;
2319
}

framework/16-inch/common/amd.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,4 @@
1616
]
1717
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/[email protected]/
1818
++ lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8") ["rtc_cmos.use_acpi_alarm=1"];
19-
20-
# AMD has better battery life with PPD over TLP:
21-
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
22-
services.power-profiles-daemon.enable = lib.mkDefault true;
2319
}

gpd/win-2/default.nix

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
"video=eDP-1:panel_orientation=right_side_up"
1111
];
1212

13-
services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
14-
|| !config.services.power-profiles-daemon.enable);
15-
1613
# Required for grub to properly display the boot menu.
1714
boot.loader.grub.gfxmodeEfi = lib.mkDefault "720x1280x32";
1815

lenovo/ideapad/15arh05/default.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,4 @@
1717

1818
# Cooling management
1919
services.thermald.enable = lib.mkDefault true;
20-
21-
# tlp defaults to "powersave", which doesn't exist on this laptop
22-
services.tlp.settings = {
23-
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
24-
};
2520
}

lenovo/legion/16aph8/default.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,4 @@
3232

3333
# Avoid issues with modesetting causing blank screen
3434
services.xserver.videoDrivers = [ "nvidia" ];
35-
36-
# AMD has better battery life with PPD over TLP:
37-
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
38-
services.power-profiles-daemon.enable = lib.mkDefault true;
3935
}

microsoft/surface/common/default.nix

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let
2828
"6.14.2"
2929
else
3030
abort "Invalid kernel version: ${kernelVersion}";
31-
31+
3232
pkgHash = with config.hardware.microsoft-surface;
3333
if kernelVersion == "longterm" then
3434
"sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY="
@@ -77,9 +77,6 @@ in {
7777
kernelParams = mkDefault [ "mem_sleep_default=deep" ];
7878
};
7979

80-
# NOTE: Check the README before enabling TLP:
81-
services.tlp.enable = mkDefault false;
82-
8380
# Needed for wifi firmware, see https://github.com/NixOS/nixos-hardware/issues/364
8481
hardware = {
8582
enableRedistributableFirmware = mkDefault true;

0 commit comments

Comments
 (0)