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

Add support for Kprofiles [Feature Request] #146

Open
dariusz-goc opened this issue Jan 23, 2023 · 2 comments
Open

Add support for Kprofiles [Feature Request] #146

dariusz-goc opened this issue Jan 23, 2023 · 2 comments
Assignees

Comments

@dariusz-goc
Copy link

dariusz-goc commented Jan 23, 2023

Many recent kernels have started using so called "kprofiles". This solution is similar to Spectrum, however it uses different contact points. A similar UI to Spectrum UI could be utilized for that feature as those two seem to be very similar. There should be one switch for Auto Kprofiles and one list selection for Disabled/Battery/Balanced/Performance (auto kprofiles and kprofiles mode are independent settings). There should also be a switch to apply those settings on Boot, because they don't seem to stick.

Description taken from the project's GitHub page below:

Kprofiles is a simple Linux kernel module that can be used to regulate in-kernel activities such as boosts that are normally not exposed to the userspace. Kprofiles operates in a profile-oriented manner So, It has four profile modes: Disabled, Battery, Balanced, and Performance. Each mode is allocated a mode number. Developers can use the Kprofiles API function in conditions to limit or enable in-kernel tasks in a certain profile mode (look at usage section for example). Userspace can interact with Kprofiles by adjusting the mode number in /sys/module/kprofiles/parameters/kp_mode. The table below shows which mode number corresponds to the profile mode.

Profile Mode Mode Number
Disabled (default) 0
Battery 1
Balanced 2
Performance 3

Furthermore, Kprofiles provides automatic profile changer (auto Kprofiles), which uses FB notifier, MSM DRM notifier or MI DRM notifier to enforce battery profile mode when the device's screen goes off and switches back to previously active mode when the device wakes up. Users can disable or enable this feature at runtime without recompiling the kernel by changing the bool value in /sys/module/kprofiles/parameters/auto_kprofiles to Y or N.

Original documentation

@sunilpaulmathew
Copy link
Contributor

@dariusz-goc
Extremely sorry for the delayed response. I shall look on it. But, I hope you'll be there to test (not using a root-enabled device atm).

@dariusz-goc
Copy link
Author

Sure, happy to help

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