How on Lubuntu 18.04 one may disable power management, from CLI?

I want to add to my setup script disabling them completely.

I am never using laptop on the battery, and things love to crash when laptop is hibernating/going to sleep - so I want to just get rid of it.

Given that I am likely to soon upgrade to later version (qt based) - what is the good way to have an answer to this question? Is it documented somewhere?

I found https://manual.lubuntu.me/stable/3/3.2/3.2.12/power_management.html but it is for later version (with no option to see for older versions) and has GUI only version.

I found https://ubuntuforums.org/showthread.php?t=1591566 but it is hilariously old.

There are https://askubuntu.com/questions/47311/how-do-i-disable-my-system-from-going-to-sleep https://serverfault.com/questions/321499/how-to-disable-all-power-management-in-ubuntu-for-a-server-netbook with bunch of random solution, I have no idea what would be a good one to check (after excluding one clearly relying on Gnome desktop)

It’s all related to the Freedesktop Autostart Specification. tl;dr in $XDG_CONFIG_DIRS/autostart (in our case, it’s /etc/xdg) are the applications that get autostarted. Remove xfce4-power-manager.desktop there and you’re set.¹

If you still want to access it, you’ll still have a link to the settings (since there is /usr/share/applications/xfce4-power-manager-settings.desktop) in the menu. It will ask you if you want to start the daemon upon opening.


¹ I did try to set Hidden=true which should disable it, but it didn’t work for some odd reason. Perhaps the specification is poorly implemented by LXDE. This is not surprising given its relative lack of development once LXQt came around in ~2014. Given that we’ve only got about a year left of support in 18.04 and little hope of any real development, I’d personally suggest jumping ship to LXQt.

1 Like

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