libera/#maemo-leste/ Friday, 2024-01-19

Wizzupuvos: ok, I have rooted this d3 with sigmakey now, so I can -finally- proceed14:04
Wizzup(also tested, it's network unlocked already)14:04
arno11hi guys, i just compared my Fremantle (cssu kernel v53, no thumb2, light transitions, swappiness=30, 500-805MHz) with Leste (same freqs, same transitions, -devel and same swappiness)...and the feeling is pretty similar now :)15:10
Wizzupsweet :)15:11
arno11the feeling is even better with h-d navigation15:13
arno11:)15:14
WizzupI guess we should work on cmt speech integration then15:14
arno11yes indeed, i forgot that :P15:14
Wizzupuvos: I am wholly impressed by the razr battery life btw15:14
arno11for cmtspeech (cmt_pulse as user in fact), i think that 'the not too bad moment to start it' is when pin code entry appears (because we are sure that nokia-modem is already loaded)15:19
Wizzupmaybe it can somehow only be started when modem is online, and shut off when modem is not online15:19
arno11sounds good15:20
Wizzup(not sure how to do that ;))15:21
arno11ok :)15:21
arno11we need chrt prio for PA and sphone as well and we can't use limits.conf for that (only working with rt kernel iirc)15:23
arno11maybe someone has a magic trick for that15:27
freemangordonIIRC you said with PA as user no prio change is needed15:27
arno11yes indeed it works15:27
freemangordonbut?15:27
arno11but not very well if you are running other apps at the same time15:27
freemangordonI see15:28
freemangordoncan't we add some sudoer.d and call it a day?15:28
freemangordonalso, maybe we can create a cgroup with higher prio15:29
arno11sudoer could work15:29
arno11no idea for cgroup15:30
freemangordonyeah, but cgroup shall be better15:30
arno11yes probably15:30
freemangordonWizzup: ^^^ any idea how to tell elogind to move pid into a cgroup?15:31
freemangordonwe have /sys/fs/cgroup/elogind already15:32
Wizzupfreemangordon: the point was not about how to elevate the privs but how to start it at the right time15:34
freemangordonI wonder if elogind will be happy if we create session dir subdir and move some processes there15:34
Wizzupsorry I don't know much about cgroups15:34
arno11Wizzup: we also need to elevate the privs to use chrt (just chrt, no impact on PA or sphone)15:44
freemangordonarno11: so, renice does not work?15:45
arno11renice is not enough unfortunately15:45
freemangordonhmm, how's that?15:45
freemangordonso, you set SCHED_FIFO on PA?15:46
arno11sched RR15:46
Wizzuparno11: this is all easily done with sudo15:46
Wizzupwe just need to figure out how it gets started15:46
freemangordonwith sudoer15:47
Wizzupfreemangordon: if we start it as init script on boot, it won't work15:47
Wizzupthat's the point15:47
freemangordonI understand that15:47
Wizzup15:19 < arno11> for cmtspeech (cmt_pulse as user in fact), i think that 'the not too bad moment to start it' is when pin code entry appears (because we are sure that nokia-modem is already loaded)15:47
Wizzupso when I say 'how it gets started' I mean which process actually launches it when the modem is online15:47
freemangordonwhat I am saying is that we can change the prio once the process is started by using sudoer15:47
arno11freemangordon: yes15:48
arno11best option imo15:48
freemangordonarno11: RR ends up as FIFO on linux, afaik15:48
freemangordonRR is notr really supported15:48
freemangordon(afaik)15:48
arno11it seems to work well :P anyway FIFO gives similar results15:49
freemangordondid you try DEADLINE?15:50
Wizzupuvos: my static cpcaprw with armhf just owrks :)15:51
freemangordonWizzup: why not? as soon as you dont; try to use any FP, you should be fine15:51
freemangordonFP as in call annother lib15:52
freemangordonarno11: OTOH, during call there is no more impotant task that audio, so yeah...15:52
freemangordon*important15:52
Wizzupfreemangordon: because he said it might not work15:53
freemangordonah15:53
arno11freemangordon: didn't try deadline15:53
Wizzupuvos: you said this:15:57
Wizzup17:06 < uvos> Wizzup: you can use cpu freq to force the oop15:57
Wizzup17:06 < Wizzup> in android?15:57
Wizzup17:06 < uvos> yes15:57
Wizzup17:06 < uvos> clowboot dose it in the script even15:57
Wizzup17:06 < uvos> just before kexec15:57
Wizzupbut I don't see it changing the freq anywhere15:57
uvos__Wizzup: hmm its, its missing...16:17
uvos__not good16:17
uvos__https://github.com/tmlind/buildroot/blob/d8c9a4f0fa2cc89f9622ecfee3fbf7da80dfe1ca/board/motorola/droid4/rootfs_overlay/sbin/preinit.sh#L8916:17
uvos__here it is in kexecboot (to late in droid3 an bionic16:17
uvos__the stock kernel uses totaly normal cpufreq16:17
uvos__i also notices another problem...16:17
uvos__the droid3 dosent have 1.2ghz oop16:18
uvos__since motorola only overclocked the slow omap4 variants with the 4.0 update, which d3 never got16:18
uvos__booting at a low opp but then running at full speed might be causing the crashes16:19
uvos__since the memory will be stuck in a random opp16:19
uvos__then again bionic dosent seem to mind16:19
uvos__hmm16:19
Wizzuphi16:28
WizzupI made a script to dump the values on android, I'm about to run it now without usb cable attached16:28
uvos__please fix the opp to 1.005Mhz or what the top oop was again16:31
uvos__and kexec to kexecboot16:31
Wizzupthere is 300,600,800,100016:31
uvos__before wasteing any time on anything else16:31
Wizzuphmmm16:31
uvos__oh and limit the max oop in the mainline kernel to the same16:33
uvos__we dont want emif to be in a lower oop than the cpu ever16:33
uvos__this causes stability issues on d416:33
Wizzupso you want the kexecboot script to set the frequency to 1000 ?16:34
uvos__yeah or just kexec from android by hand16:34
Wizzupthat line alone won't be enough bt\16:35
Wizzupw16:35
Wizzuplet me share my current script16:35
Wizzuphttps://bpa.st/LFKA16:35
Wizzupwait there is a mistake in the script16:35
Wizzuplol16:35
uvos__oh and not the kexecboot script16:35
uvos__you must do it in clownboot before the first kexec16:35
uvos__kexecboot is after the first kexec but before the second16:36
Wizzuphttps://bpa.st/7T2A16:36
Wizzupok, let me figure out how I am going to be able to edit those scripts given that I can't boot to android16:36
uvos__just boot to leste recovery shell and use serial?16:37
Wizzupif it is stable enough, that might work16:40
Wizzupuvos__: how about this: https://bpa.st/FTDQ16:46
uvos__otherwise reflash system and reinstall clown-boot16:46
uvos__use $BBX ofc16:46
Wizzupoh16:46
Wizzupthe umount -l didn't use $BBX16:46
uvos__oh rihgt16:47
uvos__yeah after $BBX cp $BBX / bbx is in ramfs16:47
Wizzupok, so /busybox is fine then16:47
uvos__since we are about to loose everything else16:47
uvos__not sure why you want to do it there, might as well do it earlier16:47
uvos__but whatever16:47
Wizzupright, don't know, just picked a place where it made sense :)16:48
uvos__not sure what the echo and cat is for16:49
uvos__the stock kernel has fbconsole disabled16:49
WizzupI was hoping to see it, but just realised I won't16:49
uvos__you cant ever possibly see any of this16:49
Wizzupto confirm that it actually worked, I mean16:49
Wizzupyeah I just realised16:49
uvos__and any misake means you have to reflash system16:50
Wizzupwell it's booting leste atm16:50
uvos__this script is very fun to develop16:50
uvos__if you do it erlier16:50
uvos__before we loose permanent sortage16:50
uvos__you can save the output somewhere in system16:50
Wizzupright16:50
uvos__if you also remount that rw16:50
uvos__its ro otherwise16:50
Wizzupwell, maybe I just toy around in leste for a few minutes, and if it works, then we're done here16:50
Wizzupwhat do you mean with ro/rw, /sys should be rw regardless no?16:51
Wizzupoh, right16:51
uvos__system on android is ro16:51
Wizzupto store the output16:51
Wizzup:)16:51
Wizzupwell, it still reset it looks like16:51
Wizzup-- OMAP 00004430 (version 00000b22) PPA release1.3.5 R216:51
WizzupReset reason = 000379a216:51
WizzupModel ID is 0x0000000316:51
WizzupPPA hash Block:0x9ff00000 Size:260096 Flag:316:51
uvos__mbm not happy16:52
WizzupI suppose what I could do is to install just kexecboot without the clown part on the other droid3 that I have, and manually kexec from android16:52
Wizzupso make sure it's really in that frequency16:52
Wizzupto make sure*16:52
uvos__yes16:53
uvos__but this is a fun procedure16:53
uvos__not16:53
Wizzupyeah16:53
Wizzupwell so I can just run the cpcaprw tool on leste now16:53
uvos__because the uart.ko module distroys the serial port16:53
Wizzuphm, the d3 also has 1200000 as available freq16:53
Wizzupshould it?16:53
uvos__and then it also breaks usb and wifi16:53
uvos__Wizzup: no, yes, maybe16:54
uvos__Wizzup: bionic also has the same omap variant (1.0ghz only)16:54
uvos__but motora decded 1.2 is fine there16:54
uvos__but we tried this allready im sure16:54
WizzupI do remember that we did that, but we did not do it with the freq locked to 1Ghz before kexec16:55
Wizzupbut if you want maybe I should just run the cpcaprw script now?16:55
uvos__sure you can try16:55
uvos__its hardly hard16:55
Wizzupbbiab17:00
siceloarno11: Wizzup: regarding cmtspeech maybe we can create a wrapper that runs at boot ... so it's a normal openrc/dsme service. this wrapper listens for the appearance of ofono's AudioSettings interface. when that shows up (meaning we have voice-capability ready), the wrapper starts the real cmtspeech.19:05
sicelobut i think long term, we may need to fix whatever it is that causes cmtspeech to be sensitive about when it's started (tbh, i am not really sure it is, but i haven't done more extensive tests yet, even though i'd like to)19:06
arno11sicelo: hi19:18
Wizzupuvos: it does look like locking to 300mhz indeed did not help19:19
arno11cmtspeech itself is not a problem on boot19:19
Wizzupmaybe the best thing to do at this point is to just do the reg dump and compare19:19
siceloah, i meant to say `cmt_pulse`19:20
arno11sicelo: a ok19:24
arno11*ah19:24
Wizzupso what actually is the problem with starting cmt_speech on boot? it can't find /dev/cmt_speech, or the modem isn't on ofono yet, or?19:25
arno11cmtspeech is not the problem it is already loaded on boot19:26
Wizzupwhat I mean is that is cmt_pulse just iterates over the modems on start and then doesn't listen to modem changes, we just fix that19:27
Wizzupis that if*19:27
freemangordon:nod:19:35
arno11iirc cmt_pulse returns errors if the modem, ofono and PA are not already loaded19:35
freemangordonwhat is cmt_pulse?19:36
freemangordonsorry for the stupid question, but still19:36
freemangordonwhere is the repo?19:36
arno11libcmtspeechdata19:36
arno11cmt_pulse is the binary19:37
freemangordonwho builds that?  libcmtspeechdata?19:38
freemangordonI can't find it here https://github.com/maemo-leste/libcmtspeechdata19:38
arno11?19:38
arno11let me check19:39
sicelofreemangordon: yes it's there. utils/pulse.c19:39
arno11yup19:39
freemangordonoh19:39
freemangordonwhat the? we have Makefile and Makefile.am?!?19:39
sicelolol19:40
sicelofmg, yes it's super ugly code ... i did mention that it should be refactored some day19:40
arno11indeed...19:40
siceloanyway, the issue is likely in utils/cmtspeech_ofono_test.c19:40
freemangordonso, is that PA module?19:40
freemangordonhow do you start that?19:41
freemangordonI see no main19:41
freemangordonmain()19:41
arno11/usr/bin/cmt_pulse lol19:41
arno11that's not a PA module19:41
sicelofmg, i think it's started by utils/cmtspeech_ofono_test.c19:41
freemangordonok19:42
freemangordontha makes sense19:42
freemangordonsicelo: please confirm that if possible while I look into the code19:42
siceloi don't have the N900 handy right now19:42
freemangordonok19:43
Wizzupthe Makefile should tell you I think19:43
WizzupI will check19:43
freemangordonarno11: what is the error when it fails?19:43
Wizzuputils/pulse.c19:43
freemangordonWizzup: there is no main() in there :)19:43
freemangordonat least I can't see it19:43
Wizzupright19:44
siceloanyway, the issue is most likely the dbus side of things, i.e. utils/cmtspeech_ofono_test.c:test_dbus_init or main, which calls this function19:44
Wizzupsorry I went through the same steps you did19:44
Wizzuphaha19:44
freemangordon:)19:44
Wizzup  fprintf(stderr, "NFS sucks, version 0.0.1\n");19:44
Wizzuppretty sure this is the main19:44
freemangordonherre? https://github.com/maemo-leste/libcmtspeechdata/blob/master/utils/cmtspeech_ofono_test.c#L66119:44
siceloutils/cmtspeech_ofono_test.c lines 166-169 ...19:44
Wizzupyes19:44
freemangordonok, but I still need the error message19:44
Wizzupsorry, I was just confirming that this is the main19:45
freemangordonsicelo: arno11: did you ever tried to start that from xsession script?19:45
freemangordonah, it waits for ofono to initi19:46
Wizzupblocking?19:46
freemangordonno19:46
Wizzupsounds like it should just work then19:46
freemangordonit does https://github.com/maemo-leste/libcmtspeechdata/blob/master/utils/cmtspeech_ofono_test.c#L16419:47
freemangordonand most-probably there is no 'org.ofono.AudioSettings' interface by that time19:47
freemangordonand it just fails19:47
freemangordonhmm, that should not fail19:48
freemangordonarno11: so, how do you start cmt_pulse on startup when it fails?19:49
siceloi also don't believe it should fail, but yeah, i haven't tested that.19:50
siceloand yes, AudioSettings only shows up once the modem is Powered19:51
freemangordondbus_bus_add_match() hardly fails19:51
freemangordonso I need details on the failure19:51
Wizzupmaybe someone can run it from a xsession script and see if it just works19:52
WizzupI'm not sure if we are 100% sure that it actuall fails19:52
freemangordonmhm19:52
arno11freemangordon: back. sorry, what was your main question ?20:12
freemangordonwhat is the error (message ?) when cmt_pulse fails to start properly20:13
Wizzupuvos: so how do get the cpcap regs on mainline?20:25
Wizzuphow do I*20:26
arno11freemangordon: ah ok, sorry no time for me now, i'll have a look a bit later20:26
Wizzupuvos: https://wizzup.org/dirlist/maemo-leste/droid3/cpcaprw-no-usb-but-screen-on/20:29
Wizzupthis is stock android20:29
arno11freemangordon: having a look @irc logs, i didn't remember i successfuly ran cmt_pulse on boot lol...in july21:33
arno11using a basic init script21:33
arno11adding 'depend() after ofono'21:34
arno11apparently the only issue was the 15 sec latency bug (both ways). should not be a problem now21:38
arno11so if you want me to try a cleaner method to start cmt_pulse on boot, let me know21:40
siceloyes, we do :-)21:48
arno11:)21:50
Wizzupxsession sounds like a good way22:02
arno11ok, using /etc/X11/Xsession.d ?22:09
arno11and adding for example 99cmt_pulse sh script with /usr/bin/cmt_pulse inside ?22:17
Wizzupyeah, maybe look at the other scripts on how it should work exactly22:22
arno11yeah seems to be trivial. i'll try tomorrow22:23
freemangordonarno11: have a look at dh_installxsession22:44

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