Skip to content

battery: Integrated tlp for power profile switching#1273

Open
Kalagmitan wants to merge 7 commits intocaelestia-dots:mainfrom
Kalagmitan:added-tlp-support
Open

battery: Integrated tlp for power profile switching#1273
Kalagmitan wants to merge 7 commits intocaelestia-dots:mainfrom
Kalagmitan:added-tlp-support

Conversation

@Kalagmitan
Copy link
Contributor

  • Implemented the ability to switch between power profiles depending on the power management backend, in this case, tlp or power-profiles-daemon (ppd).
  • Added an abstraction layer that checks whether the user uses tlp or ppd, and depending on which one, it will use the corresponding commands for that backend to switch between power profiles.
  • The abstraction layer can be potentially expanded upon to include more commands from tlp to be hooked to some tab in the settings to leverage its insane battery customizability.

Some Limitations:

  • If some guy changes the power management backend for some reason, the shell will not react to it (it's a waste of performance to make it so). The shells needs to be restarted to make it see the switch.
  • Switching power profiles while on tlp will require a password prompt to gain sudo because tlp works differently from ppd, because of this the UX may feel off. The only solution to this is to make the user (or installation script) modify the sudoer file so tlp can just run unrestricted. I'll leave this as is for now tho.
hi.mp4

+ Implemented the ability to switch between power profiles depending on
the power management backend, in this case, tlp or power-profiles-daemon
(ppd).
+ Added an abstraction layer that checks whether the user uses tlp or
ppd, and depending on which one, it will use the corresponding commands
for that backend to switch between power profiles.
+ The abstraction layer can be potentially expanded upon to include more
commands from tlp to be hooked to some tab in the settings to leverage
its insane battery customizability.

Some Limitations:
+ If one changes the power management backend for some reason, the shell
will not react to it (it's a waste of performance to make it so). The
shells needs to be restarted to make it see the switch.
+ Switching power profiles while on tlp will require a password prompt
to gain sudo because tlp works differently from ppd, because of this,
the UX may feel off. The only solution to this is to make the user (or
installation script) modify the sudoer file so tlp can just run
unrestricted. I'll leave this as is for now tho.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant