libera/#maemo-leste/ Sunday, 2023-01-15

rafael2kI'll debian dir directly from debian: https://salsa.debian.org/debian/crust-firmware00:00
norayrsicelo, Wizzup: it is much more useful than shazam. shazam doesn't work in background. you never know when shazam listens to your talks, and when not.01:39
norayrsongrec on the contrary has a key to disable microphone01:40
norayralso has a check box to detect what is played from the phone's speaker.01:40
siceloyes, i can see it's foss. i just wish to know how it talks to shazam servers - does apple explicitly provide an api, or this depends on undocumented behavior, which Apple could change anytime? ... the readme only explains how fingerprinting works02:14
norayri guess it was written somewhere that there is an api.02:15
norayrand it can continiously recognize melodies.02:30
norayryou just leave it and then you have a list of songs.02:30
norayrand you can export it as csv.02:30
norayr(:02:30
norayralso the interface is reflowable, you use landscape mode, the bottom part comes to the right part02:31
norayrof the screen.02:31
norayri guess it is some feature of gtk4, and we maybe don't have gtk4 in chimaera and that software may not have gtk3 source so i may not be able to package it.02:31
norayralso it is in flathub, i found it there.02:32
norayrand installed on pmos on pinephone.02:32
norayrit is very useful.02:32
norayrbut i don't like flatpak's i like packages.02:32
norayrand even more i like gentoo ebuilds. (:02:32
dsc_I forgot how to show the battery percentage08:05
dsc_whats the command (or program) to see battery status?08:05
sicelowhat kind of output does the command you want produce?12:55
Wizzuprafael2k: will do in a bit12:55
sicelothere's, of course, cat /sys/class/power_supply/battery/uevent12:55
siceloand upower -d12:55
Wizzuprafael2k: in any case just to be clear, for crust to work, years ago, we had to pull in newer uboot12:55
Wizzuprafael2k: that's what I mentioned12:55
Wizzupfreemangordon: btw looks like this is the maemo-launcher equivalent of sailfish: https://github.com/sailfishos/mapplauncherd13:10
Wizzupthey have some qt5 booster13:11
freemangordonwhere?13:12
rafael2kWizzup: no problem, we can update u-boot. tks!13:12
Wizzupfreemangordon: https://github.com/sailfishos/mapplauncherd-qt/13:13
Wizzuphttps://github.com/sailfishos/mapplauncherd-booster-qtcomponents13:13
Wizzuplooks like they archived it now13:13
rafael2kso, we already have crust...13:16
Wizzupsicelo: in upstream-forks ?13:17
Wizzupbrb 10 mins13:17
rafael2k: )13:21
siceloi think you meant to hilight rafael2k13:25
norayruvos is  not here. i want to tell him, i guess i need to tell him specifically that the volume up key on pp doesn't trigger the keyboard as it was before.13:31
norayrsearch key on droid triggers.13:31
norayrrafael2k: thank you for your work. i am waiting impatiently for the piggz camera on maemo. do you think you can package it?13:32
norayronce i built megapixels-legacy, now megapixels probably uses gtk4, which we probably don't have in chimaera, not sure. if gtk3, maybe we can build it. i like megapixels actually because i can customize it with my luts.13:33
norayrdsc_ i guess you are searching for upower -d13:33
norayror you can just go to /sys/class/power and somewhere there you'll find some 'bat' files that contain the percentage.13:34
buZzits in /sys/class/power_supply/battery/capacity13:35
buZzbut -only- if previously hit 100% since boot13:35
buZzthats such a drag imho13:35
buZzi generally just look at /sys/class/power_supply/battery/uevent , as its got voltage and discharge current too13:36
Wizzuprafael2k: so do you need me to package crust-firmware ?13:41
Wizzuprafael2k: sorry, do you need me to make a repo for you and add it to ci and such?13:41
dsc_norayr: ty13:54
dsc_& buZz13:54
buZzupower -d only updates once every 120 seconds :(13:55
WizzupbuZz: that is perfect for power management13:55
buZzright13:55
Wizzupyou definitely would not want it any faster13:55
Wizzupit will be faster when on wall charger though I believe13:55
buZzbut do you want to wait 2 minutes to see if charger is connected and charging? :D13:55
buZzit wont, its always 120 seconsd13:56
norayrdsc_,  - https://github.com/norayr/home_sweet_home/blob/master/scripts/pinebook_pro/bat.sh - this is how i was getting information from pinebook.13:56
norayrwhen upower was not able to retrieve it.13:56
buZzyaeh its a shame the names of devices in /class/power_supply arent standardized :(13:56
WizzupbuZz: that is not how this works13:56
norayrbut you need to find own files in /sys/class/power_supply13:57
WizzupbuZz: charger connection is a udev event in the kernel which triggers all kinds of things13:57
WizzupbuZz: so it won't detect that 120s later13:57
buZzupower -d wont?13:57
Wizzupit will see it -immediately-13:57
Wizzupwell, it does on my upower.13:57
Wizzupthe status applet which detects charging uses only upower for its info13:57
Wizzupiirc...13:57
buZzah yeah, i ment the /org/freedesktop/UPower/devices/battery_battery13:58
buZz(lol @ name)13:58
buZzthe /DisplayDevice likely updates more often then?13:58
buZzand /line_power_usb13:59
buZz-line- ? :D13:59
WizzupI don't remember this exactly, there are upower docs online for this13:59
Wizzupbut our status applet has clear code on how to read the battery on all suppported devices13:59
Wizzuphttps://github.com/maemo-leste/status-area-applet-battery/blob/master/batmon.c14:00
buZzwhy not access upower through dbus?14:02
Wizzupupower is only accessible through dbus14:03
buZzah, is that gio.h ?14:04
buZzaha > Gio is a library providing useful classes for general purpose I/O, networking, IPC, settings, and other high level application functionality14:04
WizzupbuZz: no, there is a upower.h include there14:09
buZzisnt that only for the constants?14:09
Wizzupno14:10
Wizzupup_client_get_devices2 etc14:10
buZzoh up_client_get_devices2()14:10
buZzlol @ 214:10
buZz:D14:10
buZzand then with the device use g_ptr_array_index , which is gio.h i think?14:11
Wizzupthat's what people do when they change the api :)14:11
buZz:P14:11
buZzcurrent version of my batterymonitor is getting nice ; http://space.nurdspace.nl/~buzz/maemo/2023-01-13-044313_960x540_scrot.png14:17
buZzthe purple is 'remainder of USB current' which is powering the phone during charging14:18
buZzred is discharge, green is charge14:18
buZzbackground green is batt voltage14:18
buZz(not using any historic data btw, just realtime)14:19
buZzi think the purple one is 'always higher than red' because of the voltage differences14:23
buZzi'm not really sure why 'USB voltage' is below 5V in class/power_supply/usb/uevent14:23
buZzbut maybe the current needs to be calculated to match the battery voltage, or something14:24
Wizzupcool!14:32
buZzstill need to figure out why its using >5% cpu while not updating14:32
buZzor why pyqtchart's 'sized to window' chart extends above Y=014:33
buZz:D14:33
sicelobecause you're polling, maybe?14:33
buZzits not polling when not updating14:42
buZzmaybe its running some eventloop thats not mine, normally these charts also allow panning/zooming, i disabled that but maybe the loop for it is still active14:43
Wizzupuvos: ping14:55
uvosWizzup: yeah?19:12
uvos"1673712315 <norayr> i think forcing the vkb to appear by volume up is broken on pp."19:13
uvosyeah i know, but it works on mapphones and on vm so idk someone else who has a pp needs to debug this one19:13
uvoseither h-d isent getting it here https://github.com/maemo-leste/hildon-desktop/blob/master/src/util/hd-shortcuts.c19:14
uvosor the shortcut is not configured for some reason19:15
Wizzupuvos: hi19:15
WizzupI just packaged https://github.com/sailfishos/voicecall - which is a background daemon to interface with ofono and telepathy19:15
WizzupI tested it, and it works for sip via telepathy19:15
uvosor the dbus singal isent reaching him here https://github.com/maemo-leste/hildon-input-method/blob/33cc6ec1cfe5a6a5c5c576edee586a5082befba4/src/hildon-im-main.c#L10219:15
uvosso someone has to break in these locations/ watch dbus on pp19:16
Wizzupso my plan right now is to make a sphone module to interface with it19:16
Wizzupbut I don't think sphone right now supports a notion of 'accounts'19:16
Wizzupwe can have several sip accounts, for example19:16
uvosit dose not19:16
Wizzupthe voicecall thing is kinda neat, it also does dtmf19:16
uvosyou could register a backend for eatch accont, sphone dosent care what backend really means19:16
uvosso dose ofono btw19:16
uvosbut it dosent work19:17
uvoson mapphones19:17
Wizzupwell, they would be registered at runtime19:17
Wizzupwell sip can do dtmf as well19:17
uvosyes19:17
uvossphoen dosent care when a backend is registered19:17
Wizzupin any case that's my current plan19:17
uvosit will just add it to the dropdown19:17
uvosso sip - accountName19:17
WizzupI was looking into using their code, but it seems well done enough that I don't really want to re-do it19:17
uvosis a valid thing to add to the dropdown19:17
Wizzupok19:17
uvosby just calling for a new backend19:17
Wizzupcan I also remove them at runtime?19:17
uvosyes19:17
Wizzupok19:17
uvosrn it wont update the dropdown untill you respawn the dialer window19:18
uvosbut thas a trivial fix19:18
uvosotherwise should work fine19:18
rafael2kWizzup: no need for crust firmware - we already have it - suspend is working great!19:21
rafael2knorayr: piggz camera is does not support libcamera... he is working on it19:22
Wizzuprafael2k: ok, so maybe we need some way that when people lock the device that it suspends19:23
Wizzupuvos: ok, any way, that's the current plan19:23
uvosWizzup: ok19:23
WizzupI need to untangle some of their code, but it seems to work already19:23
rafael2knorayr: Megapixels gtk3 is here: https://github.com/rafael2k/megapixels/tree/gtk3 it compiles without problem, but it is way too old19:23
Wizzupit also has some mce and audio code, but I don't plan to sue it currently19:23
uvosso registering "backends" dynamicly is imo fine19:23
uvosbut you can ofc also come up with some better sheme19:23
Wizzupfor now I just want to be able to dial and answer :D19:24
uvos /explicit support for muliple accounds per backend19:24
Wizzuponce that works such a refactor is doable19:24
rafael2kWizzup: yes, just call suspend from somewhere when the screen gets locked19:24
uvosWizzup: its not really mutch of a refactor19:24
Wizzuprafael2k: so how would this work if for example music is playing?19:24
Wizzupuvos: I mean refactor the voicecall module19:24
uvosin the just add some list account structs to the backend descriptor19:24
rafael2kWizzup: we need to treat all the cases... suspend shuts down the ARM cpu19:25
uvos*some list of account structs19:25
uvosand then have the dialer display another dropdown if there is more than one19:25
uvosWizzup: ok19:25
Wizzuprafael2k: sorry, what do you mean exactly with all the cases?19:25
uvosWizzup: rafael2k: so suspend19:25
uvosmce module, ez19:26
rafael2kWizzup: if we don't want to suspend when playing a music... for example, we need to explicit add "exceptions"  or whatever we call it19:26
uvosand tiny settings applet to set if it shal suspend on lock19:26
rafael2kuvos yes!19:26
uvosrafael2k: would keep it simple first19:26
rafael2kI totally agree19:26
uvosrafael2k: but mce could listen on pa if there is something playing19:26
Wizzuprafael2k: and we need a system for things to register this, wakelocks or whatever android calls it19:27
Wizzuphttps://developer.android.com/training/scheduling/wakelock19:27
Wizzupmaybe android does not use it anymore19:28
uvosit dose19:28
uvosbut its use is strongly discouraged19:28
uvoswhat there being no wakelock means on devices vaies19:29
uvossome will suspend, on others (like d4) nothing special happens19:29
rafael2kWizzup: we can also set which wakeup-devices we wanna use, I always use this page as reference: https://xnux.eu/devices/feature/system-suspend-a64.html19:29
rafael2ks/wakeup-devices/wakeup-triggers19:30
rafael2kwe can wakeup on alarmtimer*19:31
rafael2kwhich will be nice to use at some for the alarm clock19:32
rafael2kthis SCP processor which keeps running the ARM CPU is halted is pretty interesting indeed19:33
Wizzuprafael2k: what I mean is preventing sleep when say mpv is playing19:34
Wizzupor when a file is downloading19:35
rafael2kwe can definitely do "wake locks" by using the alarmtimer wakeup device and "waking up" the device, for example, to check for new incoming messages (from internet) for eg19:35
Wizzupand yes we also need to set up what wakes it up19:35
Wizzuprafael2k: wake locks keep the device awake no matter what iiuc19:35
rafael2kah, ok19:35
rafael2kthis is easy to implement19:35
rafael2kit should be just a flag to mce as far as I understand19:35
uvossure19:36
uvosimo just add a dbus if to flag mce awake19:37
uvosand a tiny wrapper script19:37
Wizzupthere is also the actual kernel wake locks in mainline afaik19:37
uvosthat the user can then put infront of relevant applications19:37
rafael2kI like this19:38
Wizzupmaybe we can have an issue with a writeup19:40
Wizzupin any case just suspending on lock or screen off won't work well, as you can lock during calls even19:40
freemangordonве алреадъ хаже либплаъбацк19:40
freemangordonoops19:40
freemangordonwe already have libplayback19:40
freemangordonwhich does exactly what you're discussing19:41
freemangordonand not only19:41
freemangordonhttps://github.com/maemo-leste/libplayback19:41
rafael2kправда!19:42
rafael2k: )19:42
freemangordonhehe19:42
rafael2k:P19:42
rafael2kany software already using libplayback?19:45
uvoslibplayback is not really relevant here19:49
rafael2kadded more using libcamera "cam" to capture to DNG: https://leste.maemo.org/PinePhone#How_to_take_a_picture19:49
bencohneat19:56
bencohrafael2k: ufraw might be a nice addition to the list btw19:56
bencohin case you want an alternative to dcraw/qcam19:57
rafael2kbencoh: did not know it. cool!20:01
rafael2kI'm annoyed that Megapixel sets some white-balance related registers so the image looks fine, and I'm capturing I get greenish pictures clearly with no white-balance setting20:02
rafael2kbtw, I'm using latest 5.15 kernel in the PP, as the new 6.1 in Chimaera I still did not manage to finalize the patchset for the cameras20:03
rafael2kdummy question: gcc `pkg-config --libs gconf-2.0 hildon-1 gtk+-2.0 libosso gdk-2.0 gconf-2.0 glib-2.0` -lm20:03
rafael2kis this enough to link a simple hildon app?20:03
Wizzuplooks like source files or object files are missing20:04
Wizzupbut maybe that was not the question :D20:04
rafael2kI'm getting unresolved symbols... undefined reference to `gtk_init_check'20:04
rafael2kundefined reference to `hildon_program_get_instance' ...20:04
rafael2kno no20:04
rafael2kI just omitted it20:04
Wizzupit matters where you put the libs20:04
Wizzupwhat is the whole command?20:04
rafael2kjust for fun: https://github.com/rafael2k/maemo-suspend20:05
bencohright, the linker is order-sensitive20:06
bencohand the default linking search order changed over time, to make it easy :]20:06
rafael2kehehehe20:06
rafael2kwhich app should I look for a working reference?20:07
bencohhmm, any hildon app from the maemo repositories I'd say20:07
rafael2kok20:07
bencohmaybe we should add a suspend button to the powerkey menu btw :)20:07
rafael2kwhere is the source of this?20:08
rafael2kindeed20:09
Wizzupthe powerkey menu?20:09
Wizzuphttps://github.com/maemo-leste/osso-systemui-powerkeymenu/20:10
rafael2kyes20:10
rafael2kmy single button suspend app worked, tks20:23
rafael2k: )20:23
freemangordonrafael2k: you can add a dbus call to power key menu21:18
freemangordonno need for a separate application, assuming there is already some daemon that can suspend the device21:19
rafael2kfreemangordon: agreed indeed!21:19
rafael2klets see if it is all ready in mce first21:19
freemangordonI doubt21:20
freemangordonmaybe upower?21:20
rafael2kehehehe21:20
rafael2kthat is why I just wrote this stuff, until we have it properly done21:20
rafael2kdont think we need upower daemon, could be implemented just in mce afaiu21:21
freemangordonwe already have upower and mce uses it :)21:22
rafael2kneed to go, time for multiki with the baby21:22
freemangordonanyway, my point was that maybe upower already implements dbus interface that can be used to suspend the device21:22
rafael2k: )21:22
freemangordon:)21:22
rafael2kI'll take a look in upower tomorrow!21:23
Wizzupfreemangordon: nah upower doesn't do that21:23
Wizzuplogind might21:23
freemangordonok21:25
freemangordonFYI https://github.com/maemo-leste/osso-systemui-powerkeymenu/blob/master/systemui.xml21:26
sicelo `dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce "/com/nokia/mce/request" com.nokia.mce.request.req_shutdown` no idea if this does work in leste, but i guess it should22:25
siceloah, suspend ... :p22:26

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