libera/#maemo-leste/ Friday, 2022-01-28

kona_pinephone hwkbd is out00:58
xmnyuppers, review are slowly popping up. And thing like dont charge it through the phones usbc port if you have it hooked up to the phone.01:00
konadef dont01:17
konathat will likely fry something01:17
konakbd takes some fiddling to get working on mobian but it does work.01:18
konaactivation distance is a bit unforgiving, which leaves the keyboard feeling mushy and unresponsive, but eliminates some unintentional keypresses01:20
konaphone fits in it very well, and it feels solid once assembled01:21
konahinge is stiff, which is good for mobile use but might give trouble for people with grip issues01:23
uvosis there a hw way to dect if its closed?01:26
huckguvos: Thanks for the help yesterday with bionic audio, I boosted the volume by editing HiFi.conf. 5 was really very quiet.01:33
konauvos: not sure, just got it01:44
konano, pp hwkbd schematic shows no hinge sensor02:40
xmnkona, uvos maybe there could be a gyro software solution that turn on when your using the if2 connection to sleep when closed and start up when open a certain way.07:56
xmnbtw, kona I forget it does have backlighting right? Are you happy so far with it?07:57
humpelstilzchen[I would have thought of the proximity sensor for keyboard detection, but maybe use proximity and IMU08:04
konaxmn: there's a couple of interesting possibilities.  the keyboard has a single button that is separate from the phone's power button.  according to the drivers, its status can be polled, including long press, short press, double-press, and no press (open)08:06
konaprox sensor might be a way to do it.08:06
konai was also thinking that since there's an i2c input daemon, it could signal the UI to remove the OSK when keystrokes are detected, and to re-enable OSK when the keyboard is idle a certain amount of time.08:08
xmnah, yeah forgot about the prox! maybe combine with the accelerometer08:08
xmnwould be nice to turn off keyboard keystroke when using certain apps like the phone apps08:10
konaaccel is another great way to do it, although it would have to have tolerance for cases where the screen might be slightly tilted08:10
konafirmware is totally open, and gets loaded as far as i can see by the drivers.08:10
xmnyeah you would need a profile for speed likely or something. I'm no dev :P08:10
konaso there's a bunch of customizations we could do.08:10
xmnyeah hopefully in a years time we have lots of options08:11
konain theory i2c input daemon knows whether it is successfully polling the kb, maybe could find a way to use the presence or absence of a poll response.08:13
xmnhmm, interesting idea08:13
konaand could also mod the daemon to activate and deactivate OSK08:13
xmnso you could basic block the polling when using the phone apps etc08:14
konabased on button presses08:14
xmnsee I not sure button press would be enough if you had to take a call in the case and don't have time for headsets08:14
xmnI'm*08:15
konai suppose that's a possibility, but i don't have a lot of knowledge about how the maemo OSK works, as evidenced by my prior questions in here.08:15
konaah, yeah, i think you're right.  a few apps would definitely need a way to disable while active.08:15
konathe "recommended" method for using the device as a phone with the keyboard attached is with either a wired or bluetooth headset.08:16
humpelstilzchen[problem is that you can't hide the keyboard once it is attached08:17
konai don't know whether i could comfortably hold the phone to my ear with the keyboard attached, but i intend to use it more like an n810 wimax so i wasn't even thinking about calls.08:17
humpelstilzchen[unlike the n900 with its slide. The PP hinge do support a max of 180°, so no turn around either08:17
konaright.08:18
xmnyeah. That my biggest issue with it actually.08:19
konai made this contraption with a BT keyboard affixed into a foldable fabric case for my android phone and it is tolerable because i can fold it 360 degrees08:20
xmnI would use it in the case without headset on purpose... lol. But there will be times that you can't avoid it.08:20
xmnnice!08:20
xmnpictures?08:20
konabut with the pp kb, it's just clearly meant to be clamshell.08:20
konauh, let me see.08:20
xmnyeah I was hoping it would be like those yoga/windows laptop flip devices.08:21
humpelstilzchen[yoga, exactly. Also I would not mind to go without the extra battery08:22
xmnI think I may hold out for the vers 2 if when that comes.08:22
xmnI love the extra battery though. My n900 last all day ... not the PP yet08:22
xmnI would however love a mod that allow you to keep the phone back on while using the kb case08:23
konaxmn: https://rootaction.net/owncloud/index.php/s/r5sOFG9naYhiKX808:23
xmnLike having the if2 on the outiside ready for the kb case to use08:24
konahopefully that link works to show my s10e with the rii keyboard.08:24
xmndude, that a pretty cool mod and idea. kodos08:25
xmnand bonus point for using own/next cloud :)08:25
konathose are actually magnetic snaps rather than mechanical snaps.08:25
konaty :)08:26
konai must go find sleep now though.  catch y'all later :)08:26
xmncoolio08:27
xmnhave a good one. thx for the chat08:27
freemangordonWizzup: did you try the new mce?09:19
humpelstilzchen[Speaking of proximity sensor, looks like it is not configured on maemo, known todo item?09:56
siceloIn Leste? Device?10:34
humpelstilzchen[pinephone10:35
Wizzupfreemangordon: let me check, I tried the one with double press fixes and the race fix and it works fine11:12
Wizzuphumpelstilzchen[: not sure if that is known wrt proximity11:13
Wizzupfreemangordon: and yes, it was indeed showing a note11:27
Wizzupuvos: yeah pp keyboard is an always-attached one11:28
uvosWizzup: right13:01
uvosWizzup: needs support in mce, the assumption there is that if there is no keyboard switch, there is no keyboard13:01
uvosreally it should check if there is a kbd13:01
freemangordonuvos: I tried to implement something like that back then and kind of failed: How do you check if there is a kbd?13:46
freemangordondo you assume that if you have 'qwerty' then you have a kbd?13:46
freemangordonwhat if it is 'явертъ'? or, do we have a list of scan codes that define kbd as kbd?13:47
uvosthe kernel itself13:47
uvoshas a list of scancodes it considers a keyboard13:47
freemangordondoes it?13:47
uvosthat is almost all <25513:47
uvosfreemangordon: yes13:48
uvosfreemangordon: but only for internal use13:48
uvosfreemangordon: its for the kernel console13:48
uvosi would do the same thing13:48
uvosacutally mce allready dose the same thing13:48
uvosits just not used in this way13:48
freemangordonas I said - I was about to do the same/similar thing, but at the end I thought it would be too hacky for may taste13:48
uvosright13:49
uvosbut mce allready dose this13:49
uvosfor the keyboard catigory13:49
freemangordondoes it? where?13:49
freemangordonmaybe I did it after all and forgot :)13:49
uvosno, i did13:50
Wizzupuvos: we mostly need to check how the kernel i2c implementation reports keyboard attached or not13:50
uvosWizzup: why13:50
uvosWizzup: its an evdev device no?13:50
Wizzupyes but if it does not report removal we have a problem13:50
freemangordonbecasue this is deviice specific module I would say13:50
WizzupI think re-recv used to set the keyboard attached property, but maybe that changed13:51
Wizzup(in gconf)13:51
freemangordonit does13:51
freemangordoniirc13:51
uvossortof13:51
uvosso ke-recv also reports on the keyboard switch13:51
Wizzupyes13:51
Wizzupthere is attached and slider state13:51
uvosso dose mce, mce also uses its information internally13:51
uvosanyhow13:52
freemangordonhmm...13:52
uvosits redundant implementation is what im saying13:52
freemangordonwhy shall we treat this keyboard diffferently then a BT keyboard?13:52
uvoswhy would we?13:52
freemangordonuvos: in mce, right?13:52
freemangordonbecause it was not there initially13:53
uvosit was13:53
uvosmce used to use a whitelist13:53
uvosto determine what is the keyboard13:53
uvosand uses the keyboard switch interally for lots of stull13:53
uvos*stuff13:53
freemangordoncan we have device specific package?13:53
uvoswe dont need it13:53
uvos"why shall we treat this keyboard diffferently then a BT keyboard?"13:54
uvoswe would not13:54
uvosthe problem right now13:54
freemangordonok13:54
uvosis that mce on a device without a keyboard swich13:54
uvoswill report the keyboard as closed at all times13:54
uvosthis the vkb will show13:54
uvosand mce will change its behavior13:54
uvosfalsely13:54
uvossame problem with ke-recv and its interface13:54
uvosaltho i would recommend deprecating that13:55
uvossince its on gconf and redundant13:55
uvoshttps://github.com/maemo-leste/mce/blob/db0f5d0bb7671182f35bfa4728462ba2890c6fd0/src/utils/event-input.h#L5213:55
uvosthats the whitelist13:55
uvoshttps://github.com/maemo-leste/mce/blob/db0f5d0bb7671182f35bfa4728462ba2890c6fd0/src/utils/event-input.h#L16913:56
freemangordonuvos: that's why we need device specific package - to know which device has internal kbd and slider and to behave accordingly13:56
uvosthats the match rule i added13:56
uvosnote that these are keycodes13:56
uvosnot keysymbs13:56
uvosthis means that KEY_Q is not nesscarly a Q13:56
uvosdepending on layout13:56
freemangordonyeah, sure13:56
freemangordonso, if a device have any of those it is a kbd?13:57
uvosfreemangordon: no we dont13:57
uvos@ device specific package13:57
uvosthe device has a silder if it has a event device that advertises the slider key13:57
uvosand it has a keyboard if it has a device that maches that rule13:58
freemangordonI would love if we don;t need, but don;t really see how we'll make it run properly otherwise13:58
uvoswe dont13:58
freemangordonah, it is again that libinput migration, no?13:58
uvoswel libinput dose this allready13:58
uvosbut you could do the same thing with this code too13:58
uvospoint is that kernel gives all the information needed13:58
freemangordonok13:58
freemangordonI need to look in the code to grok what you;re saying I guess13:59
freemangordonuvos: so, basically the idea is: we enum all the input devices and, if a device have KEY_Q (or some of the others), then it is a kbd, if a device advertises slider then it is a slider etc, correct?14:01
uvosnot quite14:01
uvosbut yes14:02
uvosexcept you throw all devices into one pool14:02
freemangordonand combine the caps?14:02
WizzupDoes that mean we need to keep many devices open?14:02
freemangordonI think we do it either ways14:02
uvosif across all devices we have a qwerty layout we have a keyboard14:02
uvoswe do14:02
uvosand kernel dose internaly anyhow14:02
uvos(for keyboards)14:02
uvos(any device matched as (part of) a keyboard will be kept open indefinatly by the kernel in all cases)14:03
uvosfor sysrq and fbcon14:03
freemangordonok, so if we close the slider and have BT kbd attached, then pressing on an input field will bring vkb up, no?14:03
uvosyeah, i gues we could count caps14:04
uvosso if we have every qwery key twice14:04
uvoswe assume only one is hidden14:04
freemangordonuhuh, this is even more hacky, but yeah, might work :)14:05
freemangordonI think I already implemented something like that in hulda14:05
freemangordon(ke-recv)14:05
freemangordonoh, hulda is not in ke-recv?!?14:08
freemangordonwhere was that?14:08
Wizzupthere is ke-recv-extra14:08
freemangordonyeah14:08
freemangordonyeah, this :) https://github.com/maemo-leste/ke-recv-extra/commit/e10952c191a159cbea8b9c4059251a29ee814e6814:09
uvosregarding the pp keyboard and monitoring its detachment14:09
freemangordonuvos: see ^^^14:09
uvosif deaching it dosent remove the evdev interface14:09
uvosits just broken14:09
uvoshacking around that in mce is not sane14:09
uvosfix the kernel14:10
freemangordonagree14:10
freemangordonuvos: so, I am looking for KEY_ENTER and KEY_ESC to decide this is a kbd14:10
uvoswell phone kbds rarely have esc14:11
uvosalso i dont want to match specifc devices at all14:11
uvosa keyboard might be implemented across several devices14:11
uvos(as is sorta the case on d4)14:11
uvosi rather do what the kernel dose14:11
freemangordonok, but see the commit description14:11
freemangordonbasically the same what you said14:12
uvosright14:12
uvosyeah14:12
uvosthat part yes14:12
tmlindfreemangordon: for the gnss MPDTIME, in theory kernel should provide ktime_get_clocktai()14:12
tmlindin practise i did not get it to work and it's the same as ktime_get_rtc()14:12
tmlindsorry i mean ktime_get_real()14:13
tmlindnot sure if anything needs to be done for userspace, i guess we'll find out when we have the faster gnss fix working14:14
freemangordontmlind: honestly, I know none of those 2 functions, the point is that libtime supports "operator time", which can be set by  a daemon. so, my point was - if you are going to somehow get some GPS time and provide it to userspace, please consider libtime :)14:15
tmlindfreemangordon: ok not planning to do that right now14:15
uvosbesides the gps driver would just provide a rtc interface no?14:16
freemangordonI think we will have issues if kernel sets the time behind our back, but that might be just me not knowing how it works14:16
uvosit would just provide another rtc14:16
uvoshow that affects system time is userspaces problem14:16
freemangordonuvos: who is going to read that? and how we know which one is correct?14:16
uvossome deamon we write :P14:16
freemangordonlike - a person with 2 watches never knows the time :)14:16
tmlindyeah we could implement a serdev ppt device when gnss fix is available14:16
freemangordonuvos: exactly ;)14:17
freemangordonso, please consider libtime when we writing the daemon :p14:17
tmlindsorry ptp device14:17
freemangordonwhoever 'we' is14:17
freemangordonotherwise all the alarms and stuff will simply stop work14:18
uvosright point is the kernel never sets the time behind our back14:18
freemangordongreat14:18
tmlindwell a ptp device can be configured as an input for chrony14:18
freemangordonwe already have clockd14:18
freemangordonno need doe yet another daemon14:18
freemangordon*for yet14:18
tmlindno need to do anything as ntp takes care of things for us14:19
uvoswell considering if we need clockd is ofc on the table to14:19
freemangordonsure we do14:19
uvosnot really14:19
freemangordonwe don;t have the resources to rewrite half of the systems14:19
freemangordonwell, maybe in some other distro there is no need14:19
tmlindwell chrony is already configured and running for ntp, right?14:19
uvosno14:20
freemangordonI have to check what clockd does in case ntp sets the time14:20
tmlindoh right, did we used to have chrony by default?14:20
uvosno i dont think so14:21
tmlindkind of remember ntp causing some pm issues a few years ago14:21
uvosthere is a script that updates time from ntp14:21
uvoson wifi conecct14:21
uvosor something silly like that14:21
uvosit rarely works for me14:21
tmlindheh ok14:21
uvosntpd causes pm issues yes14:21
tmlindi think chrony got those fixed, busybox ntpd never had issues with pm14:22
Wizzupyes, it runs on network connection (which does not seem silly to me), but it requires dns to work and doesn't work on v614:22
tmlindthe operator time can be off by hours easily depending on the operator14:22
freemangordonyet another reason we shall think a bit before removing maemo daemons in favor of upstream one14:22
freemangordontmlind: how's that?14:23
Wizzupit's not a maemo daemon but yeah14:23
freemangordonWizzup: in principle tha is14:23
freemangordonall maemo stuff was done with battery in mind14:23
tmlindfreemangordon: have you not travelled with the automatic operator time configured for the phone and noticed how it's often totally off by some random time?14:23
uvosthis is true14:23
Wizzupalso ntp is complicated if you want to actually protect against attacks14:23
freemangordonI have always had that disabled14:24
WizzupI don't think we use operator provided ntp servers14:24
uvosi have seen operators lag several minutes14:24
freemangordonbecause it was working with none of the operators here for me :)14:24
r3bootDont know if its viable for maemo, but chrony is a lot better then plain ntpd when it comes to ACLs14:24
freemangordonI would rather teach clock14:25
freemangordon*clockd14:25
freemangordonto use more sources than needed14:25
freemangordon*if needed14:25
tmlindyeah so the ideal situation would be some lightweight ntp server configured in a pm friendly way and clockd just uses kernel time. then any additional time sources can be configured for the ntp server as needed14:25
freemangordontmlind: https://github.com/maemo-leste/clockd/blob/master/clockd/rclockd.c#L5814:26
Wizzuptmlind: there are other ways to get time, through https for example, to attempt to prevent against some attacks14:27
freemangordonwhat I don;t understand is: how we knoe14:27
freemangordon*know which rtc is the correct one if we have more than one?14:27
Wizzupthere is also gps14:28
Wizzupwell I guess were talking about that :)14:28
freemangordonyeah14:28
uvosyou just need enogh rtcs/time sources then they can vote xD14:28
freemangordonso, if we have /dev/rtc and /dev/rtc1, how do we know which one is the correct one?14:28
Wizzuphttp://phk.freebsd.dk/time/20151129/14:28
freemangordonuvos: :D14:28
freemangordonyou needs at least 314:29
humpelstilzchen[shouldn't /dev/rtc just be a symlink?14:29
freemangordonstill14:29
freemangordonwe have omap rtc14:29
freemangordonand if gps interface provides yet another rtc14:29
freemangordonwhich one shall we prefer?14:29
tmlindno, a ptp device14:29
tmlindsee drivers/ptp14:30
tmlindand we don't have a driver for that yet14:30
freemangordonok14:30
freemangordonanyway, work mtg, ttyl14:30
tmlindbut seems like it should be easy to do with unknown jitter with the serial port commands :)14:30
tmlindas i think we only get the time every second14:30
tmlindso to me it seems timed can just use ktime_get_real() with chrony configured and that's all we need14:31
tmlindseems like timed just needs to update the rtc as needed for alarms etc with hwclock command14:33
tmlindactually timed needs to use the timex.h api, ktime_get_real() is a kernel interface..14:34
uvosWizzup: parazyd: looks like irc.txt has been broken again since yesterday]16:33
Wizzupu  will try to fix it during parazyds absence17:08
Wizzupuvos:17:08
konauvos: not sure if you saw, i dug through the pinephone kbd schematic, there's no sensor for the hinge.17:58
konabut a lot of things could be done in i2c-inputd or from discussion last night, maybe the prox sensor to detect if kbd is both present and open, and there's a separate button on the kbd that can detect long press, short press, double press, and not pressed, distinct from the phone power button.17:59
uvoskona: yeah i sa18:02
uvosw18:02
uvosi gues its not so important for us to know if the keyboard is open since its a clamshell18:03
uvoswould have been good to lock on close or something, but thats ok18:03
uvosuseing the proximitry sensor for that is not acceptable18:04
uvosthe device would lock or whaetver just from the user holding it wrong18:04
uvoswe are not apple18:04
konamaybe keyboard_installed && prox_sensor_go_brr ?18:05
konait's prohibitively awkward to hold the phone to one's ear with kbd installed.18:06
uvosno, even then accidentaly locking the deivce by covering the sensor is easy18:06
konacould also be an option in settings / screen lock.18:06
konagiven how often my android prox sensor tricks in low lighting conditions, i agree.18:06
konas/ick/ip/18:07
Wizzupuvos: should be back18:42
uvoslorem ipsum dolor sit amet18:51
uvosWizzup: nope18:51
Wizzuphmm18:52
sicelonowadays my droid 4 is always guaranteed to not connect to wifi on first try19:32
freemangordonsicelo: same here19:33
uvosits deff buggy19:38
uvosmakeing it loose conection by walking away often hangs the kernel19:38
uvosunfortionatly no output19:38
sicelothis is before even connecting, so i haven't 'lost' connection by then19:49
uvossortof19:50
uvosthe conection fails to happen once19:50
uvosand then the kernel module is in a bad state19:50
uvosi have this happen and then i cant connect untill i reprobe the module19:50
uvossometimes it hangs19:50
uvosetc19:50
uvosits porbubly just one bug19:51
Wizzupsicelo: always on first try? hmmmm20:19
inkynot sure what i am saying is helpful, but i was running openntpd (from openbsd project) on nokia devices. i don't know if it interfers with calls though because i don't make or receive 'calls'.23:40
Wizzupopenntpd kills battery in my experience23:53

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