libera/#maemo-leste/ Sunday, 2023-03-26

tmlindfreemangordon: maybe use regmap_read_bulk() to read values to buffer, then process the buffer?06:25
tmlindfreemangordon: also, maybe you also should call triggered_buffer_cleanup()?06:26
freemangordontmlind: I use   p, li { white-space: pre-wrap; }  devm_iio_triggered_buffer_setup09:36
freemangordonso  triggered_buffer_cleanup is not needed, iiuc09:36
freemangordonI cannot find regmap_read_bulk in 6.x kernels09:39
freemangordonoh, it is regmap_bulk_read() :)09:40
tmlindoh ok :)10:09
freemangordonok, calculating Ri by using values from iio is way more stable10:20
tmlindnice, so what's the call from the charger driver to get the data?10:25
tmlindi guess you're still playing with your ocv user space app10:26
freemangordonyes10:26
freemangordonbut now it looks way better10:26
tmlindstill no idea though how long sampling the 2x4 values takes?10:27
freemangordonunfortunately battery is not calibrated so I cannot compare with coloumb counter, but ...10:27
freemangordonI guess 1 second10:27
tmlindoh so 4 * 250 ms?10:27
freemangordonIIUC sampling period is 250 ms10:27
freemangordonyes10:27
freemangordonthat's what my gut feeling tells me :)10:28
tmlindok makes sense, might be possible to complete that with the adc interrupt10:28
freemangordonI can measure how long it takes till interrupt arrives10:29
tmlindyeah might be worth checking10:29
freemangordonhttps://pastebin.com/S2wBgJKU10:29
freemangordonlooks like real values10:29
freemangordon"filtered 90" is SoC10:30
tmlindok10:32
tmlinddo the values look sane if you query after a longer period, like every 20 seconds?10:32
freemangordonI do 16 measurements every 30 seconds10:33
freemangordonI guess 30 should become 6010:33
tmlindok, presumably longer delays don't produce weird values either10:33
freemangordonand 16 should become 410:33
freemangordonbut this is the first try after changing U/I source10:34
tmlindyeah great10:34
freemangordonyeah, Ri ~= (0.100 .. 0.120) Ohm sounds sane10:35
tmlindok10:36
freemangordonuvos said he measured about .15, but not sure @ what SoC10:36
tmlindmaybe the coulomb counter has longer term drifting because it does not account for the battery internal resistance? so.. the difference between the adc and coulomb counter for a period should be usable for calculating the ocv?10:39
freemangordonafter first cycle it should be accureat, my idea is to compare my algo with coloumb, to see how accureate it is10:39
freemangordon*accurate10:40
tmlindyeah the coulomb counter measurements should be accurate, but the driver may not account for external consumption so i suspect it may drift over longer periods of time10:40
freemangordonright, that's why I want to use voltage-based estimation10:41
tmlindand there could be still some bugs lurking there in the coulomb counter code, and the hardware may have bugs too since it's not used for later pmics10:41
freemangordonmhm10:45
freemangordonI plan to write user-mode helper that will push battery SoC table to kernel every few minutes. run-time calculated based on the adc U/I readings10:46
freemangordonthat should make everybody happy, assuming estimation algo is correct10:46
freemangordonok, seems 2 4x2 measurements are enough10:53
tmlindok11:58
freemangordonon non-calibrated d4, my applet reports SoC 36%, battery applet: 62% :)13:59
Wizzupfreemangordon: I assume 36% is more accurate? :P14:05
freemangordonmhm14:06
freemangordonwaiting for the battery to become flat to be able to compare with coloumb14:06
WizzupI think the BL-5J batteries I bought are quite crappy (they were not polarcell)14:08
WizzupI'm getting the polarcell ones, but they wouldn't ship to me, so I have to pick them up in a week14:08
freemangordonI wonder what would be the results on an old battery14:10
Wizzupwhich battery are you testing with14:10
freemangordone96014:10
WizzupI see14:10
WizzupI think there might be some eb41 in initlab, if you don't have any14:11
freemangordonI was thinking about getting one from there14:11
freemangordonbtw, if you have some spare time, could you enable sysfs triggers in omap kernel and rebuild?14:11
WizzupI think this would be for uvos, he typically does the kernel builds14:13
Wizzupbut if you know what the options are, I can try14:13
freemangordonI guess CONFIG_IIO_SYSFS_TRIGGER=m14:14
Wizzupif you need it now/soon I can do it, otherwise I'd prefer to wait for uvos14:15
freemangordonno hurry14:15
freemangordonWizzup: PM seems to become so good I cannot deplete the battery :)14:46
Wizzupfreemangordon: :)14:48
Wizzupthat will change even more with OFF mode14:49
freemangordonyeah14:49
freemangordonif we have it some day14:49
Wizzup:p14:49
freemangordonstupid chromium seems to pause video playback when minimized14:59
freemangordonwhat's wrong with those guys?!?14:59
freemangordonthey want to turn desktop to android or what?14:59
sixwheeledbeastcould it not be the website itself15:43
freemangordonhow would YT know that I am bringing the browser out of focus?15:47
freemangordonin the tasknav that is15:47
sixwheeledbeastjavascript15:47
sixwheeledbeast?15:47
freemangordonwell, javascript is a scriping language, no? :)15:48
freemangordonbut what do I know15:48
sixwheeledbeasti have had a few videos embeded in content do this annoying behaviour15:49
freemangordonwhich browser?15:49
sixwheeledbeastany15:49
freemangordonhmm15:49
sixwheeledbeastfirefox chromium15:49
sixwheeledbeastfirefox you can use the pop out playback window to make it continue15:49
* freemangordon tries with wtwebbrowser15:50
freemangordonok, the battery went flat, finally :)15:52
sixwheeledbeasttbf i have never had it with youtube, but other video content within articles on other sites.15:55
sixwheeledbeastit is something people detect to autoplay and then autopause if not in view. it's suppose to be helpful but it's annoying. I want to read the article while listening to the video ....15:56
hiddenerdoes intel atom have any support in mainline? have a zenfone, i'd play with it15:57
freemangordonhmm, does not happe in the VM15:59
freemangordonyes, it happens16:03
freemangordonwhen I open a new tab16:03
freemangordonbut, only on m.youtube16:03
sixwheeledbeastIs that user agent detected?16:06
sixwheeledbeastDesktop can't seem to get to m.youtube16:06
freemangordonyep, I am using iphone6 UA16:07
freemangordonsixwheeledbeast: it turned out I had some old extension (AutoplayStopper) that was doing this16:16
sixwheeledbeast:nod:16:16
tmlindfreemangordon: any info so far on the battery charge state difference between the coulomb counter and the 2x4?16:16
Wizzupfreemangordon: btw, when I click reply all on Joel's mail from the mailing list, modest uses 100% cpu and goes up in ram a lot16:17
Wizzupnot sure what is up there16:18
freemangordonWizzup: strace/gdb?16:18
Wizzupit doesn't crash16:18
freemangordontmlind: no, since 10 minutes ago I was trying to deplete the battery16:18
freemangordonnow charging16:18
tmlindah calibration data missing16:18
freemangordonWizzup: ok, but maybe it does infinite loop16:18
freemangordonsixwheeledbeast: no, it was not the extension16:19
Wizzupfreemangordon: right16:19
freemangordonso, if chromium is in fullscreen, it will pause if I go in tasknav16:19
freemangordontmlind: yeah16:19
tmlindfreemangordon: while charging maybe log your 2x4 data to check how much power gets charged for let's say 10% state increase :)16:20
sixwheeledbeastI can't access m.youtube to even reproduce. My user agent tool can't seem to fool youtube in to serving mobile to me.16:20
freemangordonsixwheeledbeast: it is called "User-Agent Switcher for chrome"16:22
freemangordonthis https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg16:23
sixwheeledbeastI am using the same for ff16:23
freemangordonchoose iphone616:23
freemangordonand then m.youtube.com16:23
freemangordontmlind: yeah, I will play a bit once I have calibrated battery16:24
freemangordonI am not even sure my current algo is the best16:24
tmlindfreemangordon: if you can log uAh charged based on your alog you can compare it directly to the uAh value difference read from /sys/class/power_supply/battery/charge_counter..16:25
tmlindand the missing part is hopefully the battery internal resistance :)16:26
freemangordonno, the only thing I can get is SoC in %16:26
freemangordonwell, I am calculating 'the missing part'16:26
freemangordonso it is not really missng16:26
tmlindbattery % change translates direcly to uAh if you know the capacity of the battery, might be best to check the capactiy with some external reliable charger though16:27
freemangordonok16:27
freemangordonbut that would mean a calibrated battery :)16:27
tmlindright :)16:27
freemangordonand I am aiming *uncalibrated* batteries16:28
tmlindi think uvos has some fancy battery charger that could verify the capacity between between certain voltages16:28
freemangordonbecause mAh is not better that % charge16:28
freemangordonI think Wizzup has too16:28
tmlindok16:28
freemangordonbut I am not trying to come up with some 0 error algo16:29
freemangordonand error up to 2-3 or even 5 % should be acceptable16:29
tmlindyeah sure, i'm just wondering how much the charge_counter is off16:29
freemangordononce I have verified I have stable algo, I will post it for anyone to play with it16:30
tmlindi guess the external charger vs charge_counter capacity test can be done anytime with no changes16:30
freemangordonmhm16:30
freemangordonand my algo is not needed16:30
tmlindright16:30
tmlindthen when both the charge_counter and 2x4 algo are accurate, we'll be happy16:31
freemangordonif 2x4 is accurate we won;t need charge_counter, no?16:32
freemangordonwell, unless we want to show mAh16:32
tmlindright, no need for calibration16:32
tmlindalgo can just populate charge_now16:32
tmlindhmm capacity will still be missing?16:33
freemangordonmhm16:33
freemangordonso it can only come=up with %16:33
tmlindi'm getting about two days on the 960 battery fyi16:33
freemangordonon leste?16:33
tmlindno.. this is still my alpine with shells scripts..16:34
freemangordonleste/chimaera is more than a day, for sure16:34
tmlindabout 75 - 85 mW idle consumption sampled once a minute, 3g data connected, wlan off16:34
freemangordonnice16:35
tmlindpower consumption goes bad to around 400 mW always when 3g data connection is lost, then i have to ifdown wwan1; ifup wwan116:35
freemangordonI think on leste it is a bit higher16:35
tmlindyeah it's the timers16:35
freemangordonbut didn;t verify after we moved to chimaera16:36
freemangordonwhere uptime definitely increased16:36
tmlindok, planning on setting up my m-l d4 with 960 battery too16:36
tmlindvery bad battery on that one right now16:36
freemangordonmaybe take pictures of the process of converting e960 to eb4116:40
tmlindheh16:40
tmlindi'll try16:40
freemangordonWizzup: same to you ^^^16:41
tmlindoh, and what i'm still seeing is lcd not coming back on after about two weeks of uptime and i need to reboot16:41
Wizzupyeah, I will make photos if I manage16:41
freemangordontmlind: on leste?16:41
tmlindfreemangordon: no, this with sway, seems to be some dss bug though16:42
freemangordonah16:42
Wizzupthis might be the drm bug, but we'd have to verify16:42
Wizzupprobably the same we see in charge mode I guess16:42
tmlindok16:42
freemangordonmhm16:42
freemangordonhard if not impossible to repro though16:42
WizzupI think it happens often in charge mode, no?16:43
tmlindyeah, i wonder if it can be reproduced with doing blank/unblank in a loop though16:43
freemangordonI never hold my device in charge mode16:43
Wizzuptmlind: possibly16:44
tmlindhmm only around 150 blank/unblank cycles if i usually blank/unblank 10 times a day16:45
* tmlind starts a test16:45
freemangordon:)16:45
* freemangordon starts a rest16:46
tmlindenjoy & ttyl16:48
freemangordonseems charging is close as well https://pastebin.com/04xbPHRn18:15
freemangordonalso, it seems charging does not account for Ri, and terminates a bit early18:17
freemangordonOCV is ~4160 mV when charging gets terminated18:17
sicelohttps://mastodon.social/@LanceWex/11008476669397420520:15
buZzwonder if that article writer was aware that N900 wasnt the first 'linux in pocket' device :)20:16
sicelowhere does the article say it was the first?20:17
buZzthey also seem to paint the picture that Leste is just for n900s :)20:19
Wizzup*shrug*20:20
Wizzupstill cool!20:20
buZzyes!20:23
buZzdid they end up installing any os on a phone in the article? seems they just did some VM on a desktop?20:24
sicelomaybe you're overthinking it all :-)20:25
tmlindfreemangordon: there's also a bit of a voltage drop across the shunt resistor if you're trying to add up things20:33
tmlindhmm my test system rebooted after blank/unblank loop with 1 second sleep in between20:41
Wizzupafter how long?20:42
tmlinddid not print out date.. noticed after a few hours, nothing in the logs based on dmesg -w over ssh, don't have pstore right now20:43
Wizzupwas this the leste one, or?20:46
tmlindno, just plain v6.3-rc3 kernel running a minimal install of alpine, no pvr patches20:47
Wizzupok20:48
Wizzupmakes sense :)20:49
tmlindi'll try to reproduce and debug when i can, ttyl20:54
Wizzupttyl20:58
arno11Wizzup: i found that some modules are missing from boot to get nokia modem working normally21:06
arno11cmt_speech and omap_ssi and probably omap_ssi_port if it has not been merged with omap_ssi21:07
arno11it doesn't solve the issue with pm=1 but enabling new modules creates new interactions according to lsmod21:09
arno11and power cons decrease a bit on idle21:10
arno11maybe it's just a bias for idle but new interactions are real21:11
arno11 interact with it i think pulseaudio is the root cause of many issues21:15
arno11lol something is missing at the beginning21:16
arno11of the sentence21:16
arno11Wizzup: freemangordon: sicelo: is pulseaudio-module-cmtspeech usable ?21:20
buZzsicelo: natural trait of being me ;)21:26
Wizzuparno11: no, pulseaudio-module-cmtspeech was compile tested on beowulf, but I have to first build it all for chimaera, and when I tested it on beowulf it used a lot of cpu but id  nothing21:41
Wizzupwe need to look at the code and figure out how it works21:41
Wizzupwhat interactions are you talking abut?21:41
arno11interactions between cmt_speech omap_ssi nokia-modem hsi ssi_protocol hsi_cart21:43
Wizzupdo you see oopses in dmesg? or?21:46
arno11nothing interesting21:46
arno11in dmesg syslog ofonod.log21:47
Wizzupso what do you observe?21:47
arno11a bit long to explain with n900 keyboard lol21:49
Wizzupaight21:49
arno11anyway i tried many things following what has been prevously done with nokia modem and this module seems impossible to load on boot with no troubles elsewhere22:03
arno11otherwise it works great if it is loaded from desktop22:04
Wizzupok, well, if you're at a non-n900 keyboard let me know what problems you see22:07
arno11ok no probs22:08
Wizzuparno11: as in, I get modem on startup, I killed sphone just to make sure, but and I can receive sms when sphone is running22:10
Wizzupwithout touching ofono22:10
arno11oh ok i'm doing differently22:12
arno11after booting i run options nokia-modem pm=1 then22:13
arno11killing sphone and restart it22:13
arno11and close it22:13
arno11and sending receiving calls and sms works22:14
arno11like this22:14
arno11if i add modem in etc/modulesblabla i can't get online22:17
arno11otherwise even if sphone is closed sms and calls work22:18
Wizzuphm, maybe it's racy, I have it on modules-load.d and it works ok for me, with pm=122:18
Wizzupof course there were some ofono problems I guess, but sms works22:18
arno11ok22:19
arno11all of this is a bit tricky but it works great finally22:22
arno11just difficult to get OOTB22:22
buZzpavel's batman is kinda cool :) from the ML22:22
Wizzuparno11: yes, we need to get it to work ok, what I also noticed is that restarting ofono makes it not see the modem, and restarting again makes it re-appear22:23
arno11weird22:25
arno11or not weird: the common point of all of these modules is pulseaudio and i'm fed up to fight with him for 15 years...22:33
bencohtbh I have a few issues with pulseaudio as well, the most painful one is audio crackling and high cpu use when using twinkle with it ... I really wonder how hard it would be to try pipewire22:34
bencohwould our custom pulse modules work against pipewire?22:34
arno11same idea22:34
arno11i've another leste install and i think i'll try switching to pipewire22:35
Wizzupif it features full pa compat it might just work22:35
Wizzupyou could hopefully at least prevent some of the resampling22:35
arno11indeed22:35
bencohthe question is whether they kept the module API or just the client API22:35
Wizzuparno11: if I were you I'd be happy if we can get call audio to work at all, with or without pulse ;)22:36
Wizzupbencoh: both I think22:36
Wizzupbencoh: I use pipewire and I use pulseaudio bluez modules iirc22:36
bencohoh?22:36
Wizzup(i think, not sure...)22:36
arno11Wizzup: yep :)22:37
bencohhttps://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Migrate-PulseAudio#modules-122:38
bencohso apparently it works with some modules only (dunno if that's up-to-date)22:39
WizzupI checked my module list and I think I have only libpipewire modules in pa module list22:39
bencohhmm?22:39
Wizzupso yeah, I'd really recommend getting audio calls working with pa before trying pipewire22:39
arno11without pulseaudio-module-cmtspeech ?22:40
siceloyou need *-cmtspeech22:41
arno11hi sicelo. please explain22:44
Wizzuparno11: with the module22:45
Wizzupor with some other path (if not PA)22:45
arno11ah ok22:46
Wizzupuvos: thanks for merging the mce pr23:31
WizzupI will once again work on the tp sphone module and see if I can get it over the finish line this time23:31
Wizzupand then look at conversations23:31
uvosWizzup: gotcha23:32
WizzupI might ignore the part where the calls are anonymous for the moment and at least get the rest set up, then poke the sfos guys again23:34
Wizzupit always surprises me how much smoother the bionic is than the droid 423:36
WizzupI mean, I know why, but still, it surprises me23:36
uvosyeah23:36
uvostmlind mentioned that omapdss has a register that can be used that jitters the pixel clock that might help with the undelivered frames23:36
uvostmlind every try that one?23:36
uvos*ever23:37
uvosi also wish we could have the bionics lcd firmware on d423:37
uvosfor the less aggresvie rgbw color conversion23:38
uvosWizzup: where shal i relase mce too23:39
uvoson chimaera23:39
WizzupI think chimaera or chimaeara-devel, either is fine23:41
uvosok23:43
uvosbeowulf is officaly discontinued right?23:46
WizzupI mean23:50
Wizzupwe should probably announce chimaera before we do that23:50
Wizzupbut yeah, I don't push my changes to beowulf anymore23:50
Wizzupfor fear of breaking things that I don't test23:51
uvosWizzup: ok23:51
uvoscould you at least merge beowulf-devel and stable one last time then?23:51
Wizzupyeah I suppose, not right now though23:53

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