NixOS power consumption

I just got my framework laptop last week and installed NixOS 21.05 on it. So far, it’s mostly going well but I’m still trying to optimize battery life by enabling power management services like power-profiles-daemon and tweaking kernel modules/parameters. Running Sway as a window manager with a few terminals, firefox open, and backlight at 10%, I get between 9 and 11 watts of power consumption. I would expect more like 6 to 8 watts with minimal activity.

Looking through powertop, I can’t figure out exactly what’s consuming so much energy. I tried removing my MicroSD expansion card, because it was at the top of powertop once. Disabling wifi makes little difference. It seems like powertop doesn’t have enough information, because sometimes it shows the backlight at 10% as consuming 5W, and now “intel_atomic_commit_work” at 6W. Does anyone have ideas for how to diagnose this?

2 Likes

I’m running 21.11 with tlp enabled and a few custom config options set:

CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave";
START_CHARGE_THRESH_BAT0 = 90;
STOP_CHARGE_THRESH_BAT0 = 97;
RUNTIME_PM_ON_BAT = "auto";

With the above I was getting about 7-1/2 hours on a charge. Then I took out my second (32GB) stick of RAM and now I’m running about 9 hours, which is good enough for me.

None of the powertop diagnostics helped much in my own tinkering, FWIW.

4 Likes