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

Charging switch automatically switches against user settings #50

Closed
PenguinDOOM opened this issue Jun 26, 2020 · 8 comments
Closed

Charging switch automatically switches against user settings #50

PenguinDOOM opened this issue Jun 26, 2020 · 8 comments

Comments

@PenguinDOOM
Copy link

Device: Pixel4 (Flame)
OS: Android 10
ACC Version: v2020.6.16

I don't know why, but after a while after switching the charge switch, it automatically switches to another switch.

The log was output after switching from charger/charge_disable 0 1 to /sys/kernel/debug/google_charger/chg_suspend 0 1
acc-logs-flame.tar.gz

@VR-25
Copy link
Owner

VR-25 commented Jul 1, 2020

ACC changes the charging switch when it fails to disable charging.
That settings was never meant to be static.
There are a couple of reasons for this behaviour.
The main is that different power supplies may use distinct charging switches.
A notable example is wireless charging.
It often requires its own switch.
Another reason is that some switches are not always reliable (i.e., fail to disable charging under certain conditions - e.g., screen off, capacity above a certain threshold and so on).
Thus, ACC responds accordingly.

@blackwind
Copy link

I'm having the same issue. battery/charging_enabled works just fine for me, but acc -t and even acc -t 30 disagrees. When I hit my maximum charge level, accd starts checking for a working switch (even after I've explicitly set it), doesn't find one, gives up, and exits.

I propose an option to disable this auto-switching functionality since acc apparently has trouble correctly detecting working switches on some devices, and the current behavior of giving up and exiting without notifying the user in any way should be improved somehow. I tried this module several months back, saw it did nothing, and immediately uninstalled. Same thing with ACCA -- installed, saw it did nothing, saw "daemon stopped", restarted it, saw "daemon stopped" again after hitting my charge limit again, and immediately uninstalled. Great intentions with the auto-switching functionality, but very, very poor user experience when things don't go as planned.

@PenguinDOOM
Copy link
Author

I have it set to stop charging at 85% but the charge switch switches to automatic and the acc daemon stops. This is tricky because on my pixel4, only charger/charge_disable 0 1 works as expected.
I can't upload the log from smartphone, I'll upload it later.

@PenguinDOOM
Copy link
Author

Log
acc-logs-flame.tar.gz

@VR-25
Copy link
Owner

VR-25 commented Jul 19, 2020

Install today's version and share the output of acc -t, along with a fresh log archive (acc -le).

@PenguinDOOM
Copy link
Author

The latest log.
acc-logs-flame.tar.gz

@VR-25
Copy link
Owner

VR-25 commented Jul 23, 2020

# charging_switch (s) #
# If unset, acc cycles through its database and sets the first working switch/group that disables charging.
# If the set switch/group doesn't work, acc unsets chargingSwitch and repeats the above.
# If all switches fail to disable charging, chargingSwitch is unset, switchDelay is reverted to 1.5 and acc/d exit with error code 7.
# This automated process can be disabled by appending "--" to "charging_switch=...".
# e.g., acc -s s="battery/charge_enabled 1 0 --"

See if this helps (v2020.7.22+).

@VR-25 VR-25 closed this as completed Jul 23, 2020
@VR-25 VR-25 reopened this Jul 23, 2020
@PenguinDOOM
Copy link
Author

I added -- and ran it a few times and it works fine. Thanks.

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

3 participants