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

This tool is no longer necessary #3

Open
Enzime opened this issue Aug 22, 2023 · 1 comment
Open

This tool is no longer necessary #3

Enzime opened this issue Aug 22, 2023 · 1 comment

Comments

@Enzime
Copy link

Enzime commented Aug 22, 2023

As per https://twitter.com/AsahiLinux/status/1638954458821578752

charge_control_start_threshold and charge_control_end_threshold are available inside /sys/class/power_supply/macsmc-battery/

To keep the properties set across reboots, you can create a udev rule (e.g. /etc/udev/rules.d/99-asahi-battery.rules):

KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
@PaddiM8 PaddiM8 pinned this issue Aug 24, 2023
@xorbuht
Copy link

xorbuht commented Sep 6, 2023

It works when I set udev rule. However how can I change these values manually, without restarting?
E.g. I've tried "echo 99 > sudo tee /sys/class/power_supply/macsmc-battery/charge_control_end_threshold", but the value stays the same. Changing it as root did not work either.

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

No branches or pull requests

2 participants