libera/#maemo-leste/ Wednesday, 2022-11-09

WizzupbuZz: this is entirely normal @ cores00:45
buZz:) ok00:48
freemangordonuvos: I don't know how did you measure android idle current, but here I see ~90 mA min08:30
freemangordonit jumps to 10 for a split second, but then again jumps to at least 10008:30
freemangordonthis is without sim card and not connected to wifi08:31
uvosfreemangordon: thats los09:36
uvosits spends little time in off mode09:36
uvosbecuase its very busy for some reason09:37
uvosyou need to mesure motorola android09:37
uvosbtw leste encounters a bug where the modem power consuption is 40mA or so higher when no sim is insertet09:53
uvosidk if android suffers from the same bug09:53
uvosbut i mesured with sim in flightmode09:54
uvosfor 15-20mA09:54
freemangordonthis is motorolla droid, iiuc10:36
freemangordon4.somthing10:36
freemangordonbut ok, will measure again with sim10:36
freemangordonoh, there was sim card in that device10:39
freemangordonWizzup: ^^^10:39
freemangordonis that yours?10:39
freemangordonverizon :)10:40
Wizzupfreemangordon: yeah that happened sometimes, but not mine10:40
freemangordonI will keep it for some tests10:41
Wizzupsure10:41
Wizzupbtw, is bringing up status applet also relatively slow for some? sometimes it's fast, sometimes it's a bit slow10:42
freemangordonleste idles @ 30mA10:45
Wizzupit can be less, usually between 16-32 on my psu at home10:46
Wizzupbut this was probably without modem online10:46
freemangordonuvos: with the fix, current draw after power-off is the same as after android power-off10:46
Wizzup(been a while)10:46
Wizzupfreemangordon: oh 30mA when off?10:47
freemangordonWizzup: this is with modem online and connected to wireless10:47
Wizzupah10:47
freemangordonno, when off it is 1mA10:47
Wizzupok10:47
freemangordonwithout shutdown fix, power usage is the same to the precision my dmm has10:58
freemangordonmaybe more on th 2mA side than on 1mA10:58
freemangordonuvos: what kernel you did your measurements with?10:58
freemangordonWizzup: uvos: http://46.249.74.23/leste/d4/power_usage/11:03
freemangordonseems the patch is needed to strip some .5mA further down11:03
freemangordonbut we are already ok even without it11:04
Wizzuptil firefox loads bmp11:04
Wizzupleste-fix is empty for me11:04
freemangordonhmm?11:04
freemangordonoh, I don;t know why11:04
freemangordonlemme see11:04
freemangordonwell, chinese dmm software broke it somehow11:05
freemangordonbu, just open .csv11:05
freemangordonanyway bmp precosion is not good11:05
freemangordon*precision11:05
Wizzupright11:10
freemangordonWizzup: http://46.249.74.23/leste/d4/power_usage/leste-fix.ods11:10
freemangordondo you want me to measure something else?11:12
Wizzupnot sure, I don't think so, but I didn't give it a lot of thought11:16
freemangordonLater on I will try to find some 0.1 Ohm resistor to try to improve the precision in idle11:16
freemangordonlike, if there is any difference in voltage android vs leste-fix vs leste-nofix11:17
freemangordonumm, in off, not in idle11:22
uvos__freemangordon: i used a dmm, but one with very low burden voltage13:18
uvos__if motorola android uses 100mA somthing is very wrong there13:20
uvos__on your install13:20
uvos__aside from mine and tmlinds mesurements13:22
uvos__motorola android can also idle for over 1w expieramentally13:23
freemangordonuvos__: well, I have no idea what install is that, it is waht was there on the device16:52
freemangordonwithout SIM card and withou uSD card now it idles @ 816:59
freemangordon8mA that is16:59
freemangordonok, after power-off from android, current draw is 1.57 mA17:02
freemangordonhmm, now, with SIM card and uSD, it is 1.80 mA, but decreases17:06
freemangordonweird17:07
freemangordonuvos__: anyway, the shutdown fix seems to not be unneeded, bot with and without it off draw is the same, for some reason it is 2.0 mA right after power-off, but decreases with time, exponentially, to ~1.60 mA17:28
freemangordonthe same happens with android17:29
freemangordonso, whatever was causing high off current is already fixed17:32
uvoshmm thats.. wierd17:46
uvosi was mesureing <1mA with android17:46
freemangordonwell, lemme explain my methodology, maybe I am doing something wrong17:47
freemangordonI have 47 Ohm resistor connected in series with the battery, which I short-circuit during boot with DMM on 4A range17:48
freemangordonI short-circuit the resistor ofc, not the battery :)17:48
freemangordonafter boot, I power-off17:48
freemangordonafter power-off is completed, I switch DMM to 200 mA range, it is still in parallel to the resistor17:49
freemangordonresistor is there to keep the current while I change the terminals on DMM (I have separate holes for 10A and 200mA)17:50
freemangordonanything obviously wrong?17:50
freemangordon(it has separate holes)17:50
uvoswell the resisor is pulling some current that bypasses the dmm, but that should make the mesurement low not high17:51
freemangordonduring the switch, voltage drop because of the resistor is < 100mV, should not affect the state17:52
uvosno i mean durring the mesurement some current flows through the dmm and some though the resistor17:52
freemangordonsure, but 47Ohm should make some .01 diff17:52
uvosmakeing the dmm read low17:52
freemangordonyes, I know17:52
uvosit probubly makes more sense to mesure the voltage drop on the resistor17:52
uvosbut dosent explain the high mesurement17:53
uvoswhat do you mesure before the device is ever booted17:53
freemangordonwell, my goal was to check leste vs android17:53
freemangordon1.57 mA17:53
uvosok and yeah any inaccuracies shouldend matter anyhow as long as android and leste are the same17:53
freemangordonmhm17:54
uvosso yes i gues it was fixed sometime between 5.10 and now17:54
freemangordonalso, keep in mind the exponential decrease of the off current17:54
uvosbut ill repeat the expierament when i have time17:54
freemangordonplease do17:54
uvos8mA sounds sane fore android idle btw17:55
freemangordonbut I am pretty sure my DMM is pretty much accurate17:55
uvosso thats a fine mesurement now17:55
freemangordonyeah, maybe verizon SIM that was there was doing some crazy things17:55
uvospossibly the modem dosent sleep but keeps searching for a network or something17:55
uvosbut yeah17:56
freemangordonso, I see no flaw in my methodology, do you?17:58
uvosno17:58
uvos i gues it was fixed sometime between 5.10 and now17:58
freemangordonmhm17:58
uvosor only affects the other cpcap mfd17:59
freemangordonplease measure d3 (or whatever device you said has issues as well) when you have time17:59
uvosbionic17:59
freemangordonyeah17:59
uvosbionic is pretty insane17:59
uvosits empty in 2 days usualy even when turned off full18:00
freemangordonfrom android?18:00
uvosfrom leste18:00
uvoscant turn it off from android anymore18:00
freemangordoneven with latest kernel?18:00
uvossince installing the bootloader breaks android on this device18:00
uvosweill last time i used it18:00
uvos(also a 5.18 kernel(18:00
uvosbut not the latest18:00
freemangordonwell, I meant 5.1818:01
uvosright18:01
freemangordonok, maybe try the shutdown patch kernel18:01
freemangordonuvos: http://46.249.74.23/leste/d4/modem_patch/18:01
uvosyeah i know (this patch)18:01
uvosoh kernel image18:02
freemangordonjust providing the link again, in case you've missed it18:02
freemangordonyeah, this is compiled so you can just use it as is18:02
freemangordonthis is 5.18.y-cpcap + shutdown fix18:02
uvosok can you link the patch again18:02
freemangordonwith broken cpcap-battery though18:02
uvosid rather compile it myself18:03
freemangordonumm, lemme see if I can find it18:03
freemangordonas I just did git stash drop :D18:03
freemangordonuvos: https://pastebin.com/7jtJFtGR18:04
uvosthanks, saved18:04
freemangordonuvos: BTW, I think if we have working charger detection, we don;t need charge mode18:06
freemangordonagree?18:06
freemangordonesp if we do cpcap stuff build-in18:07
uvoswell not need from the perpective of the device beein unbootable18:09
uvosbut i would still like the option to charge while off18:09
freemangordonoh, sure18:10
uvosbut yes the mapphones wont have any specific need anymore18:10
freemangordonmhm18:10
freemangordondo you know what driver is that cpcap-uc or whatever?18:10
uvos./drivers/mfd/cpcap-uc.c18:12
uvosif you mean the bits that upload the fw and so on18:12
freemangordonwell, I don't know what I mean18:13
freemangordonlike, I am trying to find where to start from18:13
uvoscpcap-uc is just a microcontoller on cp where android uploads fw18:13
uvosthat fw then dose several things18:13
uvostheres a enum with "macros" that the kernel calls on the fw18:14
uvosto have cpcap perform certain tasks18:14
uvossec if i can find it18:14
freemangordonoh, so those are these MACRO_IRQ in cpcap-battery (in vendor kernel)18:15
uvosright18:17
uvosso cpcap-battery.c for instance mostly lets the uc do everything18:19
freemangordonI see cpcap-usb-det.c18:19
uvoslooks like the kernel dose most of it here18:21
uvosyeah dosent look like you have to use the fw, despite there being a macro that detects usb, at least going by the name18:25
uvosget_sense() and detection_work() seam to do it18:25
freemangordondo you know what WHISPER is?18:28
uvosno18:30
uvosprobubly some code name of a different chip involved in charging18:31
uvos(maybe the inductive charging ic?)18:31
freemangordonor some docking station?18:32
uvospossible18:32
freemangordondoes d4 support inductive charging?18:32
uvosmaybe something in the lapdock18:32
uvosfreemangordon: optinally18:32
WizzupI think the pins in the back can be used ofr it18:32
uvosfreemangordon: the pogo pins beneth the battery door are for this18:32
freemangordonok18:32
Wizzupuvos: super unrelated but is this also a mapphone? https://www.gsmarena.com/motorola_droid_x-3473.php18:33
uvosno18:33
uvossholes18:33
Wizzupok18:33
uvosits the same as the d218:33
Wizzupah, I kind of assumed the d2 was a mapphone18:35
Wizzupshould have checked the spreadsheet I guess :D18:35
uvosd2 is just a d1 with a locked bootloader18:36
uvosand more ram18:36
uvosand a more plasticy case18:36
Wizzupmhm18:38
Wizzupwell, the xt610 was also a sholes, right?18:38
uvosyes18:39
uvosthe lte modem is also sholes xD18:39
uvosat least it uses the sholes kernel18:39
Wizzupuvos: hmm interesting18:45
Wizzupuvos: the d4 lte modem?18:45
uvosyes - but calling it sholes is overstateing it a bit, they used the sholes android source tree to start and it uses the same pmic but otherwise its quite different (as you might imagine - it being a modem and all)18:46
uvosalso they bolted on the cpcap stuff18:47
uvosthat sholes dosent have18:47
uvosthats also pretty siginificant18:47
Wizzupmhm18:47
freemangordonok, seems charger detection is some "switch" stuff18:51
uvosright18:51
uvosmassive statemachine18:51
uvoswell "massive"18:51
freemangordon/sys/class/switch/charge_capability/state18:51
uvosoh that kind of switch18:51
uvosalso right18:51
freemangordonlives in cpcap-usb-det.c18:52
uvoslooks like yes18:53
uvosget_sense() and detection_work()18:53
uvosand friends18:53
freemangordonunfortunately  charger_capacity seems to come from userspace18:53
freemangordonsee  cpcap_accy_charger18:54
freemangordonCPCAP_IOCTL_ACCY_CHARGER18:54
uvosi think tmlind or sre? had a way io intercept the stuff userpace reads form the cpcap userspace interface18:54
uvospresumably if its done in userspace userspace is using this file/interface18:54
freemangordonbattd I guess18:55
freemangordonor no?18:55
uvosi dont know18:55
freemangordonok18:55
uvosso theres a file you can use on android to do almost anything with cpcap from userspace18:56
freemangordonok, but I want to know who calls  CPCAP_IOCTL_ACCY_CHARGER :)18:56
freemangordonbecause that's how charger capacity is set18:57
uvoswell its called with this fd18:57
freemangordonsure18:57
uvosso check what has it open18:57
freemangordonyeah18:57
freemangordonI'll check batd first18:57
freemangordonuvos: is it possible that they ramp up the charging current until limit?19:57
uvoswe ramp up the current to avoid lead inductance triggering, they probubly do too19:58
uvosramping to limit would be grossly negligent19:58
freemangordonright19:58
uvosyou have to tell the usb port your a high power device, unless you get the data lines tied symbol to get more than 500uA legaly per spec19:58
* freemangordon searches for documentation on how fast-charger should be detected19:58
uvos(yes thats uA not mA)19:59
siceloWizzup: https://lists.dyne.org/lurker/message/20221109.203328.c5b5a322.en.html22:51
* norayr trying to calibrate the battery under droid3.23:06
norayrunder android.23:06
norayrfor 3 days, i cannot get it to 0. it's about 80% now.23:06
norayrandroid on droids probably has very good power management.23:07
sicelonaturally. nearly all devices (including laptops) have better power management when running their 'native' OS23:20
WizzupI think it's just OFF mode here23:48

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!