TLP icon indicating copy to clipboard operation
TLP copied to clipboard

[Feature request] Use the tlp command without sudo

Open joaopauloalbq opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

This is a usability problem, asking for authentication every time the user changes profiles manually.

Describe the solution you'd like

A clear and concise description of:

  • Your use case(s) I want to create a widget/dashboard to switch between ac and bat profiles.

  • What you want to happen Use the tlp commands without sudo: $ tlp true $ tlp false

Additional context

powerprofilesctl doesn't need authentication to change the power profile. Other operating systems change energy profiles without asking for privileges too.

Mac power-mode-mac

Windows power-mode-win11

joaopauloalbq avatar Jul 13 '24 17:07 joaopauloalbq

Hi,

this would require a daemon running with root privilege, which TLP does not have.

https://linrunner.de/tlp/developers/architecture.html

Adding a daemon would mean more or less rewriting TLP from scratch, what I do not intend to do anytime soon.

The basic idea of TLP is to automatically change the profile depending on the power source and providing just two profiles AC/BAT. The use case of a manual change has no priority.

You may of course write a root daemon (that calls tlp) yourself or you may look at the possibilities of /etc/sudoers.

Btw. I consider tlp false|true deprecated. Better use tlp bat|ac.

linrunner avatar Jul 21 '24 16:07 linrunner

Hi Linrunner,

I understand.

Thank you for TLP

joaopauloalbq avatar Jul 24 '24 19:07 joaopauloalbq