Skip to content

Add devices to disable for power saver, decoupleing balanced and powersaver#892

Open
dusklinux wants to merge 3 commits into
linrunner:mainfrom
dusklinux:main
Open

Add devices to disable for power saver, decoupleing balanced and powersaver#892
dusklinux wants to merge 3 commits into
linrunner:mainfrom
dusklinux:main

Conversation

@dusklinux

Copy link
Copy Markdown

No description provided.

@dusklinux dusklinux changed the title Add devices to disable for for power saver, decoupleing balanced and powersaver Add devices to disable for power saver, decoupleing balanced and powersaver Jul 2, 2026
@linrunner

Copy link
Copy Markdown
Owner

Thanks in advance. I'm busy right now, but I'll check back when I have time.

@dusklinux

dusklinux commented Jul 3, 2026

Copy link
Copy Markdown
Author

No problem.

The code base was well written, and required only surgical edits because the groundwork was already laid out. I only added ~38 liines using the same logic you already had in place.

@dusklinux

This comment was marked as off-topic.

@linrunner

linrunner commented Jul 6, 2026

Copy link
Copy Markdown
Owner

This approach isn't complete yet, the topic is more complicated.

When switching from balanced to power-saver profile, the radios listed in DEVICES_TO_DISABLE_ON_SAV get disabled. However, when switching from power-saver back to balanced, nothing happens. I'm guessing that's not what you're expecting.

@dusklinux

Copy link
Copy Markdown
Author

That's interesting, I'll re-test to make sure it works, and push the commit where it needs fixing.

@linrunner

linrunner commented Jul 6, 2026

Copy link
Copy Markdown
Owner

We'll need a DEVICES_TO_ENABLE_ON_BAT.

In addition, the fallback DEVICES_TO_DISABLE_ON_BAT -> _SAV is up for discussion. I consider it counterproductive and confusing in the extended scenario.

Finally, I'd like to consolidate the sections in tlp.conf; otherwise, it will become overwhelming. I'll do that myself once functionality is finished.

@dusklinux

Copy link
Copy Markdown
Author

I have updated the pr to address your feedback:

Added DEVICES_TO_ENABLE_ON_BAT and DEVICES_TO_ENABLE_ON_SAV to give users explicit control over enabling specific devices when transitioning back to the balanced profile.

Removed the fallback behavior between _BAT and _SAV configuration options, making the profiles completely independent.

Updated tlp.conf.in with documentation for the new variables and removed fallback descriptions.

I have tested transitions between all profiles (performance, balanced, power-saver) on my system, and the devices now enable and disable correctly. I made sure to have it match the naming scheme that you already had in place.

I spent the last two hours figuring it out and fixing it. I've stress tested it every whichway, rest assured it works well now.

@linrunner

Copy link
Copy Markdown
Owner

Great. I'm still working on something else right now. I'll take a look at it after that.

@dusklinux

Copy link
Copy Markdown
Author

Alright, I wont hold my breath,

@fayizshaffaq

Copy link
Copy Markdown

@dusklinux will tlp setup be re added to dusky after this is merged?

@dusklinux

Copy link
Copy Markdown
Author

Yup.

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.

3 participants