# Can't enable TLP when upgrading to 21.05

**URL:** https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435
**Category:** Help
**Created:** [June 3, 2021, 4:08pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435 "2021-06-03T16:08:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ciferkey](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ciferkey/32/3641_2.png) [@ciferkey](https://discourse.nixos.org/u/ciferkey)
#### Post date: [June 3, 2021, 4:08pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/1 "2021-06-03T16:08:19Z")

</div>

When upgrading to 21.05 the build fails with:

```auto
error: while evaluating the attribute 'config.system.build.toplevel' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:293:5:
while evaluating 'foldr' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:52:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:128:12:
while evaluating 'fold'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:55:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:59:8:

Failed assertions:
- You have set services.power-profiles-daemon.enable = true;
which conflicts with services.tlp.enable = true;

```

When I disabled TLP I was able to upgrade. After the upgrade if I reenable TLP I get the same error.

I do not see services.power-profiles-daemon.enable = true; set anywhere in my configuration. Is there some other way that it is being set?

I do not see any mention of TLP in [NixOS 23.11 manual | Nix & NixOS](https://nixos.org/manual/nixos/stable/release-notes.html#sec-release-21.05-incompatibilities)

---

<div class="post-metadata">

### Author: ![cmm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/cmm/32/3347_2.png) [@cmm](https://discourse.nixos.org/u/cmm)
#### Post date: [June 3, 2021, 4:19pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/2 "2021-06-03T16:19:58Z")

</div>

power-profiles-daemon is part of Gnome 40, which you are probably using.  
use powertop to see if p-p-d does a decent job as is for you – chances are it does and you don’t really need TLP.

---

<div class="post-metadata">

### Author: ![ciferkey](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ciferkey/32/3641_2.png) [@ciferkey](https://discourse.nixos.org/u/ciferkey)
#### Post date: [June 3, 2021, 5:47pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/3 "2021-06-03T17:47:33Z")

</div>

That’s really cool to hear. Maybe I’ll do some benchmarking to compare.

---

<div class="post-metadata">

### Author: ![cwyc](https://discourse.nixos.org/user_avatar/discourse.nixos.org/cwyc/32/3209_2.png) [@cwyc](https://discourse.nixos.org/u/cwyc)
#### Post date: [June 3, 2021, 10:20pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/4 "2021-06-03T22:20:51Z")

</div>

To use TLP you have to explicitly add `services.power-profiles-daemon.enable = false;` in your config.  
Here’s the line that includes power-profiles-daemon in gnome: [https://github.com/NixOS/nixpkgs/blob/ab0d28758e9fe82a13c0c2f96063727d4f54ecb4/nixos/modules/services/x11/desktop-managers/gnome.nix#L358](https://github.com/NixOS/nixpkgs/blob/ab0d28758e9fe82a13c0c2f96063727d4f54ecb4/nixos/modules/services/x11/desktop-managers/gnome.nix#L358)  
This issue’s been mentioned here: [power-profiles-daemon: init at 0.1, add service module by mvnetbiz · Pull Request #97972 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/97972#issuecomment-834774554)

---

<div class="post-metadata">

### Author: ![supermarin](https://discourse.nixos.org/user_avatar/discourse.nixos.org/supermarin/32/9149_2.png) [@supermarin](https://discourse.nixos.org/u/supermarin)
#### Post date: [June 11, 2021, 1:05pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/5 "2021-06-11T13:05:22Z")

</div>

Side note, should this be conditionally enabled then as well?

> <https://github.com/NixOS/nixos-hardware/blob/6bea9761693b5d185d34bef205edb25a8081db57/common/pc/laptop/acpi_call.nix>

---

<div class="post-metadata">

### Author: ![zoof](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/z/e56c9b/32.png) [@zoof](https://discourse.nixos.org/u/zoof)
#### Post date: [December 8, 2021, 5:22pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/6 "2021-12-08T17:22:45Z")

</div>

FYI, in my own case with Intel hardware using 21.11, according to `powertop`, `tlp` does a much better job than `p-p-d`.

---

<div class="post-metadata">

### Author: ![cmm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/cmm/32/3347_2.png) [@cmm](https://discourse.nixos.org/u/cmm)
#### Post date: [December 29, 2021, 5:34pm UTC](https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/7 "2021-12-29T17:34:37Z")

</div>

To add a data point.  
I’ve recently put NixOS on an old laptop (Lenovo X220), and enabled TLP thinking that since this is a Thinkpad and it’s old, TLP is just the thing.  
Then spent several hours trying to figure out why hibernation (more specifically, waking up from hibernation) locks the laptop up cold, but only when I hibernate when on battery.

Turned out that TLP was the culprit – it put the wifi card in some sort of power saving mode that happens to break hibernation. And this is TLP’s default behavior!

So I disabled TLP and instead set `powerManagement.powertop.enable = true`, all good now (including power consumption).

This was another installment of “when in doubt, stay with the defaults and follow Fedora”, I suppose…
