libera/#maemo-leste/ Friday, 2022-11-04

freemangordonWizzup: will you have time to test my modem shutdown patch? I will provide kernel/modules07:24
freemangordonWizzup: http://46.249.74.23/leste/d4/modem_patch/08:16
freemangordonhmm, seems battery applet either does not get or ignores th elow signal09:33
freemangordonI see no "battery low" warnings, despite the kernel signals09:34
uvos__must have broken very recently09:39
uvos__as it def used to work09:39
freemangordonuvos__: yeah, will try to find what's going on11:31
buZznow that we have omap_hdq loaded again, shouldnt we also have the new kernel?11:57
buZzor was why we blacklisted it invalid in general? even on the older kernel11:57
freemangordonbecause it was causing power draw with the default parameters12:07
freemangordonfor the new kernel - there is a bug I introduced in cpcap-battery, want to have that fixed first12:08
freemangordonand modem driver fix needs testing12:09
buZzthe modem shutdown you linked before?12:14
freemangordonyes12:22
Wizzupuvos__: btw, how do I best preserve the batteries for the all the d4s?12:33
Wizzupleave them empty?12:33
uvos__40-60% soc12:33
uvos__as with all lipos12:34
uvos__(state of charge)12:34
Wizzupok12:34
Wizzupwon't they drain over a few weeks?12:34
uvos__no12:34
uvos__the will drain12:34
uvos__but it takes very long12:35
uvos__if you dont have one12:35
uvos__buy a rc charger imax b6 or so12:35
uvos__those can parallel storage charge lots of batteries at a time12:35
Wizzupok12:36
uvos__they have open source fw are programmable and can also drain, i would have the battiers at storage voltage12:36
uvos__and then use it to discarge to 10% before sending the stuff to people per mail12:37
uvos__thats the ideal way of doing things anyways12:37
uvos__any of the ones supported by this https://github.com/stawel/cheali-charger would be good charger wise, dosent have to be a b612:38
WizzupThe imax b6 sounds fine12:49
uvoscarefull there are chinese fakes12:51
WizzupI was looking at buying it from a dutch shop12:53
Wizzuphttps://www.shogun.nl/imax-b6ac-multilader-nimh-lipo.html12:53
uvosok12:53
uvosjust dont buy from aliexpress or ebay (generally) most are fake12:53
Wizzupok12:53
uvosthats the ac variant (thats fine)12:53
Wizzupthey seem to look different even on some dutch shops12:54
Wizzuphttps://www.bol.com/nl/nl/p/imax-b6ac-v2-professional-balance-charger-discharger/9200000125024248/12:54
uvosyeah no idea sorry, as you can imagine i bought mine like 15 years ago (at hobbyking)12:56
uvosthey still have it https://hobbyking.com/de_de/skyrc-imax-b6-v2-60w-6a-1-6s-dc-charger-discharger.html?queryID=9641dbd193598df54f2d5d8e5f2b28f4&objectID=85860&indexName=hbk_live_products_analytics12:56
uvosthis one is real for sure12:57
uvoswell mine isent a v212:57
uvosnot sure what the difference is12:57
Wizzupthis also says skyrc: https://www.bol.com/nl/nl/p/imax-b6ac-v2-professional-balance-charger-discharger/9200000125024248/12:57
Wizzupweird, ok, yeah12:58
Wizzupfunny how it's much cheaper @ hobbyking12:58
freemangordonisn't 3.7/3.8 V the 'transport' voltage a battery shall be charged to before being put on the shelf?12:58
uvosits 40-60 soc12:58
uvosbut yeah thats around that voltage wise12:58
freemangordon3.7 for normal, 3.8 for HV12:59
uvosthere are other chemistries too12:59
uvoslife etc12:59
uvosbut yes12:59
freemangordonyeah, I am talking about 'normal' ones12:59
freemangordonli-ion/li-po13:00
freemangordonpoint is that it is hard to charge 40-60% without knowing the capacity ;)13:00
uvosthe chargers mesure it :)13:01
freemangordondon't they need a full recharge cycle?13:01
uvosyeah they do that (its an option anyways)13:01
uvosyou can also tell it13:01
freemangordonnot really, for 10yo battery :)13:01
freemangordonwhat am I trying to say is that it is way easier to charge to 3.7 or 3.8 and call it a day13:02
Wizzupsure, but for 60+ batteries it's nice to have a device do it for you13:03
Wizzupas opposed to running leste on all just to get it to a certain point etc13:03
uvoswelli gues you could wirte a userspace script13:03
uvosthat charges to that point and then shuts off13:03
uvosand runn that on the deivces13:03
uvosstill easier to have the b6 do it for you13:03
freemangordonsure, but still it will be easier to tell the charger "charge to 3.8"13:03
freemangordonand faster13:03
Wizzupin any case13:03
WizzupI'm not going to do in this week for sure13:03
freemangordonuvos: btw, we have at least 2 issues that might result in a hange13:05
uvoscpcap and?13:05
freemangordonone is the bug I have introduced in cpcap-battery13:05
freemangordonpvr13:05
uvoswhat exactly?13:05
uvosants related?13:05
freemangordonI had PVR_K: ... traces this morning13:06
freemangordondevice was still alive (like, I was able to connect with ssh)13:06
freemangordonbut UI was frozen13:06
uvosyeah i have that13:06
freemangordonno ants13:06
uvoswell besides the trace13:06
uvosususally thats the issue where xorg is in drmioctl13:07
uvos*stuck13:07
uvosor charging-sdl13:07
freemangordonand in xorg there were lots of PVR2DQueryBlitsComplete failed with error code: -8 (Blit not complete)13:07
uvosok13:07
uvosmaybe different issue13:07
freemangordonand PVR2DBlt failed with error code: -2 (Device unavailable)13:07
freemangordondidn;t check what xorg does13:07
freemangordonmaybe it is the same issue manifesting in a different way13:07
freemangordonbut I would bet on issue in pvr blobs13:08
freemangordonI think it is a good idea to see why SGX recovery does not kick13:08
uvosmaybe its the same issue that causes pvr to hang in neverball even..13:08
uvoswhat do i know13:08
freemangordonsomeday13:08
freemangordonyeah, could be13:08
freemangordon but in theory SGX shall recover from lock-up13:09
freemangordonhopefully there should be newer userspace at some point13:09
freemangordonlets wait for it and see13:10
uvoswho would we even report issues too13:10
freemangordonandrew13:10
uvoslike the neverball thing is easy to repo13:10
freemangordonalready did13:10
uvosah ok13:10
freemangordonlemme see if he will reply at all13:10
freemangordonif he do, I will try to send him instructions how to re-create this neverball thing13:11
uvosmaybe i could extract the shadow rendering code from it into some standalone crash example.13:12
freemangordonthat'd be very helpful, yes13:12
uvosif he is inclined to help13:12
freemangordonbut lets wait for him to reply first13:12
freemangordonas if he does not, there's no point13:12
uvosright13:12
freemangordonuvos: are you sure this has ever worked? https://github.com/maemo-leste/status-area-applet-battery/blob/master/batmon.c#L12613:17
freemangordonI see nobody cares about 'low' state13:17
uvosdefinately13:17
uvosi have seen it13:17
freemangordonmaybe based on the % full13:18
uvosmce cares not about low btw its based on %13:18
uvosyes13:18
uvosin mce at least13:18
uvosno idea if its the same here13:18
uvosnot that mce dose anything with low at all13:18
uvosbut it calculates it13:18
freemangordonmce cares about low signal from upower13:18
freemangordonto make a shutdown decision13:18
freemangordonhave to do some work work, ttyl13:18
uvosyes i mean low as the mce state13:18
uvosit has a low and critical state13:19
uvoslow is < 10%13:19
uvosnothing happens on low in mce13:19
uvosbut it calculates it still13:19
buZzWizzup: hobbyking.com is also nice for such chargers13:27
buZzWizzup: they have a dutch warehouse too13:27
freemangordonuvos: it is about battery applet, I think it does not care about what mce do13:38
freemangordonsee https://github.com/maemo-leste/status-area-applet-battery/blob/master/status-area-applet-battery.c#L64413:41
freemangordongoing to fix that13:42
uvosfreemangordon: is shal not care about what mce dose13:45
uvosmce dosent provide battery on an external interface13:45
buZzi'd love if 'fully charged' would make a more noticeable sound :)13:45
buZzis there even a sound on it?13:45
uvosand indeed mce dosent even use the battery information at all internally13:45
uvosexcept for the battery-guard module i added13:45
freemangordonuvos: it is not about mce this time ;)13:46
uvos"uvos: it is about battery applet, I think it does not care about what mce do"13:46
uvoswas just respnding to that13:46
freemangordonbut about battery status applet, ignoring 'low' state provided by kernel13:46
freemangordonok13:46
freemangordonjust making it sure we're on the same table13:46
uvosyes i was just agreeing13:47
uvosit dosent care13:47
freemangordonso, maybe I was not warned because battery applet does not warb13:47
freemangordon*warn13:47
uvosmaybe but i have seen the warning before13:47
freemangordonyes, but see how it decides to warn13:47
uvosprobubly because batt_calibrated == true13:47
uvosyes13:47
freemangordonmhm13:47
freemangordongoing to add support for 'low' and 'critical'13:48
uvosit would be good to make the percentage confiurable too13:48
uvoshow mutch time 5% is varies by device13:48
freemangordonmaybe, but not now13:48
buZzuvos: i think i figured out why my prev install didnt calibrate anymore13:48
buZzbecause i overwrote the calibration with '1000000' by hand13:49
buZzit never changed it anymore afterwards, maybe file permissions13:49
buZzmy new install from maemo-leste-1.0-armhf-droid4-20221023.img.xz does recalibrate 'all the time'13:50
uvosno idea wht that would happen buZz13:50
buZz:) alright, doesnt matter much13:50
buZzi'd love some example python app to 'start a program with a file as parameter' so i can maybe finally package that pcsx-rearmed with some minimal frontend13:51
buZzi mean, we do have some 'maemo filepicker' stuff we can use from python, right?13:52
uvoshopefully its registerd as the xdg filepicker13:52
uvosprobubly not tho knowing nokia13:53
buZz:)13:53
uvoshm i gues this interface dident exist back then, so not nokias fault for once (looking at you hildon-mime)13:54
buZzi did get the errors again about 'missing font/bla' on apt installing stuff13:55
buZzguess i need some package installed to define those types , which i havent yet13:56
freemangordonbuZz: I think I merged your commit, but didn;t release new version13:59
freemangordonwill do soon (tm) :)13:59
buZzah, that could be it :D13:59
buZz<3 thanks13:59
freemangordonuvos__: I don't think this https://github.com/maemo-leste/droid4-linux/blob/master/drivers/power/supply/cpcap-battery.c#L513 is correct either15:40
freemangordonthis does not account for 'low' irq15:40
freemangordontmlind: ^^^?15:41
freemangordonshall I fix that?15:41
uvos__hmm idk15:43
uvos__how do you suppose the state should be determined15:44
uvos__you cant just go by the irq15:44
uvos__since you could go below the irq thresh and then start charging, are we still below the thresh? how do we know?15:44
freemangordonwell, once we have that signalled, we shall report low, until a charger gets connected15:44
uvos__just becasue a charger isent connected dosent mean low shal not be reported15:44
uvos__the battery may sill be low15:44
uvos__*is connected15:45
uvos__you can also connect and disconnect the charger while allways below the irq thresh15:45
freemangordonright, but not based on irq15:45
freemangordonwell, ok15:45
uvos__the irq is really just a proxy for a certain voltage anyhow15:45
freemangordona charger connected restes the low flag15:45
freemangordon*resets15:45
uvos__i would not give it special meaning15:45
freemangordonif we get it while the charger is there, well, it is still low15:46
uvos__other than a check if this is ok irq15:46
uvos__you can connect a charger and disconnect it again15:46
uvos__while the battery is low15:46
freemangordonand?15:46
uvos__and never have the irq fire15:46
freemangordonah15:46
uvos__the irq is not special anyhow15:47
freemangordonok, then something more clever shall be done15:47
uvos__its just a proxy for 3.3v15:47
freemangordonwell...15:47
uvos__it dosent mean anything more than that the battery is below 3.3v now so checking if the voltage is below 3.3v is functually the same15:47
uvos__except its better15:47
uvos__because its less suseptable to noise15:47
freemangordonirq accounts for the load, more or less15:48
uvos__no15:48
uvos__the datasheet is clear15:48
uvos__its just a comperator15:48
freemangordonyes, but when the load is bugger, the voltage drop is more15:48
freemangordon*bigger15:48
uvos__yes except the irq triggers on undesirably short voltage drops15:49
uvos__and mesureing the voltage without the irq is the same ofc15:49
uvos__ie the current code is better15:49
uvos__than relying on the irq15:49
uvos__the low irq should not be take as fact, mearly as a signal to check if the battery is low by other means15:50
freemangordonmeasuring the voltage is less accurate, as it does not account for the peak load15:50
uvos__the code above is essentaly those other means15:50
uvos__you dont want account for peak load15:50
freemangordonwhy not?15:50
uvos__you want to do some somothing15:50
sicelolol @ https://github.com/maemo-leste/status-area-applet-battery/blame/master/batmon.c#L3315:50
freemangordonto issue low warning?15:50
freemangordonsicelo: yeah :)15:51
freemangordonno comment15:51
uvos__because a 1ms spke is immaterial15:51
freemangordonsure, but it is an early warning15:51
freemangordonnothing wrong to start alerting the user15:51
freemangordonbetter early than late/never15:52
uvos__the low signal from kernel should trigger on a certain state of charge idealy15:52
uvos__we dont have soc directly15:52
uvos__so we should try and get close15:52
freemangordonhow do you define 'low'?15:52
uvos__triggering on spikes is not that15:52
uvos__<15% soc is typical15:52
freemangordonsure15:53
freemangordonbut in the applet it is 10%15:53
uvos__smoothing the voltage gets you closest do this15:53
freemangordonmaybe I shall increase that?15:53
uvos__sure 15% is typical, the point is its some soc15:53
uvos__not someting else dependant on load15:53
freemangordonbecause it uses <10 as low and < 5 as critical15:53
uvos__sure the exact soc values are up for debate15:54
freemangordonok, but I think there is some conflict:15:54
freemangordon1. kernel ignores voltage drops < 3.3 and reports low on steady 3.315:54
freemangordon2. mce checks *current* if voltage is < 3.350 (iirc) and issues shutdown15:56
uvos__kernel shal ignore voltage drops below <3.3 on some timescale15:56
uvos__lets say 100ms15:56
freemangordonthose 2 does not match15:56
uvos__and mce shal do the same15:56
uvos__for ciritical15:56
uvos__right both shal smooth15:56
freemangordonwell at least mce shall do15:56
freemangordonit is too sensitive atm15:57
uvos__sure15:57
freemangordonok, I will provide a patch for that15:57
uvos__the smoothing cant be in mce tho15:57
freemangordonwhy?15:57
uvos__it gets votlage changed signals15:57
uvos__you cant smooth on those15:57
freemangordonI can start timer15:57
uvos__pretty hacky15:58
freemangordonthat runs every 20 or so seconds after first 'low' detection15:58
freemangordonno, why?15:58
uvos__am moving window would be better15:58
uvos__mce cant poll the voltage i think15:58
freemangordonso if it detects a voltage > threshold, then it just stops the timer15:58
freemangordonbut, if it has several consecutive < threshold - shutdown15:59
uvos__it would be alot better if upower would just filter it instead (i kinda think it dose even just to fast)15:59
uvos__since mce isent the only consumer here15:59
freemangordonno, iirc it reports whatever kernel reports15:59
uvos__well this is a problem for upower too16:00
uvos__since it dose soc estimation based on votlage16:00
freemangordonthis is not in the upstream upower16:00
uvos__sure "our upower"16:00
freemangordonand I really think this is a huge hack16:00
freemangordonnot to say it is very inaccurate16:01
uvos__well wee need soc estimatation16:01
uvos__its vert inaccturate because its bad16:01
freemangordonhere I get 50% @ 3.6V16:01
uvos__it ould be better16:01
uvos__the tldr might be we need to not use upower at all16:01
freemangordonwell...16:02
uvos__but idk16:02
freemangordonme neither16:02
freemangordonbut, it supports stuff like BT batteries etc16:02
uvos__i gues the kernel folks wont be to happy if we just smooth all the voltages in kernel will they?16:03
freemangordonit is disabled, afaik16:03
uvos__what is voltage_avg?16:04
freemangordononly of HW provides it :)16:04
freemangordon*if16:04
uvos__right quie annoying that they dont want drivers to synthesize values16:05
freemangordonwell, kinda makes sense16:05
uvos__cpcap violates that allready anyhow16:05
uvos__but userspace is dumb and not under our controll :P16:05
freemangordonmhm16:05
uvos__really upower should smooth itself if avg is not available16:05
freemangordonI am tempted to pull latest upower to see how it will behave16:06
freemangordonand start making issues against it16:06
freemangordonyet again, I think we shall use low irq16:07
freemangordonbecause in reality *this* is what shall be reported by the driver - HW state16:07
freemangordonnot some wild guess based on voltage16:07
uvos__but thats not how hw works here16:08
uvos__its not a battery low irq really16:08
uvos__just a voltage low irq16:08
freemangordonsee, I know what reference voltage and comparator is (most-probably op amp) :)16:09
freemangordonand I am pretty sure I understand how that works16:09
uvos__im sure its not a op-amp16:09
freemangordonwhy not?16:09
uvos__that would be silly when a analog comperator would work too16:09
uvos__more complexity lower slew rate16:09
freemangordonanyway16:09
uvos__driveing a op-amp into saturation is rude16:10
uvos__:P16:10
uvos__(you would have to if you wan to use it as a comperator)16:10
freemangordonthe point is that it gives us early warning about the charge of the battery, which is more or less related with the state of the battery, i.e. its internal resistance16:10
uvos__anyhow16:10
uvos__not really, its dependant on a lot of factors inc external noise load and internal resistance16:11
uvos__imo its not usable as anything but a "check this" signal16:11
freemangordonto me it is, to start warning the user16:12
freemangordonthat the battery is getting 'low'16:12
freemangordonand that's true as long as 'battery level' is qualitative  property16:13
freemangordonas we do not need or want exact measurements16:13
freemangordonall we want is to warn the user that she will soon need a charger16:13
freemangordonthat's my point16:14
uvos__imo we should to propper soc estimation (or use the soc given by the charge counter if avialbe) and warn the user based on that16:15
uvos__thats my point16:15
uvos__thats also what android dose it dose soc estimation and warns the user at exactly 15%16:16
uvos__this works splendedly16:16
freemangordonI don;t think we will be ever able to make that work properly, but ok16:18
freemangordonI need some rest from the batteries :)16:18
sicelofreemangordon: how does this work i  Fremantle?16:19
freemangordonbme16:19
freemangordondon;t remember what we did in bme replacement16:19
freemangordonmaybe pali knows more16:19
freemangordonmaybe something ob bq driver16:20
freemangordon*in16:20
siceloyes, i know that, and Pali's replacement bme. but i mean .. how notifications are decided16:20
freemangordondon;t remember, sorry16:20
siceloanyway I've also seen and heard the low battery notifications on droid 4. i don't use it much though, so i can't tell when last i heard and saw them16:21
freemangordonyes, but it is based on % full value16:21
sicelobut i recall there have been times i got lots of them16:21
sicelook. you propose to base on voltage?16:22
freemangordonit is already based on voltage16:24
freemangordonwhen the battery is not calibrated, a hack in upower estimates based on voltage16:24
uvos__except its really dumb :)16:29
uvos__idk if just improving this hack some dosent solve all issues16:29
freemangordoncould be16:29
uvos__and removeing the if callibrated check in the status applet16:29
freemangordonI already removed :)16:29
freemangordonuvos__: https://github.com/maemo-leste/status-area-applet-battery/commit/d1e9b3aa34989bc631d6caa039371ac806655db616:30
norayrfolks droid3 is so beautiful!!!17:30
norayrso pity it has poor support. that is the same chipset no?17:31
norayrwhat is the difference?17:31
Wizzupnagging won't fix it17:32
Wizzupif we knew it'd be fixed already17:32
norayreh eh.17:32
uvosthat said, Wizzup could you provide me with access to a d3 running android (preferably los) to dump the regs and see if the d3 maybe sets some regulators up differently or so?21:08
uvosalso to figure out whats going on with the leds21:09
norayrit is very expensive to send something to the outer world from where i live, but if Wizzup won't send, i can send u a device, my first d3 which is in veeery bad shape: screen has a crack, power and volume buttons are very tired and it lacks a backplate.22:52
uvosnorayr: i dont want a device really - just information23:01
uvosWizzup is best placed to provide it23:02
norayrah!23:04

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