How do I get rid of Powertop?

I installed Powertop when I first installed Manjaro on my laptop, a few years ago.

Now, given that every tutorial on power saving suggests disabling Powertop if you’re using another power management service (I use TuneD currently, I used TLP before), I wanted to remove Powertop. But it looks like… I can’t!

Let me explain step by step.

Powertop is loaded by systemd at startup, through a service named powertop.service. powertop.service has the following content:

[Unit]
Description=Powertop tunings

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/powertop --auto-tune

[Install]
WantedBy=multi-user.target

If I disable powertop.service (by running sudo systemctl disable powertop.service), at next boot the graphic environment will not load. In my interpretation, this happens because graphical.target requires multi-user.target, which requires powertop.service.

This is confirmed by running

systemctl list-dependencies --reverse powertop.service    
powertop.service
● └─multi-user.target
●   └─graphical.target

So if powertop.service is disabled, the graphical environment cannot be loaded.

However, it seems crazy to me that the system cannot run without Powertop. And indeed, if I disable it with the graphical session already loaded, the system runs just fine.

So, there might be an obvious solution but I haven’t find a clear way out so far. Uninstalling powertop, disabling powertop.service at startup, modifying powertop.service so that no command is run… I tried all of these and the outcome is the same: Gnome Shell doesn’t load. So it looks like I need to tell multi-user.target that it doesn’t need powertop.service. How do I do that? Thanks for you help.

EDIT: To put it more correctly, the issue is not telling multi-user.target to not require powertop.service. That is done by removing the symlink when the service is disabled. The issue if finding out which service called at startup doesn’t let Gnome Shell load if powertop is not running.

As far as I can see, installing powertop does not result in such a systemd service even being provided.

You apparently have installed the AUR package powertop-auto-tune
This one does provide and install that systemd service.

AUR (en) - powertop-auto-tune

I can’t think of a reason why the system would malfunction without it, though.

That package is not installed. I only have powertop 2.15-2 installed. That systemd service was created by myself years ago to have powertop auto-tune running at startup. The question is why it seems that disabling it results in a graphical session unable to load.

I’m not familiar wit how powertop works, what temporary or permanent options it sets when you run it.
There is likely a configuration file for it
and perhaps your system now has default values set which cause it to not work without setting them with the service.

You would need to look for what it does on every boot, your system seems to rely on these settings.
The tool is normally not needed. :man_shrugging:

this is the service file which the AUR package installs - it's different from the one you created
[Unit]
Description=Powertop tunings

[Service]
Type=forking
RemainAfterExit=no
ExecStart=/usr/bin/powertop --auto-tune

[Install]
WantedBy=multi-user.target

I know, this is why I’m asking for help here in debugging…

To put it more correctly, the issue is not telling multi-user.target to not require powertop.service. That is done by removing the symlink when the service is disabled. The issue if finding out which service called at startup doesn’t let Gnome Shell load if powertop is not running.

Can you collect journals from non working boot and post them here? Maybe journals will help you find what breaks in boot process when you disable the service. Collect them from TTY or boot a live USB and chroot your system.

1 Like

I’ll do that. I’ll disable powertop, fail to boot, login from tty, re-enable powertop, and then export journalctl from the boot before the previous one. That should work.

1 Like

OK… to my great surprise, I was able to boot. What was the thing that I have changed? I had uninstalled tuneD and installed TLP as my main powersaving utility. So, don’t ask me why but at the moment my best guess is that disabling powertop somehow messed up with tuneD and it doesn’t do the same with TLP. I’ll monitor the situation and update if there are any changes. For the moment, I’d mark this as solved. Thanks to all those of you who tried to help.

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