libera/#maemo-leste/ Thursday, 2022-01-20

freemangordonuvos: Care to share how you made that work and eventually do a PR?08:11
freemangordonbecause in leste d4 images (at least) there is no sound in FF08:11
uvosfreemangordon: i dident do anything, this has allways worked for me. it also works on a d4 i qute recently installed and upgraded to devel (last weeks image i think)10:55
uvosso its a very recent problem or confined to stable10:55
Wizzupfreemangordon: ok I think I hit the display not turning on problem10:59
Wizzupwhat did you want me to do again?10:59
Wizzupwait it turned on now...10:59
Wizzuptmlind: uvos: so I'm having to offline/online my modem a lot to get my pending messages flushes out, weird11:04
uvosWizzup: i havent used the modem in a while11:17
uvosWizzup: so maybe this is a new issue11:17
uvosor i just dident notice, what are the symptoms?11:17
uvosare they not sent or sent more than once?11:18
Wizzupthey are not sent and just in pending messages11:19
uvoshmm11:19
WizzupI sent like a bunch with telepathy-ring and they weren't delivered for a day or two11:19
uvosthat worked for sure realiably ~1 month ago when i was useing sms often11:19
Wizzupok11:20
uvosi think  i saw it double send a couple of times11:20
uvosor maybe sphone was buggy dunno11:20
WizzupI mean if ofono misses a confirmation of sending (could be some kicks again) then that is possible11:23
uvosmight be related to wether the carrier dose dlr11:26
Wizzuprigt12:34
rafael2kI did not see any sms problems13:26
Wizzuprafael2k: pinephone is different from d4 :)13:30
uvosfreemangordon: so the mce power key issue is fixed, as far as possible13:59
uvosthere are actually lots of issues, all of witch can be repoduced on fremantle13:59
uvosyou just have to be a bit quicker, as mentioned13:59
uvosanyhow mce now uses kernel event times intstead of its own timers14:00
uvosthis fixes single presses being reigsterd as long, doubles as singles etc due to mce stalling14:00
uvosit also checks if those times straddle a mode change to avoid applying the event to the wrong mode because it changed in between it happening and the mode changing14:01
uvoshowever not all problems are fixable and the mce/systemui architecture of global state loosly synced between deamons is fundamentally flawed14:02
freemangordonuvos: great, thanks, will test as soon as I can14:02
freemangordonyeah, I know14:02
uvossingle presses can still be registerd wrongly as long in extream circumstances14:02
freemangordonmhm14:02
uvosand mce will discard events now that straddle a mode change14:02
uvosso because it cant apply them correctly14:03
uvosthis causes events to be missed sometimes14:03
uvosie opening the power menu right after exiting tklock14:03
uvosmay fail14:03
uvostheres nothing that can be done about this14:03
freemangordonthat's not really I big issue14:03
freemangordonwe can;t (or rather should not) queue events, IIUC14:03
freemangordonlemme upgrade and test14:04
uvosfreemangordon: still building14:04
freemangordonok14:04
uvosjust finished14:04
uvosfor amd6414:04
uvosso wait a bit14:04
freemangordonyeah14:05
freemangordonhmm, neither hildon-status-menu nor hildon-home register new applets :(14:06
Wizzupfreemangordon: if you pkill it works I guess?14:06
freemangordonmaybe this has something to do with multi-arch14:06
freemangordonyeah, but it should not be needed14:06
freemangordonlemme check what's goign on14:06
Wizzupfreemangordon: so I think I see X being stuck in drm ioctls again14:09
Wizzupwhat did you want me to check?14:09
freemangordonif all the fences are signalled14:10
Wizzupso /sys/kernel/debug/dma_buf14:10
freemangordonyes14:11
Wizzuphmm now it works again, but it took forever to unlock14:11
Wizzupand touchscreen still doesn't react14:11
uvosWizzup: i think i see this in charge-mode14:11
uvosWizzup: btw14:11
uvosWizzup: if you run charge-mode for a long time14:11
Wizzupfreemangordon: btw you mean /sys/kernel/debug/dma_buf/bufinfo right14:11
uvosWizzup: since switching to drm it somtiems hangs14:11
freemangordonWizzup: yes14:11
freemangordonmaybe pastebin it14:11
freemangordonbut not it works again, it makes no sense14:12
freemangordon*now14:12
freemangordonstill, lets see14:12
Wizzupfreemangordon: https://wizzup.org/bufinfo.txt14:12
Wizzup1004 fds open btw14:13
Wizzup965 of them are dmabuf14:13
uvosnow that dose seam excessive14:13
freemangordonmhm14:14
freemangordonmaybe it leaks14:14
freemangordonI will have a look at this14:14
freemangordonlemme first see why plugins are not being registered (should be trivial)14:15
Wizzupmaybe the huge amount of bufs causes the slowness/problems14:16
freemangordonoh, I may look int https://github.com/maemo-leste/hildon-status-menu/pull/3while at it :)14:16
freemangordonWizzup: sure14:17
Wizzupsounds good14:17
Wizzupuptime is ~2 days14:22
Wizzupit looks like one or two fd's are leaked every time I unlock the device maybe14:23
Wizzupwill try to find some pattern14:23
freemangordonhmm:14:23
freemangordon/usr/lib/aarch64-linux-gnu/hildon-desktop/personal-ip-address.so14:23
uvosid like to also recommend making tklock the singlepress action on devices with just a power button and no lock slider. The doublepress is really janky beacuse it cuases the singlepress action to be executed first and then also the double press action so the power menu shows for a while and then the device turns off.14:24
uvosthis is impossible to fix14:24
uvosas the timout is really long (1s)14:24
uvosso singlepress latecy is way to long if you wait and see if its a double press or not14:24
Wizzupwe can change this in leste-config right?14:24
uvossure but then you double press is hard14:24
uvoswich is also bad for a action that is really the most common thing you do with the button14:25
uvos(ie lock the device)14:25
freemangordonsomehot this works fine on fremantle14:25
uvosnope14:25
uvosyou can see i happen there too14:25
uvos*it14:25
freemangordonyes, I am using that hundreds of times every day14:25
uvosi can make it happen no problem14:25
Wizzupon boot:14:25
Wizzup$ sudo ls -lsh /proc/3385/fd | grep dmabuf | wc -l14:25
Wizzup18414:25
freemangordonmy only phone is n900 with fremantle14:25
Wizzupon fremantle it also shows power menu first14:26
Wizzupand then locks14:26
freemangordonnot here14:26
uvosif you doubless slowly14:26
Wizzupweird, does for me, maybe you're faster :)14:26
uvosotherwise n900 is just to slow14:26
uvosto show the menu14:26
uvosbut it dose the action14:26
freemangordonyeah, if you double-press slowly14:26
uvoswell thats just because n900 is to slow to show the menu quickly ;)14:26
freemangordonbut you double=press normally, there is no power menu14:26
Wizzupno the menu shows for me almost always on fremantle14:26
Wizzup(I am slow I guess)14:26
uvosmce still raises the menu immidatly14:26
uvosif it pops up before the device locks is just a race14:27
Wizzupat any rate we can decide to change that in leste-config for some devices I think14:27
Wizzupfreemangordon: so on the d4 I cannot lock it with double press without the menu showing at all14:27
freemangordonI don;t think we shall do that, we'd rather fix mce to not show power menu instantly14:27
Wizzupwhich I think is what he is saying14:27
freemangordonsure14:27
uvosfreemangordon: its not possible14:27
uvosfreemangordon: without lots of latceny14:27
Wizzupin any case I think we'll discuss somewhere else if single press should be lock or no14:27
Wizzupor not*14:27
WizzupI think I would prefer single press to lock, and long press to show power menu14:28
freemangordonno, please14:28
uvosi also prefer this (on devices without lock slider)14:28
freemangordonlets keep defaults as in fremantle and make cpl applet to set this14:28
Wizzupwe can also just make it a wiki entry, it's trivial to change anyway14:29
freemangordonwell, having UI to change is user friendly, no? :)14:30
Wizzupyeah, I would like to port over this cssu thing14:31
uvospls no14:32
Wizzupdo you know what I mean? the one that allowed to change a whole bunch14:32
uvoslets not have random stuff change mce.ini14:32
Wizzupuvos: I am not sure if you know what I refer to :)14:32
uvosif you want to change this in ui you have to port the vars to rtconf14:32
Wizzuphttps://www.my-maemo.com/software/applications_name_CSSU_Transitions_Tuner_fldAuto_2133_faq_42.html stuff like this I think14:32
freemangordonWizzup: I think we'd rather reimplement it, IIRC CSSU one was buggy as hell14:32
uvosWizzup: well the only way to change it in mce atm is to change its config file14:32
freemangordonuvos: so?14:33
uvosWizzup: we _dont_ want random stuff changing mces config file14:33
uvosWizzup: it has rtconf for that14:33
Wizzupsure, but a ui can use rtconf :)14:36
uvosright but porting it i mean14:37
uvoswith the pls no14:37
uvossince it dosent14:37
Wizzupuvos: is there also PowerKeyMediumAction ?14:38
uvosno14:38
uvosthe medium time is used only in actdead14:38
Wizzuptoo bad14:39
Wizzupok14:40
Wizzupfreemangordon: it was this http://wiki.maemo.org/CSSU_Features_Configuration_Editor14:40
freemangordonyeah. And iirc it was buggy :)14:41
freemangordonse we'd better reimplement14:41
freemangordonbut nit now ;)14:41
freemangordon*not14:41
freemangordonanyway, I am on applets not showing now14:42
Wizzupmhm14:46
Wizzupso you can't swap short and long without the long being useless if you set long to menu14:57
Wizzuperr14:57
Wizzupsorry14:57
Wizzupnot long, but short and double14:57
uvos?14:58
Wizzup[PowerKey]14:58
WizzupPowerKeyShortAction=tklock14:58
WizzupPowerKeyDoubleAction=menu14:58
WizzupI did this as a test14:58
Wizzupand I cannot get the menu to show14:58
uvosright14:58
uvosbecause short triggers14:58
Wizzupright14:58
uvosand then the deivice is locked14:58
uvosi use:14:59
uvosPowerKeyShortAction=tklock14:59
uvos PowerKeyLongAction=menu14:59
uvosPowerKeyDoubleAction=poweroff15:00
uvosand PowerKeyDoubleDelay=15015:00
Wizzupright15:00
WizzupI won't do that now as a test because that will mess me up badly wrt my muscle memory15:00
uvosand PowerKeyLongDelay=200015:00
sicelofreemangordon: what about personal-ip-address widget?15:07
freemangordonnothing about it in particular15:07
freemangordonit is that h-h ignores it after installation15:08
freemangordonthere is a bug in libhildon115:08
freemangordonoops15:08
siceloas for widget not appearing, see https://github.com/maemo-leste/bugtracker/issues/459 and https://github.com/maemo-leste/bugtracker/issues/36815:08
freemangordonin libhildondesktop-115:08
sicelohttps://bugs.maemo.org/show_bug.cgi?id=9370 ... i think it all comes from there15:08
freemangordonmhm15:08
freemangordonI am on it15:08
sicelogreat :-)15:08
freemangordonwill let you know when I fix that to test and eventually close the issue, ok?15:09
freemangordon*issues15:09
sicelocool, thanks. indeed the bmo bug suggested libhildondesktop too15:09
humpelstilzchen[Hi, anyone here has the hardware-keyboard working on pinephone?15:30
humpelstilzchen[Anything special to conside?15:31
humpelstilzchen[s/conside/consider/15:31
Wizzupwe have a kernel where it is supposed to work but we didn't push it to stable yet15:34
humpelstilzchen[ok, do you have the kernel git/branch for me please?15:40
Wizzupyou can add the beowulf-devel repo and apt dist-upgrade15:49
Wizzupfind the line with 'deb https://maedevu.maemo.org/leste beowulf ...' in /etc/apt/sources.list15:50
Wizzupand copy it and change beowulf to beowulf-devel15:50
Wizzup(so you have both)15:50
humpelstilzchen[aah, so its already build, thx15:55
Wizzuphumpelstilzchen[: please let me know if it works for you16:07
Wizzupyou can be  the first to confirm that it works :)16:07
humpelstilzchen[Wizzup: most keys seem to work, have not tested all the special fn-something combos yet16:09
freemangordonsicelo: hmm, I wonder if that has ever worked16:13
freemangordon(first h-h applet that is)16:13
Wizzuphumpelstilzchen[: we will need to make a xkb map for it, if it doesn't exist already16:18
Wizzuphumpelstilzchen[: including maps for our fn key and others16:18
Wizzuphumpelstilzchen[: but that means the kernel side works for you, that's great!16:18
freemangordonoh, I see16:19
Wizzuphumpelstilzchen[: see https://leste.maemo.org/Motorola_Droid_4#Notes and in particular https://leste.maemo.org/File:Maemo-leste-droid4-kbd-2021-07.png - and https://github.com/maemo-leste-upstream-forks/xkb-data/blob/master/symbols/motorola_vndr/droid416:21
Wizzuphumpelstilzchen[: btw you should also get better 2d/3d on pp with that upgrade, we're working on moving that to stable to16:21
Wizzups/to/too/16:21
humpelstilzchen[only updated the kernel so far, I still get artifacts, maybe I should try the new mesa packages then16:23
Wizzuptry 'apt dist-upgrade'16:23
Wizzupthere will be -some- artifacts still, but should be less16:23
humpelstilzchen[hmm, dist-upgrade wants to remove hildon-desktop-rotation-support, something seems to collide16:25
Wizzuphumpelstilzchen[: that is fine if it wants to remove that16:25
Wizzupfreemangordon: you tested this one right? https://maedevu.maemo.org/images-devel/pinephone/20220119/ (maybe compare md5sum?)16:25
freemangordonlemme check16:26
humpelstilzchen[ok16:26
Wizzupfreemangordon: I was going to poke enunes :)16:26
freemangordonWizzup: 6f5027e1c8483342483db4a206ade1d3  maemo-leste-1.0-arm64-pinephone-20220119.img.xz16:26
Wizzuphumpelstilzchen[: yeah the support will still be there16:26
Wizzupfreemangordon: $ md5sum maemo-leste-1.0-arm64-pinephone-20220119.img.xz16:27
Wizzup6f5027e1c8483342483db4a206ade1d3  maemo-leste-1.0-arm64-pinephone-20220119.img.xz16:27
Wizzupfreemangordon: so looks like I can poke enunes16:27
freemangordonmhm16:27
humpelstilzchen[on upgrade: Call to flock failed: Resource temporarily unavailable  - invoke-rc.d: initscript hildon-desktop, action "restart" failed16:30
humpelstilzchen[gonne uncomment that part in postinst and do a manual reboot16:30
Wizzuphumpelstilzchen[: full disk?16:31
Wizzuphumpelstilzchen[: run /etc/expandcard.sh16:31
Wizzuphumpelstilzchen[: probably don't need to uncomment it in postinst, better to finish the upgrade first16:32
humpelstilzchen[not full according to df16:32
Wizzupok16:32
Wizzupdid the upgrade complete otherwise?16:32
Wizzup(also yeah hildon-desktop restart should be a no-op fwiw)16:32
humpelstilzchen[now its completed16:32
Wizzup(reboot is a good idea fwiw)16:34
tmlindhmm the images directories for the 16th are empty?16:35
tmlindhttps://maedevu.maemo.org/images/droid4/20220116/16:35
Wizzuplet me check, maybe somethin failed16:39
Wizzuplet me just rerun em16:39
Wizzuptmlind: yeah16:40
Wizzuprsync: write failed on "/home/amprolla/images/droid4/20220116/maemo-leste-1.0-armhf-droid4-20220116.img.xz": No space left on device (28)16:40
Wizzupwe really should just host it somewhere else16:41
tmlindok16:42
Wizzupin 1-2 hours there will be a new one16:43
Wizzupbut we didn't change anything in stable so you can just take the previous one and upgrade to -devel16:43
humpelstilzchen[cool now I have a welcome screen with ssh credentials - that might help a lot for future users :)16:43
Wizzuphumpelstilzchen[: yeah, it is :)16:43
Wizzupuvos: ^^ :)16:43
tmlindWizzup: ok thanks i'll try again a bit later then16:50
freemangordonsicelo: actually, you should not have "add widget" button enabled, as when you install new h-h applet, it should be placed automatically on the desktop ;)17:02
freemangordonand this is what is broken :)17:02
freemangordonwell, *was* broken17:03
freemangordonafter the fix there remains a minor issue in h-h that even after you uninstall an applet, it is still selectable in the menu17:10
freemangordonbut I guess we can live with that17:10
lelfreemangordon closed an issue: https://github.com/maemo-leste/bugtracker/issues/459 (hildon-home doesn't show the "Add widget" button upon installation of the first widget)17:26
Wizzuphumpelstilzchen[: btw if you're up for helping with the keyboard layout, lmk, I ordered a keyboard but it will take a few weeks before I get it17:51
humpelstilzchen[Wizzup: thanks for your help. I will probably come back for you. But first I'm going to get some "feeling" for the keyboard and fine some replacement programs for the ones I'm missing from the n90018:01
Wizzupok18:05
Wizzupwhich programs are you missing?18:05
humpelstilzchen[I don't have the full list yet. There was easylist, which was a todo/shopping list. Maybe the sources are still in the internet and can be compiled. A weather and calendar widget would also be nice, does that currently exist?18:15
humpelstilzchen[And is there a recommended browser?18:16
uvosqtwebbrowser works well ootb, or firefox works very well but needs hwkbd and some envvars about:config entrys18:17
uvoscalendar widget exits and works fine bte18:19
uvosno weather18:19
uvosfreemangordon: so did the mce race fix solve your issues?20:01
freemangordonuvos: at least on PP it looks to behave fine20:39
freemangordonhave guests so didn't have time to play on d420:40
freemangordonwill report as soon as I test it20:40
freemangordonuvos: RE firefox - do we have those settings documented somewhere?20:41
freemangordonuvos: why it takes so long for mce to lock screen on d4? on PP it happens in an instant.21:14
lelfreemangordon closed an issue: https://github.com/maemo-leste/bugtracker/issues/368 (hildon-desktop - needs a restart to pickup new desktop widgets)21:15
sicelofreemangordon: ty @fix. i haven't tested it yet, but nice finding. i'm not sure i fully like widget auto-placement in desktop, but i definitely prefer it over having to kill hd/hh or reboot :-)21:34
freemangordonsicelo: this it how it was designed to be. and honestly, it kind of makes sense21:35
freemangordonimagine if you are not familiar with maemo21:35
freemangordonyou would expect to see what you have just installed somewhere21:35
siceloright, :-)21:36
uvosfreemangordon: so quirks-mapphone is pretty slow (it waits for the modem and kernel several times) also d4 has a lot of input devices, it waits for x for eatch one21:36
freemangordonuvos: can;t we reorder?21:37
freemangordonas it takes nearly 2 seconds21:37
uvosno21:37
uvosreording is an ordeal if you want tklock to work21:37
uvosotherwise yeah my setup is reorderd for performance21:37
freemangordonwe cannot turn display off first? why is that?21:37
uvosand its very fast21:37
uvosbecause its determined by the module loading order21:37
freemangordonuvos: sorry, I don;t get that21:38
uvosthe module loading order is however also subject to lots of subtle bugs21:38
uvosin the old modules21:38
uvosso mce uses data pipes21:38
freemangordonso, "turn off" callbacks are called in module load order?21:38
uvosyes21:38
uvosso every module registers its callbacks21:38
uvosand they are called in the order they are registerd21:38
uvosmost callbacks are regsiterd at load time ofc21:39
uvoschanging the order breaks the legacy/fremantle modules21:39
uvosbecause they use global state21:39
uvosso the callbacks that modify global state break later callbacks21:39
freemangordonwell, we can implement priority, no?21:39
uvosyou could but you would have to untange a huge mess21:40
freemangordonor, have a separate module for turning the display off that's loaded first21:40
uvosa better way is to reimplement the mess21:40
uvos(wich i have done for myself)21:40
uvosand make stuff async21:40
uvoslots of stuf could be async21:40
freemangordonuvos: no matter what, the same legacy module on fremantle turns display off on an instant21:40
freemangordon*modules21:40
uvosfreemangordon: sure they dident run into the issues as mutch, mce as just a lot more to do on d421:41
uvosalso the problem is that its dose just ipc21:41
uvosand the ipc its doing is stalling it wating for other processies21:41
freemangordonwell, no matter the reason, this is not really user friendly21:41
freemangordonI know you don;t use double-press, but that's no reason to not implement it right21:42
uvoswdym21:42
uvosi fixed double press21:42
uvosotherwise make stuff async21:42
freemangordonsorry, was it broken?21:42
uvosyes it was21:42
uvos(also on fremantle)21:42
uvosanyhow make mce more async so it dosent wait for other processies all the time21:43
uvosis the fix21:43
uvosofc thats lots of work21:43
uvosalso figure out why dpms is so damn sloww21:43
uvosthats just a ddx thing21:43
freemangordonI don;t know what you mean by "broken", but on fremantle double-press locks the device instantly21:43
freemangordonon d4 it takes 2 seconds21:43
freemangordonyeah, dpms21:43
freemangordonwe may have kernel issue there21:44
freemangordonI think it is related with vblank patch21:44
freemangordonI will do some experimenting with that reverted21:44
freemangordonbut, if on d4 we wait modem and whatnot to be turned off before even trying to turn off the display, then I would say we have a bad design21:45
uvosyes21:45
uvosthis is the design of mce21:45
uvosit dose suff in serial and order cant be controlled21:45
freemangordonwe shall implement some control then21:45
freemangordonas I said - priority21:46
freemangordonno need to do it asunc21:46
freemangordon*async21:46
uvosasync is mutch better21:46
uvosreally21:46
uvosand there are easy wins here21:46
freemangordonas I can imagine this will be a huge task21:46
uvosno21:46
uvosthere are some self contained easy wins here21:47
uvospriority ordering is a huge task21:47
freemangordonuvos: the easiest way is with priorities21:47
uvosto make it not mess with the global state problem21:47
uvosno21:47
uvosits gona be pretty insane21:47
uvostrust me21:47
freemangordonsee, it is not that I didn;t work on mce code21:47
uvosat this point i have rewritten all modules21:48
freemangordonit is just that it was some time ago21:48
uvos(that i use)21:48
freemangordonuvos: ok, but having such a big delay for such a simple task like turning the display off which was not there initially means that something is not quite right21:49
uvosyes and i told you whats not quite right21:49
uvosit waits on ipc in cases it dosent really have to21:49
freemangordonand I think it makes sense to try to fix that without having to reengineer the whole codebase from scratch21:49
freemangordongoing async will brign other problems I would like to avoid21:50
uvosno it wont21:50
uvosi know lots of places where it would not21:50
freemangordonyou need to syncronize at some point21:50
freemangordon*synchronize21:51
freemangordonotherwise you will never have deterministic behaviour. anyway, lets not go into that21:51
uvosthere are places where this is really easy21:51
freemangordonif you don;t want to look at it, fine21:51
freemangordonI will21:52
uvosplease dont, reording is not a  good solution to the problem really21:52
freemangordonas I said - not reordering, but priorities21:53
uvosthat is effectively reodring the callbacks21:53
uvossure you can fake it being fast by turning off the backlight21:53
uvosbut it will still be dreadfully slow21:53
freemangordonwhich will be enigh21:53
uvosmaking it annoying to the user21:53
freemangordon*enougj21:53
uvosno21:53
uvosnot really21:53
freemangordonwhy?21:53
freemangordon1. Turn backlight off, 2. disable TS21:54
uvosyou cant fake it tunring on, thats really slow to, tunring it off and on again (wich happens by accident often) will be really slow21:54
freemangordonthose are enough for te user to see that somethiong actually happens21:54
uvosand mce will discard power buttion presses in the mean time etc21:54
uvosthe state changes around dim mode will be terrible21:54
freemangordonbecause now you double-press, but nothing happens21:54
uvos(as they are now)21:54
uvosits just not a good solution21:54
freemangordondim?21:54
uvosdim mode21:54
freemangordonwhy dim, you wont lock21:54
freemangordon*want21:55
uvosno21:55
uvosso if the device dims21:55
freemangordonyes, you want lock on double-press21:55
uvosit takes forever form mce to undim21:55
uvosthis isent about that21:55
uvosim talking about problems reodring the callbacks dosent solve21:55
freemangordonah, yeah, why it takes ages to dim? do we do SW dim?21:55
uvoshmm ages to dim?21:56
uvosit takes ages for mce to realise its goten an event21:56
freemangordonwell, undimming21:56
uvosand then undim21:56
freemangordonah21:56
freemangordonwhy is that?21:56
uvosit waits for xinput21:56
uvosis the main problem i think21:56
uvosbut haven profiled that21:56
freemangordonhmm21:56
uvosand yes we use sw to drive the backlight fade21:57
uvos(as did fremantle)21:57
freemangordondoes not makes sense, as h-d registers touches instantly21:57
uvosright so dose mce21:57
uvosbut21:57
uvosthere are several problems here21:57
freemangordonand why it needs 2 seconds to realize it has to undim?21:57
uvosit dosent21:57
freemangordonhere it does21:57
uvosit needs a long time to undim21:57
freemangordonyeah, why?21:57
uvos(it also has a 1 sec timeout that migght be in the way)21:58
uvosagain xinput21:58
uvosit reanbles xes input devices21:58
uvosso for ts events21:58
uvosit also works like this21:58
freemangordonthose are disabled on dim?21:58
uvosyes for one click mode21:58
freemangordonwait21:58
freemangordonthere is event eater in tklock for that21:58
freemangordonthere is absolutely no need to disable anything at that point21:59
uvosright but mce implements this again (allways has, on fremantle it disables the devices in kernel)21:59
uvostklock is totaly redundant21:59
freemangordonno21:59
freemangordonno21:59
uvosyes21:59
uvosyes21:59
uvosanyhow back to ts events21:59
freemangordonno, you are doing broken redesign here21:59
uvostheres another problem21:59
uvosno21:59
freemangordonyes, listen:21:59
uvosanyhow back to ts events: it works like this22:00
uvosit listens for ts events22:00
uvoswhen it gets one22:00
freemangordonon dim, screen is dimmed and event eater in tklock is armed22:00
uvosi know22:00
freemangordonit "eats" the first input event (no matter TS or another)22:00
uvosi know22:00
freemangordonand then you just undim22:00
uvosi also know22:00
freemangordonno need to disable anytthing22:00
uvosright but mce disables other input devces in this mode22:01
uvosin kernel on fremantle22:01
freemangordonyour private no-tklock use-case is not reason for mce to disable anything22:01
uvosi dident add this22:01
freemangordonplease show me the code22:01
freemangordonin 'stock' mce22:01
uvosback to mce input: so when it gets a ts event there is a 1 sec timeout where it ignores ts events22:02
uvosso sometimes when it enters dim mode22:02
freemangordonmce?22:02
uvosyes22:02
uvosi cant switch out for 1 second no mater what22:02
freemangordonthere is no such timeout in fremantle mce22:02
uvosthis again was implemented in fremantle22:02
uvosyes there is22:02
freemangordonand that's for sure22:02
uvosyes there is22:02
uvosand they added this22:02
* freemangordon tries22:02
uvosbecause otherwise mce uses huge amount of cpu time22:02
uvosbecause of the event rate of the ts22:03
uvosalso ofc this is only happens if you touch right before it enter the mode22:03
uvosso its not that relevant22:03
uvosi was just mentioning this bug/race that exists that can extend the time by 1 sec sometimes22:03
freemangordonon d4 it is way worse22:03
freemangordonand just tried on fremantle:22:04
freemangordondimmig happesn in .5s or something22:04
freemangordonand I clicked immediately after the dim22:04
freemangordoninstant undim22:04
freemangordondid that several times22:04
freemangordonconsistent behaviour22:05
uvosidk how easy this race is to trigger in real life22:05
freemangordondo you want me to capture a video?22:05
uvosi just know it exists in the code22:05
uvosno22:05
uvosi know its slow22:05
freemangordonon fremantle?22:05
uvosyes22:05
freemangordonit is not22:05
uvoson d4 i mean22:05
freemangordonit happens in an instant22:06
freemangordonah22:06
uvosyes22:06
freemangordonyeah, on d4 it is slow22:06
freemangordonbut, it is not on PP22:06
freemangordonand I think it is not on n90022:06
uvosright d4 mce dose quite a bit more stuff22:06
freemangordonright22:06
uvosim sure22:06
uvosif you go and unload lots of modules it will be fine22:07
freemangordonand that is what I am saying - this "other' stuff shall be done after the prymary stuff22:07
freemangordon*primary22:07
uvosnot possible/ usefull in many cases22:07
freemangordonalso, why do you need to do anything on dim?22:07
uvosi have not profiled this22:07
uvosso i dont know22:07
uvosits not that mutch really22:07
freemangordonuvos: right, maybe we shall see what happens there22:07
freemangordonno, it is really ~ 2 seconds22:08
freemangordonwhich it too much22:08
freemangordonhalf a second would be acceptable22:08
freemangordon2 seconds is not22:08
freemangordonthats really a broken UX22:08
uvosits like 0.5s here22:08
uvosbut yeah i use different modules22:08
freemangordonbut yeah, we need to profile22:08
freemangordonuvos: :nod:22:09
freemangordonI guess this makes all the difference22:09
freemangordonI use stock setup22:09
freemangordonand yes, as Wizzup said, on d4 power menu always pops on double-press22:09
freemangordonnot on PP22:09
uvosthis is just a race22:10
uvosthat exists on all devices22:10
uvosif dpms is slow22:10
uvosit will show22:10
freemangordonmhm22:10
uvosie if the device is slow to turn off  the display22:10
uvosit will show22:10
freemangordonagree22:10
uvosits also a race with your finger22:10
uvossince doublepres is 1 sec22:10
uvosso you can press 1 sec press22:10
uvosthat will make it happen on any device22:10
freemangordonsee, I know how this works :)22:10
freemangordonand I know it is wacy22:11
freemangordon*racy22:11
uvosright an i think is pretty terrible22:11
uvoshoneslty i would scrap doublpress for this reason22:11
uvossince it cant be fixed22:11
uvosand its janky22:11
freemangordonbut, this shows only on d422:11
uvosno it dosent22:11
uvosi shows only on d4 if you doublepres really fast22:11
uvosit happens on fremantle n900 for me to 100% of the time22:12
freemangordonuvos: only  on d4 it takes 2seconds to power-off the screen22:12
uvosi gues my finger isent as fast22:12
freemangordonit is not about power menu showing22:12
freemangordonit is about taking 2 seconds to turn the display off22:12
freemangordonon PP and on fremantle the instant right after second press the display is off22:13
uvosbtw double press to off is the slowes method possible22:13
uvossince it22:13
freemangordonon d4 it takes 2 seconds after the second press to turn the display off22:13
uvoshttps://github.com/maemo-leste/mce/blob/b69ca6df857fce86051182943ade97de95493576/src/utils/powerkey.c#L51422:13
freemangordonthis is what I am talking about22:14
uvosie it waits for mce to idle22:14
uvosi had to do that22:14
uvosfor the global state to be correct22:14
uvoswhen it enters lock22:14
uvosotherwise the powermenu mode breaks tklock22:14
freemangordonok, have to see how it is done on fremant;e22:15
uvosits perfomed in a timer22:15
freemangordonuvos: also, for sure double-press is registered correctly22:15
freemangordonbecause what happens is:22:16
freemangordonon the first press, power menu gets shown22:16
freemangordonon the second press it gets hidden22:16
freemangordonthen you wait 2 seconds22:16
freemangordonand display turns off22:16
uvosnot really22:16
freemangordondo you want me to take a video?22:17
uvosyes i know what happens22:17
uvosso no22:17
uvosbut your desciption is wrong22:17
uvosthe second press dosent hid the menu22:17
freemangordonno, it is not22:17
uvosthe mode change dose22:17
freemangordonthis is what happens here from the user POV22:17
uvosthe mode change closes the window, this happens to happen way before dpms compleats22:18
freemangordonwhat do you mean "mode change"?22:18
freemangordonmode change to "tklock" I guess22:18
uvosglobal mode22:18
freemangordonbut, this mode change happens because of the second press, no?22:18
uvosmaybe22:18
uvosdepends on what you have there22:18
uvosalso depends on global state22:18
freemangordonnothing else but the second press can make power menu be hidden22:19
freemangordonso, it gets registered correctly22:19
freemangordonand then it takes 2 seconds here for display being turned off22:20
freemangordonuvos: sec, have to answer to enunes22:20
Wizzupfreemangordon: fwiw I believe the answer to his question is that it doesn't22:20
Wizzupchecking22:20
freemangordonyes, it doesn;t22:21
Wizzupok22:21
freemangordonbut I have to register to answer :)22:21
WizzupI'll let you answer22:21
Wizzupcheck22:21
Wizzupmaybe also point him at being able to use apt get source or just link to the repo https://github.com/maemo-leste-upstream-forks/clutter-0.822:21
freemangordonugh, I don;t remember the password, will reconnect22:23
uvosfreemangordon: btw go into 70-droid4.init and remvoe quirks-mapphone22:37
uvosmakes a large difference22:37
uvossuggesting that indeed about 0.3s or so is wating for the modem22:37
uvosthats not really mutch of a problem22:38
uvoswe can async that22:38
uvosit dosent need to be synced with anything22:38
freemangordonuvos: ok, will do, but not now as we are in some discussion on #lima re PP22:38
uvosiio-accelerometer;iio-als;;iio-proximity makes a difference22:38
uvosnot very supprising22:38
uvosthats up to 3 dbus round trips22:38
uvosto unbind the sensors22:38
uvosagain this is device specific module22:39
uvosalso easy to async22:39
freemangordonuvos: and I guess those can be disabled after screen is turned off22:40
uvosno dosent reall matter when the sensors are unbound realtive to other stuff22:40
uvosasync is better22:40
freemangordonok, but you'll have to implement some kind of semaphore there22:43
uvossure dbus makes this easy22:43
uvosuse the async calls22:44
freemangordonand I am afraid this will make it even more complicated and error prone22:44
uvosif you end up having to rebind the sensors beofre it returns22:44
uvosjust block then22:44
uvosnot really22:44
freemangordonok22:44
freemangordonI still think there should be an easier way to fix that22:45
uvosnot really dbus round trips have bad latency22:45
uvosthats just how it is22:45
uvosalso modem is slow22:45
uvosthats also unfixable22:45
freemangordonyeah22:45
freemangordonbtw, why do we touch modem on lock?22:46
uvoswe have to stop its rssi reporting22:46
uvosotherwise it wont sleep22:46
freemangordonah, wait, you are talking about dbus because we are using iio-senors?22:46
uvosyesh22:46
freemangordonahaaa22:46
uvoswe have to takl to ii-sensors over dbus22:46
freemangordonI see now what do you mean by async22:47
uvosto tell it we dont need trhe sensors22:47
freemangordonwell, yeah, thats fine22:47
freemangordonasync dbus calls is just right22:47
freemangordonas soon as you keep the local state consistent22:47
freemangordonyeah, right. we have a deal on that  :)22:47
freemangordonsure you can issue async dbus call and queue enabling if it needs to be enalbed before you have disable call result22:48
uvosyes exactl22:49
uvosy22:49
freemangordoncorrect22:49
uvosthere are lots of place like that in mce22:49
uvos*places22:49
freemangordonit took me a while until I understand what do you mean by "async" :)22:49
freemangordonbut yes, I agree this will help a lot22:49
freemangordondo you want me to help with the implementation?22:50
uvosif you like22:50
uvosbut its not mutch work really22:50
uvoshttps://github.com/maemo-leste/mce/blob/b69ca6df857fce86051182943ade97de95493576/src/modules/quirks-mapphone.c#L4222:50
uvosthis code block is slow22:50
uvosopen() is slow here22:50
uvosand so is the write22:50
freemangordonhmm, but why do you use open() etc? IIRC mce wa using gio for async file operations22:51
freemangordonGIOChannel etc22:51
uvossometimes yeah22:52
uvosit also uses open etc often22:52
freemangordonI guess I can rewrite this to use giochannel22:52
uvosthis module is also kinda throwaway since its a collection of hacks really22:52
uvosyou have to close the fd btw22:52
uvosotherwise modem dosent sleep22:52
uvosso i dont se how gio can do better22:53
uvoswrt open22:53
freemangordonbecause we can open async22:53
freemangordonand write on it being opened22:53
uvossure ok22:53
freemangordonno need to block in display_state_trigger22:54
freemangordonand we can always cancel pending async calls22:54
freemangordonuvos: ok, so I'll take on that one22:54
freemangordonplease have a look at iio modules, ok?22:55
uvossure22:55
uvosthe other thing tahts slow is dpms22:56
uvosand on enable tklock22:56
uvosxset dpms force on and off takes about a second by itself here22:56
uvosso thats half the problem right there already22:56
freemangordonright22:56
freemangordonbut lets first pick the low-hanging fruits22:57
freemangordonok, going to have some sleep, night!23:00

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