libera/#maemo-leste/ Saturday, 2022-01-01

Wizzuphappy new year!00:44
Wizzupthis year will be great :)00:44
r3bootIt will :) Enjoy! :)00:48
sicelokexecboot starts on droid 4 without a battery in the device. Wonder what's missing to allow an OS to start too11:34
freemangordonWizzup: booting with non-cma buffers patch :)11:57
freemangordonfirst try that is11:57
Wizzupfreemangordon: great12:35
freemangordonWizzup: seems to wokr12:53
freemangordon*work12:53
freemangordonWizzup: do you have old n900 image around? with old kernel/pvr?12:56
freemangordonI need to know what FPS achieve that when swiping hildon-dekstop12:56
freemangordonalso, gears fps12:57
freemangordonalso, what is bpp of Xorg12:57
Wizzupfreemangordon: I can dd some old(er) image13:03
Wizzupfreemangordon: pretty sure we're on 24bit regardless13:03
freemangordonok13:03
freemangordonbut I would like to have fps13:03
freemangordonbecause current seems a bit low to me13:03
Wizzupok13:04
Wizzupwunderw - still around?13:04
Wizzupor is that maybe wunderwungiel[m]13:04
WizzupI wonder what the latest image is that still worked13:04
Wizzupmaybe maemo-leste-1.0-armhf-n900-20211031.img.xz13:04
Wizzupdd'ing13:10
freemangordonWizzup: how do you want to test the patch? I think it would be easier to give you .patch file,no?13:12
Wizzupyes13:16
freemangordonok13:16
freemangordonWizzup: final test and will provide you the patches13:20
Wizzupok13:22
freemangordonhmm...13:25
freemangordonmaybe it doesn't work13:25
freemangordonI cannot open any application13:25
freemangordonor, it is something else13:26
Wizzupfreemangordon: do you want test with or without clutter13:26
freemangordonanyway, I'll provide the patches to you13:26
freemangordonshoudl not matter13:27
freemangordonWizzup: sent over the email13:28
freemangordonhmm, I don;t see any memory allocation errors, so it must be something else13:32
freemangordonWizzup: you have to patch both kernel and omap driver13:34
Wizzupok13:36
freemangordonwhat?!?13:38
freemangordondied loading invoked application: '/usr/bin/controlpanel.launch: cannot dynamically load position-independent executable'13:38
freemangordonwhy we hit that again?13:39
Wizzupglibc stuff?13:39
freemangordonhmm13:39
freemangordonoh13:39
freemangordonI guess I have new glibc on that device13:39
freemangordonyeah 2.31-413:40
freemangordonok, I think I have to flash an image13:40
freemangordonnot sure I can revert13:40
freemangordonlets try though13:40
freemangordonWizzup: but wait, how hildon-desktop starts then?13:41
freemangordonmaybe we didn;t fix all the applications13:41
freemangordonyeah, looks like that13:41
Wizzupweird, I don't have this problem13:42
Wizzupare you sure you're up to date/13:42
freemangordonI installed libc from chimaera back then13:42
Wizzupfreemangordon: what is clutter fps again13:44
Wizzupenv13:44
freemangordonCLUTTER_SHOW_FPS=113:44
Wizzupmax fps I get is 4913:45
Wizzupbut most is lower than that13:45
Wizzupbetween 25-3513:46
freemangordonyeah, max is what I wanted to know13:46
freemangordonhere we hit max 4013:47
freemangordonI know why is that, but this should be fixed in the kernel13:47
freemangordonthe p[oint is now omap driver waits for rendering to complete before queuing page flip13:48
Wizzupok13:48
freemangordonthis is again that missing fence13:48
Wizzupfreemangordon: so I should also disable cma now?13:49
Wizzupin .config13:49
freemangordonno, you cannot13:49
freemangordonjust lower the value to 16MB13:49
Wizzupok13:50
Wizzupbuilding kernel13:52
Wizzupfreemangordon: so apply your xf86-video-omap on top of your triple buffering commit?13:53
freemangordonyes13:54
Wizzupok13:54
Wizzupfreemangordon: I get like 18 fps14:09
freemangordongo to launcher14:09
freemangordonthen back14:09
Wizzupwait14:09
Wizzupforgot omap ddx14:10
freemangordonWizzup: hmm?14:16
Wizzupsec14:16
Wizzupfreemangordon: well I forgot to dpkg -i the ddx I built14:16
freemangordonah14:16
Wizzupfreemangordon: but now with the new ddx it basically crashed almost right away14:17
freemangordonweird14:17
Wizzupwith:14:17
Wizzup[  138.991149] cma: cma_alloc: reserved: alloc failed, req-size: 375 pages, ret: -1614:17
Wizzupmaybe I installed the wrong ddx?14:17
Wizzuphmm14:17
freemangordonsee, maybe my patch does not work14:17
freemangordonbut yeah, you must have the correct ddx14:17
WizzupI think I have14:17
Wizzuplet me try once more14:17
Wizzupbut it's weird since it seemed fine before14:18
freemangordonhere it goes locale generation, will take a while it seems :(14:18
freemangordonbut at least I think I will be able to downgrade14:19
siceloWizzup: did sre's patch for acx565akm help?14:30
Wizzupthe panel? yes, I replied that on ml14:30
sicelooh nice. for some reason i don't get all the messages anymore. but nice if that helps14:31
freemangordonWizzup: any progress?14:33
Wizzupchecking14:39
Wizzupmax fps is like 614:40
Wizzup2614:40
Wizzupno crash this time at least14:41
Wizzupwell not yet14:41
freemangordonenter and exit the launcher14:41
freemangordonand check fps then14:41
Wizzupyes I did that14:42
freemangordonstill 26?14:42
WizzupX crashes again14:42
freemangordonhmm14:42
Wizzup[   131.519] (WW) OMAP(0): WARNING: get vblank counter failed: Invalid argument14:42
Wizzup[   131.521] (WW) OMAP(0): WARNING: flip queue failed: Invalid argument14:42
Wizzup[   639.147] (EE)14:42
Wizzup[   639.153] (EE) Backtrace:14:42
Wizzup[   639.243] (EE)14:42
Wizzup[   639.244] (EE) Segmentation fault at address 0x1014:42
Wizzup[  116.882995] omapdrm omapdrm.0: Failed to setup plane gfx14:42
Wizzup[  539.129241] omapdrm omapdrm.0: Failed to setup plane gfx14:42
Wizzup[  639.150726] cma: cma_alloc: reserved: alloc failed, req-size: 375 pages, ret: -1614:42
freemangordonugh14:42
freemangordonwell, not sure what's going on14:43
freemangordontrying to bring my n900 back14:43
Wizzupyou don't get this on n900?14:43
Wizzupah ok14:43
freemangordonno, but I didn;t have most of the things runnung14:43
Wizzupyeah it usually happens for me when I start apps14:43
freemangordonhmm , maybe 16MiB is too small14:44
freemangordoncould you try with 32?14:44
Wizzupcould be, but I also got this even with 64MiB some times, but that was before your patch14:44
Wizzupsure14:44
freemangordonyeah, now the patch should change the thing14:44
Wizzupbuilding kernel14:45
Wizzuptrying now15:11
freemangordonoh,ok, seems I will have to dd15:13
freemangordonbut what?15:13
Wizzupyou mean what iamge?15:14
freemangordonmhm15:14
Wizzuphttps://maedevu.maemo.org/images/n900/20211031/ this boots ok15:14
freemangordonwill flash latest15:14
Wizzupok, you just need to fix mime and hope other stuff wasn't broken15:14
Wizzupbut for kernel you will need to do some more stuff I guess15:14
freemangordonhmm yeah, other stuff15:14
Wizzupwith 32MB I got the same failure with just h-d scrolling15:15
freemangordonok, lemme dd and boot and test15:15
freemangordonI wonder why it continues to use CMA15:16
Wizzupmhm15:23
Wizzupanything you want me to check15:23
freemangordonno15:24
freemangordonmaybe my patch is inclomplete15:25
freemangordon*incomplete15:25
freemangordonbut I need to boot here to verify15:26
freemangordonugh, that one tears like hell15:30
freemangordonI guess that's why it is so fast15:30
freemangordonWizzup: I shall upgrade to -experimental and then put my kernel, right?15:31
Wizzupfreemangordon: yes15:31
freemangordonok15:31
Wizzupfreemangordon: -devel might be ok too15:31
freemangordonok15:32
Wizzupfreemangordon: make sure to have the right libs15:32
WizzupI haven't set up the n900 meta yet15:32
Wizzupfreemangordon: as in ti343x15:32
freemangordonyeah15:32
WizzupI still need to try dtb boot15:33
Wizzup(without appended I mean)15:34
freemangordonmhm15:34
Wizzupshouldn't be too hard15:35
freemangordonWizzup: what is the kernel package name/version?15:37
freemangordonor, we don;t have one yet?15:39
Wizzupfreemangordon: add droid4 component and insall linux-image-droid4 iirc15:39
Wizzupor linux-droid4-image15:39
Wizzuplet me check15:39
freemangordonah, ok15:39
Wizzuplinux-image-droid415:39
freemangordonok15:39
freemangordonWizzup: how many applications to open?16:18
freemangordonWizzup: also, any clue why wifi does not work?16:19
Wizzupfreemangordon: wifi should work with our tree16:21
Wizzupfreemangordon: xterm, cpa, and just click around is enough16:21
freemangordonhmm, cannot repro here16:22
freemangordonbut, with *my* tree16:22
Wizzupfreemangordon: I took your patch and applied it on top of this https://github.com/maemo-leste/droid4-linux/commits/wip/n900/maemo-5.15-cleaned-up16:22
Wizzupand then also decrease cma from 64 to 3216:22
freemangordonI opened xterm, cpa, clock, pdf,qalendar16:22
Wizzuphmmm16:22
freemangordonand that's with xorg from the repo16:22
freemangordonlemme check cma size16:22
Wizzuplet me update the n900 I have16:22
WizzupI maybe forgot to dist-upgrade it16:23
Wizzupalthough I don't think it matters16:23
Wizzup52 packages can be upgraded. Run 'apt list --upgradable' to see them.16:23
WizzupThe following NEW packages will be installed: ti-omap3-sgx xserver-xorg-video-pvrsgx16:23
freemangordon65536K cma-reserved16:23
Wizzupoof16:24
Wizzup64MB then16:24
freemangordonmhm16:24
freemangordonlemme reduce that16:24
Wizzupit helps but you still run into it16:25
freemangordonmhm16:25
freemangordonyep, got that with 16mb16:41
Wizzupok16:42
freemangordonhmm, maybe I shall take https://github.com/maemo-leste/xf86-video-omap/blob/master/src/omap_dri2.c#L237 into account16:43
freemangordonpfff16:43
freemangordonWizzup: hmm, I think we shall do some calculations first16:56
freemangordonlike, if we want to do page flipping, what is the needed CMA per application16:56
freemangordonmaybe we shall not use page flipping on n90016:57
freemangordonand instead do blits, the same way Nokia did it16:57
freemangordonI guess they had reason to do it like that16:57
freemangordonso, each application is 2-buffered in clutter - if we want to flip, those buffers must be CMA allocated17:02
freemangordonso we have ~2MiB per application for those buffers17:03
freemangordonand 1MiB for the 3rd buffer17:04
freemangordonthus, we need 2xnum_apps+1 MiB CMA just for the buffers, IIUC17:04
freemangordonhmm, what the? even after Xorg crashed, CMA free is still 0?!?17:08
freemangordonlooks like someone leaks cma memory17:10
Wizzupfreemangordon: I think so too @ memory leak17:29
Wizzupfreemangordon: does cma show you what allocs what18:17
freemangordonI don't think so18:20
freemangordonin proc/meminfo there is something about it18:20
freemangordonbut I don;t know what it means18:20
freemangordonlike, what cmafree is18:20
freemangordonhmm, with 24MB CMA I have now 13 apps open18:21
freemangordon8 of them are xterm, vbut still18:21
freemangordonWizzup: could you try with 32MB, to see if you can trigger the crash?18:22
freemangordonWizzup: with 24MiB CMA I can start 11 xterms (one of them running htop)+settings+calendar+calculator+pdf+ham18:38
freemangordonI don;t think it makes sense to torture the device anymore than that :)18:39
sicelofmg the exorcist :-p18:51
Wizzupfreemangordon: I had the crash with 32MB almost right after boot19:13
Wizzupfreemangordon: well, we still don't want X to crash if it runs out of vram19:13
freemangordonWizzup: agree (crash), but why it is not crashing for me?19:44
freemangordonWizzup: hmm compaction is disabled in the kernel you use, right?19:46
Wizzupfreemangordon: yes19:49
freemangordonthat might explain it19:49
Wizzupmaybe try to disable it19:49
Wizzupwe don't want it on19:49
freemangordonyes, but who is going to compact CMA?19:49
freemangordonbut ok19:49
Wizzupthis kernel feature is new19:50
Wizzuplike 5.9 new or something19:50
Wizzupclearly it worked before as well19:50
freemangordondid it? I remember having hard times allocating CMA memory back then19:50
freemangordonto the point I was fixing some drivers to have private CMA pool19:51
freemangordonomapfb especially ;)19:51
freemangordonWizzup: also, what do you think is the correct way to handle vram OOM?19:51
freemangordonshall we fix the kernel to pass __GFP_NOFAIL (or whatever the flag is)?19:52
freemangordonkernel == omapdrm19:52
freemangordonWizzup: it is CONFIG_COMPACTION, right?19:57
Wizzupfreemangordon: yes19:57
freemangordonI don't think we can disable that19:58
freemangordonhttps://cateee.net/lkddb/web-lkddb/COMPACTION.html19:58
Wizzupfreemangordon: maybe killing the X window19:58
freemangordonwe cannot disable compaction, IIUC without it there is no way CMA to work19:58
Wizzupit is new since 5.919:58
Wizzupso unless CMA never worked19:58
Wizzuplet me re-check19:58
freemangordonfound in Linux kernels: 3.7–3.19, 4.0–4.20, 5.0–5.15, 5.16-rc+HEAD19:59
Wizzupfreemangordon: maybe we enable it but revert facdaa917c4d5a376d09d25865f5a863f906234a19:59
freemangordonI see20:00
freemangordonlemme read that huge commi message20:00
Wizzupfreemangordon: no nee20:00
Wizzuptl;dr is the guy measured some jvm improvements when he wakes up the system twice a second20:00
Wizzupand he's ignored all our of emails so far20:00
Wizzupor might be on a very long vacation20:00
Wizzupthis kills off mode20:00
Wizzupand also is a pm nightmare20:00
Wizzupthe commit doesn't provide a way to stop the wake ups or even tweak the interval20:01
Wizzupfreemangordon: I'll revert that commit and re-enable the config20:01
Wizzupand test20:01
freemangordonWizzup: just re-enable compaction and test20:02
freemangordonto see if this is the one that leads to almost instant crashes on you device20:02
freemangordonwe'll think about PM if we know this is the problematic feature20:03
Wizzupfreemangordon: no, I'm going to revert that commit in any case20:04
Wizzupwe don't want it20:04
Wizzupand I already reverted it anyway20:04
freemangordonWizzup: wait a second20:04
freemangordonah, ok :)20:04
freemangordonwouldn;t it be easier to just replace HPAGE_FRAG_CHECK_INTERVAL_MSEC with some tunable?20:05
freemangordonlike 30s or something20:06
freemangordonas this looks like a useful feature to me20:06
Wizzupmaybe, but they did not respond to any of my emails so I'm not particularly interested in working with them20:06
freemangordonam I in CC? I think I saw 2 mails so far?20:07
freemangordonI'll ping tomorrow20:07
freemangordonwe may ask tmlind to pester them too20:07
freemangordonalso, gta04 guys should be bitten by that one too20:08
freemangordonbasically, this is every baterry-operated device20:09
freemangordon*battery20:09
freemangordonWizzup: how often is n900 woken-up without this?20:09
freemangordonwho the hell thought that "static const int HPAGE_FRAG_CHECK_INTERVAL_MSEC = 500;" is a good idea?20:12
Wizzupfreemangordon: not very often at all wrt wakeup20:16
Wizzupfreemangordon: tmlind also asked20:16
freemangordonyeah, I know20:16
Wizzupfreemangordon: like less than 0.5 wakeups/s20:16
Wizzupwhen I did some measurements20:16
Wizzupsometimes way less because it stays in off mode for 30+ seconds20:17
freemangordonok, so waking up once every 30 seconds should not affect PM, right?20:17
freemangordonbut yeah, maybe we don;t really need that20:17
freemangordonso, setting the tunable to 0 shall disable that feature, iiuc20:18
freemangordonbut right, lets simply revert until we have a better solution20:18
Wizzupfreemangordon: no, setting that via sysctl does not stop wakeups20:30
Wizzupfreemangordon: I treid my hand at reverting it, if this doesn't work I'll try to use it as is and then see if the bug still occurs20:32
freemangordonyes, I see that setting it to 0 does not stop wakeups, I meant that setting ti to zero should stop wakeups :)20:35
freemangordonsorry for not being clear20:35
freemangordonthe patch to stop wakeups for 0 seems like one-liner though20:36
Wizzupmaybe20:36
Wizzupdon't think it will be a one liner since you need to change the interval probably disable the old timer20:36
Wizzupbut fwiw yes, I don't see crashes now20:36
freemangordongood20:37
Wizzupso I suggest we do a careful revert of that commit20:37
Wizzup(it conflicts in ~6 places)20:37
Wizzupand also another commit uses that sysctl20:38
Wizzupeither that or we really up that interval value20:38
Wizzupbut I think really upping that value probably defeats the point in the measurements this guy did20:38
freemangordonI think it is easier to just increase the wakeup interval to 60 seconds or something20:38
Wizzupk20:38
WizzupI'll do that and try20:38
freemangordonttyl20:39
WizzupI'll make it two mins20:39
freemangordonok20:40
Wizzupbtw I still don't see like 40fps I think20:40
Wizzupbut I will try again once this new kernel hits20:40
Wizzupmaybe cma makes a diff20:40
Wizzuperr compaction20:40
Wizzupfreemangordon: ok so with these patches I will start with omap-linux20:51
Wizzupagreed?21:04
Wizzupfreemangordon: I pushed to wip/n900/maemo-5.15-cleaned-up and confirmed that with much higher interval we are ok with off mode21:12
freemangordonWizzup: yep, I am fine. I will have to create formal patches in xorg omap and linux trees22:04
freemangordonbut not now22:04
Wizzupfreemangordon: sure23:08

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