libera/#maemo-leste/ Thursday, 2022-11-03

Guest92Latest release?04:04
WizzupGuest92 -- I'm almost back in europe (literally, in air atm), and then I'll get on it.06:46
WizzupI also have a call re: leste and the new blog post on friday06:46
freemangordonnorayr: and for how much longer do you expect your already bad battery to last?07:09
freemangordonalso, there is no argument that there should be enough charge before shutdown07:09
freemangordonthe discussion is about no warning given before shutdown07:11
freemangordonI guess that was the reason your battery went so flat that you had to charge it externally07:11
Wizzupeither that, or the device uses power after power off07:12
freemangordonit uses, but uvos said 1-2 mA07:12
freemangordonwhich for 24 gours is less that 50 mAh07:13
freemangordon*hours07:13
freemangordonhmm, do we power-down the modem on shutdown?07:14
Wizzupstill, that could be enough07:14
WizzupI think the kernel does07:15
freemangordondoes it?07:15
Wizzupunloading the module afaik powers it down07:15
freemangordonthis is different07:15
Wizzupworth checking07:15
freemangordonlemme check07:15
freemangordonnope07:16
Wizzupit powers up the modem though I think07:17
freemangordonyes07:17
freemangordonand leaves it powered on :)07:17
Wizzuphm07:18
freemangordondo you have d4 with psu connected so we can test?07:18
Wizzupwell, yes, but I'm still in-air07:18
freemangordonwell, ok07:18
freemangordonwhen you are on the ground obviously :)07:18
WizzupI'll try to remember, have a bunch to do07:18
WizzupI think my d4 currently on a lab psu at home has an idle draw of 0.16A even when powered off and never powered on07:19
freemangordonI guess uvos has psu/d4 as well07:19
Wizzupprobably something burned (it still works)07:19
freemangordon160mA?!?07:19
Wizzupso I should swap that out07:19
Wizzupuh sorry 107:19
Wizzup1607:19
freemangordonah07:19
freemangordonif you power down from android, does it still draw the same current?07:19
Wizzupif I take away all the power and turn the psu off, and then the psu back on, it still draws it, yes07:20
Wizzupthis is unrelated07:20
Wizzupmostly just saying that I need to swap the device first07:20
Wizzup(for our test)07:20
freemangordonah07:20
freemangordonyeah07:20
freemangordontmlind: don;t we need .shutdown callback in  phy_mdm6600_driver structure, to power-off the modem on shutdown?07:23
freemangordonotherwise it will be left in reset (I guess)07:23
freemangordontmlind: this? https://pastebin.com/7jtJFtGR07:37
tmlindhmm yeah maybe, worth measuring if there is s difference in power consumption after shutdown07:52
freemangordondo you have d4 with lab psu?07:59
tmlindyeah i have one wired with an ina226 i2c shunt, afaik power consumption is already very low after poweroff but yet lower after android poweroff. the difference might be missing shtudown functions for cpcap audio or modem etc like you're suggesting08:26
tmlindwill measure with your patch at some point when i get a chance08:27
tmlindfor runtime measurements, polling the charge counter about once a minute follows the ina226 numbers reasonably close08:28
uvos__i no longer have a d4 on psu09:49
uvos__since my main device broke09:49
uvos__so now i use this one09:49
uvos__the difference between android and mainline shutdown is mutch greater on bionic btw09:53
uvos__it uses like 7-8mA09:53
uvos__and was even more recently09:54
uvos__there was an issue where the button backlights wherent turned off proparly, the upstream regulator was disabled09:54
uvos__but the leds where not in cpcap09:54
uvos__the upstream regulator leaked some power even when disabled09:54
uvos__you could even see the leds glow slightly while the device was off09:55
uvos__this is fixed09:55
uvos__by disableing the leds in cpcap on shutdown, but just sayiing its been cpcap before ;)09:55
freemangordonok, lets wait for Wizzup to land, I guess he will measure the draw with and without the patch, unless tmlind is faster09:57
uvos__btw when considering shutdown voltage09:58
uvos__also consider the bionic, since it takes even loger to boot09:58
uvos__it has to boot android then mainline and then mainline again09:58
uvos__same for d309:59
uvos__but we could fix that in kexecboot i gues09:59
freemangordonI understand that, but I think we shall not try to support batteries that has 500 mAh capacity left09:59
freemangordonor at least we shall give priority to good batteries over bad09:59
uvos__(ie add something that causes kexecboot to pause if its running on mainline)10:00
uvos__and the battery is low10:00
uvos__another option is also to add charging support to kexecboot, even when running on the android kernel10:00
uvos__and also haveing it pause if the battery is low10:01
uvos__maybe tmlind knows how the cpcap interface on the android kernel works10:01
freemangordonalso, I think a simple lowering the mce shutdown voltage from 3350 to 3250 or similar will have great effect on UX while in leste10:01
uvos__i gues maybe you do to since you re'd the blob that uses it to do charging10:01
uvos__this is insufficant10:01
uvos__i tested this alot10:02
freemangordonwell, 3300 then10:02
freemangordonor 329910:02
uvos__the voltage is so noisy i doubt this makes a real difference10:02
freemangordonit will make all the difference on good battery10:03
uvos__i think you massively overestimate how mutch charge remains at so low voltages10:03
uvos__the discarge curve is realy steep here10:03
freemangordonsure, but we need 50 mAh10:03
freemangordonand I bed we have that @ 3.310:04
freemangordon*bet10:04
freemangordoneven for bad batteries10:04
freemangordonalso, what we can do for d4 is to disable cpu1 on boot as soon as we have a chance10:05
uvos__im more refearing to that 50mV extra will make a difference10:05
freemangordonsure10:05
freemangordonbut we can workaround that by disabling cpu110:05
uvos__the discarge curve is too steep and the mesurement uncertanty is to high imo10:05
freemangordonbut it still depends on the load10:06
freemangordonwell...10:06
freemangordonwe can at least try to10:06
freemangordonthe other option is those with good batteries to have no low warnings10:06
freemangordonand I don;t think that's acceptable10:06
uvos__and we discused how to solve that10:07
uvos__its an independen problem from when shutdown happens exatcly10:07
freemangordonbut this is a massive work compared to what I propose10:07
freemangordonalso, how is upower going to produce low signals? polling?10:07
uvos__it polls allready10:08
uvos__how do you think mce gets the voltage10:08
freemangordonon kernel event10:08
uvos__no upower polls the battery10:09
freemangordonand by polling, I mean - timer based polling10:09
uvos__im very sure it polls the battery the kernel creates no events for changeing voltage10:09
freemangordonah, it polls tha battery and when it sees low it generates dbus signal?10:09
uvos__and upower recodes it even10:09
freemangordonI am not si sure10:09
freemangordon*so10:09
uvos__mce just reacts to upowers signals10:09
uvos__they come in regular intervals10:09
freemangordon"/sys" supports inotufy10:10
freemangordon*inotify10:10
uvos__anyhow its imaterial if upower polls or gets a signal form the kernel at regular intervals, the point is upower gets voltage at regular intervals10:10
freemangordonalso, if we do that, we risk calibration to never finish10:10
uvos__and could absolutly act on it10:10
freemangordonbecause it needs low irq, IIUC10:11
uvos__freemangordon: yes this is antoher problem10:11
uvos__it works ok rn tho10:11
freemangordonsure10:11
freemangordonthat's why I prefer to keep it10:11
uvos__but yes if you set the tresh very high10:11
freemangordonand just reduce shutdown voltage by a bit10:12
freemangordoncombined with idle fix(hopefully) and disabling cpu1 shall be ok10:12
freemangordonalso, I will start working to bring charger detection at some point10:14
freemangordonand then we'll be more or less fine, no matter the charge10:15
uvos__iirc on android this works via cpcap-uc10:15
uvos__detection10:15
freemangordonwell, 'almost'10:15
freemangordonok10:15
freemangordonso, really, lets at least try what I propose. we can always revert it10:16
freemangordonassuming poweroff fix works10:16
* freemangordon checks what cpcap-uc is10:17
uvos__i came up with the current value by doing testing, chainging it just because you think is ok (and we use very good batteries so ofc its going to be ok for us, but it wont for others) is absurd10:17
uvos__freemangordon: microcontroller on cpcap10:17
uvos__android uploades short macros to it10:17
freemangordonuvos__: you checked in different conditions10:17
freemangordonnow I propose to change the conditions and test again10:18
uvos__i dont see how you having a good battery now are valid conditions10:18
freemangordon1. you reserved some charge because of the idle draw, now that's (hopefully) fixed10:18
freemangordonI have a bad battery too10:18
freemangordonand another device to test with, if needed10:18
uvos__for sure you have not fixed it on bionic10:19
freemangordonhow do you know?10:19
uvos__because i doubt that the same issue uses mutch more power on one device than the other10:19
uvos__ie there are at least 2 issues10:19
freemangordonwhy not, modem firmwares are diffirent, no?10:19
uvos__yes, slightly still i doubt10:20
freemangordonand 'fixing' it by putting a band-aid (lets shut down @ 3.35) is not a real fix10:21
uvos__never siad its a real fix10:21
freemangordonso, lets try to properly fix it10:21
uvos__how10:21
uvos__the real fix would be to drop every mapphone besides xt91010:21
freemangordonmodem shutdown is step 1, for sure10:21
uvos__(wich has no locked bootloader)10:21
freemangordondisable cpu1 is step210:22
freemangordonwhat you proposed (charge in kexecboot) - step 310:22
uvos__you could also build cpcap modules into kernel10:22
uvos__to make it charge slightly sooner in boot10:22
freemangordonright10:23
sicelofreemangordon: what do you mean 'bring charger detection' ... or you mean to kexecboot?11:26
uvos__sicelo: cpcap-charger dosent negotiate for power via usb protocoll11:27
uvos__nor dose it recognize the tied datapins signal11:27
uvos__it just takes 500mA, no matter if the port supports less or more than that11:28
sicelook11:28
uvos__this causes additional headaches at boot11:29
uvos__as the device will continue to discharge even after enableing charging11:29
uvos__until its truely done with booting11:29
Wizzupuvos__: ping11:44
Wizzuphttps://twitter.com/maemoleste/status/158812000022045081611:45
uvos__Wizzup: pong (limited avialability)11:45
uvos__Wizzup: nice :)11:45
Wizzupjust check the photo11:45
WizzupI managed to carry this all somehow11:45
Wizzuplol11:45
uvos__what are those white ones?11:45
Wizzupdroid 211:46
Wizzupjust white11:46
uvos__not the d211:46
uvos__second row11:46
Wizzupalso atrix11:46
Wizzupmb88611:46
Wizzupothers are mb88511:46
Wizzupmaybe they're not mapphones :)11:46
uvos__these cant be the same11:46
uvos__they dont even have touchscreen buttons11:47
Wizzuphttps://www.gsmarena.com/motorola_atrix_hd_mb886-4867.php11:47
Wizzupqualcomm11:47
uvos__ah atrix hd11:47
uvos__ok11:47
uvos__yeah atrix 2 is mapphone atrix hd and atrix 4g are not11:47
Wizzupstill MSM8960 is pretty well supported in mainline11:47
uvos__true11:48
Wizzupbut all the other stuff :D11:48
uvos__altho id rather support xt1602, i need to try to get another one11:48
uvos__anyhow neat :)11:48
Wizzupyeah I didn't know I had this many11:48
Wizzupexplains why my back hurts11:49
Wizzupargh I wrote create instead of crazy11:52
* norayr 14:25
norayron pmo wiki i see there are even modern sony phones that work with mainline: sony xperia 10 and 10 plus or xa2 plus.14:27
norayrthose are very fast devices.14:27
norayron motorola, i think i'll buy a tablet as soon as you tell me that tablet has chances to be supported by maemo.14:28
norayrno space on the table for notebook to watch youtube together so a tablet which can do that would be great.14:30
norayri see even sony z2 tablet is supported by mainline. just it is too expensive for us now.14:30
Wizzupnorayr: do they work with modem and 3d and everything?14:32
Wizzupall the ones I checked usually only have some things working14:32
uvos__if devices are to be taken from pmos to support14:34
norayri don't know, i see the screenshots on their wiki and i filtered those down by the "mainline: works" field.14:35
uvos__i imo makes the most sense to coose from the ones in at least the Community support category in the devices wiki page14:35
norayrmany other devices dont have that.14:35
Wizzupcan you link to some that actually work?14:35
norayryeah, the one plus has pretty good support, i saw it on video.14:36
uvos__Wizzup: MSM8916 devices like xt1602 really work with mainline quite well14:36
uvos__on xt1602 specificly everything works really14:36
uvos__besides the cameras14:36
Wizzupgot a link to one from the wiki?14:36
norayr I think i saw 8916 devices on their wiki14:37
uvos__https://wiki.postmarketos.org/wiki/Devices14:37
uvos__take your pick14:37
uvos__really14:37
uvos__choose one with manny Y14:37
norayri was filtering sony's from there because i like how they look.14:38
Wizzupso I have looked there many times and ask you to pick one, because I never saw that supports all the things say the d4 does14:38
uvos__right ok14:38
uvos__https://wiki.postmarketos.org/wiki/Motorola_Moto_G4_Play_(motorola-harpia)14:38
uvos__i have one of those14:38
uvos__everything works14:38
uvos__like d414:38
uvos__except pm14:38
uvos__its worse14:38
Wizzupyeah, pm is probably poor14:39
uvos__its also fairly fast14:39
uvos__chipset can do good pm, but it is not teribly great on mainline14:40
uvos__note that everything only works on xt1602, (ie european variant) other people have wierd issues with the other variants14:41
Wizzupyeah I saw that on the wiki page14:41
Wizzup*shrug*14:41
Wizzupit would be good to support some of those, but it doesn't seem like it's only a little bit of work14:42
WizzupI wonder if they have scripts for pm for example14:42
Wizzupand if it works with ofono (it mostly mentions mm, probably because phosh wants that)14:42
uvos__it works with ofono14:42
uvos__at least in very basic capacity14:42
Wizzupok14:43
uvos__i dont think it would be mutch more work than mapphone bringup14:43
* Wizzup going to rest for bit, bbl14:43
uvos__to get it to the state of pp14:43
Wizzupright14:43
uvos__gn :P14:44
uvos__still on us clock i imagine14:44
Wizzupmostly just no sleep during travel, and I have more work in a few hours :)14:44
Wizzupbut yes, also on west coast clock14:44
norayri even think of n9 sometimes because it also looks good, i like square corners, jolla is pretty good looking for me. but i understand it is very difficult to find n9 with good battery and it is d to replace it.14:48
norayrand jolla has no mainline support.14:48
norayri have the device and i dont use it. just hope it will have better mainline support one day.14:49
uvos__i kinda think the n9 is a poor target, it dident sell nearly as well as mainstream android devices and its hw was really outdated even when it was released14:49
norayrin generally it would be great to be available on something which is produced today.14:52
uvos__with a keyboard in d4 size :P14:54
uvos__i gues they still make the pp, at least the pro14:54
sicelonorayr: you're wasting your time :-)14:54
norayrLets say shift https://wiki.postmarketos.org/wiki/SHIFT_SHIFT6mq_(shift-axolotl)14:56
uvos__norayr: they very mutch might not even make this phone 2 years on14:59
uvos__without the vendors themselves supportin mainline linux15:00
uvos__we will imo never have fully working devices that are not fairly old15:00
uvos__like at least a couple of years15:01
norayrsicelo: what do you mean? (:16:14
norayr(i am, surely, thats what i do best is wasting, but it is interesting what do you think about this situation)16:14
siceloi still get unexpected reboots on droid 4, with no load, and no power issues (it rebooted while on charger)18:19
WizzupI haven't really seen those recently, on -devel18:19
Wizzupuvos: also I don't recall seeing Xorg hangs really, is that the same drm thing still?18:19
siceloi'm on devel too18:20
freemangordonsicelo: battery18:42
freemangordoncharger doe not make much differerence as it is allowed to draw up to 500 mA18:43
freemangordonas soon as you go over that, charger is disconnected and all of the load is taken by the battery18:43
freemangordonWizzup: me neither, but I use it mainly with cromium18:44
sicelothere was no load on the system at all18:44
freemangordonwas it connected to network?18:44
siceloactually i wanted to do `apt update` ... but it died while i was just typing18:47
sicelofreemangordon: yes, it was on wifi. no network applications running18:48
siceloit'd be funny for it to die on charger due to battery issues18:50
freemangordontry to increase charging current18:53
freemangordonto see if it will happen18:53
freemangordonlike, connect some 2.4 A charger18:53
freemangordonand set max current to 2.2 or something18:53
sicelothe thing is ... it does this when i don't expect it18:54
freemangordoncould it be something stupid, like loose battery connection ?18:55
siceloafter it rebooted, i actually did the apt upgrade without issue. it's still fine now, after installing a few other packages in ham18:55
sicelonot loose battery. the last time it happened (i reported here), the device was sitting on a table18:56
freemangordondid you try to tighten the screws?18:57
sicelothey're tight :-)18:58
siceloanything beyond this tight will break something18:58
freemangordonok18:58
freemangordonwhat is the capacity of your battery?18:58
sicelono idea tbh. the general consensus in the chat is that it's weak18:59
freemangordonplease pastebin /sys/class/power_supply/battery/uevent19:00
sicelohttps://paste.debian.net/1259437/19:02
freemangordon90398219:02
freemangordonalso, what do you mean by 'unexpected reboot"?19:03
freemangordondoes it just reset or it is normal shutdown?19:03
sicelotyping `apt update`, device dies and starts up again. i didn't expect it to do that19:03
siceloit's not shutdown. it boots itself up19:03
freemangordonthe battery is genuine or some replacement?19:04
siceloactually not even the white led shows up, so it's not a shutdown19:04
freemangordonwhen kernel shuts down because of low voltage, there is no white led19:05
sicelobattery is a replacement. i reused the original eb41 circuitry however19:05
freemangordonwhat is the design capacity?19:05
siceloit's written 2000mAh, but likely false :-p19:06
freemangordonwell, I would recommend to bye another one. The one uvos recommended seems to be very good and is very easy to disassemble19:08
sicelocan't find those batteries this side of the world.19:08
freemangordonyou cant find battery for LG Google Nexus 4?19:11
freemangordonE960  BL-T519:11
freemangordonamazon should have it, no idea if they will deliver19:12
freemangordonhttps://www.amazon.com/Replacement-Battery-BL-T5-Google-Adhesive/dp/B08XBMX51M19:12
freemangordonnot sure this one is good though, but you got the idea19:13
siceloyes, no nexus phones ever landed here. anyway, i don't mind the capacity of this battery atm since i don't really use the droid 4. just boot it to update once in a while.19:45
freemangordonit is not about the capacity19:58
freemangordonbut about the internal resistance19:58
freemangordonkeep in mind that it is possible that eb41 BMS might cut off the connection under some unknown conditions19:59
freemangordonfor example, the battery of the second d4 I have here (the one I used as a donor for battery circuit) was providing 0V at the terminals, despite the cell was @ 3.8V20:01
freemangordonI had to connect a charger to make it provide voltage20:02
freemangordonwe don;t know what else protection logic there is20:02
Wizzupnedko: I'll get you the sticker files tomorrow20:07
nedkoWizzup: great, thanks20:08
uvosmy d4 also ocassionaly hangs and watchdog reboots20:09
uvosits mutch less often than it used to20:09
uvosbut it still happens20:09
uvosits def a hang and wd reboot20:09
Wizzupwas the microwave wifi problem ever fixed?20:09
uvosbecause i use the device to listen to music alot, and when it happens the music will loop for a while untill wd kicks in20:10
uvosWizzup: no idea, its at least better, it used to crash very often when loosing wifi20:10
uvosbut havent tested that explictly20:11
uvosthe wd reboot ends with no logs in pstore20:11
uvoshmm20:12
uvosmaybe the reason why i dont see the wifi hang anymore could also be because i use gprs now while under way20:13
uvosso the device dosent autoconnect to public wifi aps anymore20:13
siceloi would agree to the hang + wd observation20:14
freemangordonjust happened20:20
freemangordonbut I have oops20:20
freemangordonuvos: https://pastebin.com/PWbWmk3020:23
freemangordonI guess cpcap_battery_lowbph_enable20:23
freemangordonlooks like my 30s patch20:24
freemangordontmlind: please help with ^^^20:45
freemangordonwhy does it complain that I can't schedule from a timer function?!? do I need to have a wq for that?20:46
freemangordonoh: "Timer functions must be atomic in all the ways we discussed  in..."21:03
sicelofreemangordon: that's LDD? :-)21:07
* sicelo guesses he should get a copy too21:07
freemangordonumm, ldd?21:07
freemangordonah, "linux device drivers" I guess21:08
siceloyes. is 3rd edition still the latest, or my search engine-fu fails me?21:09
freemangordonoh, ok, seems I have to use delayed_work and not timer21:23
Wizzup'rethink possible' - atrix startup screen22:35

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