Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Use the tlp command without sudo #750

Closed
joaopauloalbq opened this issue Jul 13, 2024 · 2 comments
Closed

[Feature request] Use the tlp command without sudo #750

joaopauloalbq opened this issue Jul 13, 2024 · 2 comments

Comments

@joaopauloalbq
Copy link

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

@linrunner
Copy link
Owner

linrunner commented Jul 21, 2024

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.

@joaopauloalbq
Copy link
Author

Hi Linrunner,

I understand.

Thank you for TLP

@joaopauloalbq joaopauloalbq closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants