"Power Management" questions for desktop PC's (tlp & powertop)

Inspired by a notification for a tlp update, I got curious about what it was and ended up reading Power Management - Manjaro.

Seems to be focused on laptop/battery power management… neither of which fit my use case on a desktop PC.

Oddly, even though the link above also mentions…

In most cases running more than one power management tool at a time can cause conflicts so it is best practice to only use one of the below options

… I also found I have powertop installed as well. However, installed and running are two different things.

My first reaction is to uninstall these two applications, but thought I would first ask two questions before making any decisions:

  1. Are there any use cases for “laptop management tools” I may not be aware of on desktop PC’s?
  2. If not, are there other “improved laptop experience tools” that should be added to my uninstall list beyond tlp and powertop?

EDIT: I thought I’d try check to see if either of these packages were in use and found…

$ systemctl list-units | grep -iE "tlp|power"
  tlp.service         loaded active exited    TLP system startup/shutdown
  upower.service      loaded active running   Daemon for power management

I have a feeling I am about to learn some things… as tlp seems to serve a function during startup/shutdown. And I found a 3rd power management tool named upower

If you run a desktop PC you can safely uninstall tlp.

1 Like

Thanks for the reply @Wollie !

Two questions:

  1. When I uninstall tlp (or any other package that integrates with systemctl), will it also stop/clean-up the systemctl entries for the tlp.service as well?
  2. No issues uninstalling powertop as well?

Note: I read a bit more @ https://upower.freedesktop.org/, and it’s much bigger than power management… so not messing with it :wink:

It should.

Powertop is far too often abused - most folks force apply all of its tweaks, whereas its main function is reporting and suggesting.
You can safely remove it as well - though I dont believe that removes any changes you have made to the system using powertop.


Thanks for the reply @cscs !

I ran into something while uninstalling tlp and want to confirm my understanding/actions.

I noticed the uninstall prompted hdparm (an optional dependency) removal as well.

And I don’t want that to happen as I do use hdparm to disable APM/Acoustic/Auto-suspend on my mechanical HD’s… Is this a situation where marking a package as explicitly installed is used?

I figure if I do that before the uninstall, then tlp will just remove itself… am I right?

Thats because hdparm was installed -as a dependency-
So according to the system the only reason you want it is for TLP
(and because pamac by default selects other packages … which is a debatable decision)
But yes, marking hdparm as explicit should no longer pull it along with TLP.
If it does, then use pacman (after marking hdparm explicitly installed, however you like):

sudo pacman -Rns tlp
1 Like

Thanks a lot @cscs !

I don’t think I ever used powertop (at least it’s not mentioned in my notes), so I think I’m safe not worrying about any of its profile changes.

This was a good learning example, as I’m starting to get much more comfortable with the pamac terminology…dependencies, orphans, explicitly installed, etc… as well as becoming more “aware” by investigating the scope of the actions listed, aborting if necessary, and not just blindly clicking “next”.

1 Like

Note that the above pacman example was also going to pull unneeded packages.
Along with ‘saved files’.
But with important caveats:

provided that (A) they are not required by other packages; and (B) they were not explicitly installed by the user. This operation is recursive

(we should almost always avoid the -c or cascade option as noted below)

-c, --cascade
Remove all target packages, as well as all packages that depend on one or more target packages. This operation is recursive and must be used with care, since it can remove many potentially needed packages.

-n, --nosave
Instructs pacman to ignore file backup designations. Normally, when a file is removed from the system, the database is checked to see if the file should be renamed with a .pacsave extension.

-s, --recursive
Remove each target specified including all of their dependencies, provided that (A) they are not required by other packages; and (B) they were not explicitly installed by the user. This operation is recursive and analogous to a backwards --sync operation, and it helps keep a clean system without orphans. If you want to omit condition (B), pass this option twice.

-u, --unneeded
Removes targets that are not required by any other packages. This is mostly useful when removing a group without using the -c option, to avoid breaking any dependencies.

(so of course, a simple -R would have excluded those options)

Pamac has somewhat similar options under its --help, and mirrored to some extent in the GUI settings.

1 Like

More great information!

I ran grep --extended-regexp "\.pac(new|save)" /var/log/pacman.log to see if any .pacsaves were created as I didn’t see an equivalent setting in the pamac GUI… all clear!

But I did notice I have Remove unrequired dependencies set… which was why I was prompted to remove hdparm.

I’ll definitely refer to your notes if/when I use pacman in the terminal.

Ah … for this we can use pacdiff
Which is actually a tool for inspecting and merging these things like pacnews as well.
But we can also use it to simply report:

pacdiff -o
1 Like

Thanks for the tip! I’ll have to read the man pacdiff as I haven’t yet used this tool.

Currently pacdiff -o returns nothing… so I assume that means I’m in the clear :wink:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.