Code Monkey home page Code Monkey logo

Comments (10)

VR-25 avatar VR-25 commented on June 25, 2024 2

Indeed, it doesn't work.
This is dictated by the kernel - yes, a different kernel may support that.

Tip: you can use a voltage control file as charging switch. It works almost like a switch that supports battery idle mode.

acc -s s battery/voltage_max DEFAULT_V TOO_LOW_TO_CHARGE_V
acc -s s battery/voltage_max 4380000 3500000

from acc.

VR-25 avatar VR-25 commented on June 25, 2024 1

#9 (comment)
That's the same problem - a minor bug.
A new release will be up once I finish working on a few other enhancements.
Thanks

P.S., pollux_windy does support battery idle mode. The output and log you provided confirm that.

from acc.

VR-25 avatar VR-25 commented on June 25, 2024

Interesting

On any of these devices, is battery charge/capacity held for a long time while plugged in, not charging (acc -d)?

from acc.

elem089 avatar elem089 commented on June 25, 2024

Did over last night, i.e.: plugged in both devices, then issued 'acc -d', made sure that charging had stopped, then left them in that state for well over 5 hours. Interesting result: both devices behaved differently:
pollux_windy:
when I started the battery indicator showed 49%. After 5 hours the battery was still at that value. I.e., the device somehow was able to draw energy from the charger instead of using the battery. All the while it had never entered deep sleep, instead was mostly running at the lowest possible frequency (see screenshot). The system's battery page said "plugged in, can currently not be charged".
Is it correct to conclude that this device somehow does support battIdleMode, although I'm told that it doesn't?
20190718-pollux_windy_CPU_Spy

amami:
when I started battery indicator showed 74%, After 5 hours the battery had dropped to 67%. Also here CPU was constantly running at the lowest possible rate but never entered deep sleep (2nd screenshot). The system's battery page said "not charged"
20190718-amami_CPU_Spy

enchilada:
I did not include my OP6 in the test as I already know the answer: I observed multiple times that when acc stops charging at 80% (capacity=2,101,75,80) it shows the same behaviour as my amami device: energxy is taken from the battery, CPU drops to the lowest possible rate without entering deep sleep. Once battery reaches 75% charging is resumed.

2 more observations:

  • even after issuing the 'acc -d' command both devices show the "charging" indication in the statusbar; this is different with my OP6 where the charging indicator is switched off
  • right after issueing 'acc -d' the daemon shuts down. I don't know if this is a wanted behaviour, but it's ok, I guess. What came as a surprise for me is the fact that after issuing 'acc -e' the daemon stays STOPPED. I tested this on all 3 devices, and it's true for all of them. Is this to be expected?

from acc.

VR-25 avatar VR-25 commented on June 25, 2024

Very Interesting

pollux_windy

  • What's the battery status reported by acc -i when plugged in, not charging?

acc -e and -d stop the daemon to keep it from interfering (i.e., by turning charging back on/off, automatically).

These are essentially part of the manual mode, where the user decides exactly when to enable/disable charging. For the purpose of this tests, that's desirable.

Alternatively, you could use acc pause resume (e.g., acc 80 70). This keeps the daemon running.

from acc.

elem089 avatar elem089 commented on June 25, 2024

What's the battery status reported by acc -i when plugged in, not charging?

pollux_windy:/ $ su -c acc -d

(i) Charging disabled

pollux_windy:/ $ su -c acc -i

NAME=battery
STATUS=Not charging
CHARGE_TYPE=N/A
HEALTH=Good
PRESENT=1
TECHNOLOGY=Li-ion
VOLTAGE_MAX_DESIGN=4200000
VOLTAGE_MIN_DESIGN=3200000
VOLTAGE_NOW=3933846
CAPACITY=66
CURRENT_MAX=6740673
CURRENT_NOW=1600
TEMP=230
CHARGE_FULL_DESIGN=6200000
CHARGE_FULL=6192000
CHARGE_NOW=-19075

Thanks for explaining acc -d / acc -e; makes sense then
Have a nice weekend

UPDATE:
the above test was done using acc V201907120

from acc.

VR-25 avatar VR-25 commented on June 25, 2024

Strange
STATUS=Not charging means pollux_windy does in fact support battery idle mode.
Could you run the test in debug mode (acc -x -t --) and share /sbin/.acc/acc-pollux_windy.log?
Thanks

from acc.

elem089 avatar elem089 commented on June 25, 2024

weird:

d:\Android\acc>adb shell
pollux_windy:/ $ su
pollux_windy:/ # acc -x -t --

du: /sbin/.acc/acc-pollux_windy.log: No such file or directory
/sbin/acc[485]: [: 50: unexpected operator/operand

(i) [/sys/module/pm8921_charger/parameters/disabled 0 1] works
- battIdleMode=true

But there is a file acc-pollux_windy.log at /sbin/.acc/ with a modify time stamp of 2019-07-20 15:24, which must be the one just created. Attached it here
acc-pollux_windy.log

from acc.

elem089 avatar elem089 commented on June 25, 2024

Just to be complete: ran the same test on my other xperia (amami): am I correct in interpreting the output that here battIdleMode is NOT supported?
UPDATE: just installed latest version 201907210 and re-ran my tests:

amami:/ $ su
amami:/ # acc -d

(i) Charging disabled

amami:/ # acc -x -t --

(i) [battery/charging_enabled 1 0] works
- battIdleMode=false

(i) [/sys/devices/qpnp-charger-14/power_supply/battery/charging_enabled 1 0] works
- battIdleMode=false

amami:/ # acc -V

201907210

amami:/ # ls -l /sbin/.acc/acc-amami.log
-rw-rw-rw- 1 root root 20007 2019-07-21 14:35 /sbin/.acc/acc-amami.log

acc-amami.log

So, if battIdleMode indeed is NOT supported: could that be the kernel, or the LineageOS version, or the device itself? I mean: could it help to try a different kernel, e.g.?
I mean: for this device I don't really care too much, currently I only keep it as a reserve. But for my OP6 this could be an important option

from acc.

elem089 avatar elem089 commented on June 25, 2024

Hmm - I assume that I must use a charging switch that already exists on my device, which in this case would be usb/voltage_max.
I tried acc -s s usb/voltage_max 4350000 4000000; how can I tell whether this is doing anything at all?
In addition, acc -i returns those two values among others:

VOLTAGE_MAX_DESIGN=4350000
VOLTAGE_MIN_DESIGN=4300000

Doesn't that mean that I cannot go below 4,3V no matter what I try?

from acc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.