IRC log of #maemo for Monday, 2017-08-07

*** florian has joined #maemo00:01
*** florian has joined #maemo00:01
*** xy2_ has quit IRC00:02
*** herekun has quit IRC00:13
*** ollieparanoid[m] has joined #maemo00:16
*** chfoo[m] has joined #maemo00:16
*** florian has quit IRC00:19
*** xy2_ has joined #maemo00:22
*** Vajb has joined #maemo00:23
*** xorly has quit IRC01:07
*** Pali has quit IRC01:16
*** xy2_ has quit IRC01:33
*** atk has quit IRC03:00
*** atk has joined #maemo03:00
*** dos1 has quit IRC03:07
*** dos1 has joined #maemo03:14
*** dos1 has quit IRC03:16
*** dos1 has joined #maemo03:19
Vajbis it possible to make n900 lock the screen when i close hwkbd?03:21
*** dos1 has quit IRC03:23
*** dos1 has joined #maemo03:29
OksanaDoes it send a dbus signal when hwkbd is being closed?03:34
Vajbnot sure, but it must send something since device wakes up when kbd is opened...03:37
Vajbi think i saw entries in syslog about hwkbd activated and deactivated03:38
Vajbslide open, slide closed actually...03:39
Vajband actually n900 actually locks the screen if it is locked when i open kbd and close it, without touching screen03:41
Vajbfrom syslog "slide (GPIO 71) is now open"03:50
Vajb"slide (GPIO 71) is now closed"03:52
OksanaYes, dbus-monitor --system reports platform_slide events too04:08
Vajbso i would need a script which trickers lock command when it sees slide closed, i guess04:09
Vajbno idea how to make one tho...04:10
MaxdamantusYou can always just poll the gpio node in sysfs.04:11
OksanaI suggest the dbus because there is dbus-scripts-settings in maemo repositories.04:12
MaxdamantusCan just open the right /sys/devices/platform/gpio-switch/*/state file, read it, poll it for POLLPRI, repeat04:14
* Maxdamantus is guessing that would be simpler than anything involving dbus.04:15
* Oksana nods, but thinks that it would be nice to have something event-based, instead of polling the state every second or something04:18
* Oksana goes to read start-up scripts in /etc/something.d/ ; do they detect slide as event?04:19
OksanaInit scripts are an interesting field04:22
MaxdamantusWhen I say "poll", I mean poll(2)04:36
MaxdamantusThe operation that waits for an event on a set of fds.04:36
Vajbdbus-script-settings has just keyboard slide option. Or should it be taken care on command "lock if unlocked and unlock if locked"04:38
Oksanafds? Waiting for an event sounds nice04:40
Maxdamantusfile descriptors04:42
MaxdamantusIf you're using Python, it seems like it should be simple enough using the `select` module thing.04:43
Maxdamantussomething like: f = open("/sys/..", "r"); while True: state =; poll = select.poll(); poll.register(f, select.POLLPRI); poll.poll();;04:45
MaxdamantusSo you just detect when `state` changes from "open\n" to "closed\n" or whatever.04:46
MaxdamantusActually, don't need to create a `poll` object each iteration. Just register it outside of the loop then keep doing `state =; poll.poll();`04:49
MaxdamantusPython seems to have a decent IO library.04:50
* Maxdamantus wishes it were also a decent language.04:50
Vajbu lost me04:56
MaxdamantusWhat I'm saying is, you should be able to write something as simple as this: f = open("/sys/..", "r"); poll = select.poll(); poll.register(f, select.POLLPRI); while True: state =; print(state); poll.poll();;05:00
Maxdamantuswhich should print the state of the GPIO each time it's updated.05:00
OksanaDoes poll.poll(); means wait-till-an-event-happens?05:00
MaxdamantusDon't need dbus or anything fancy.05:00
MaxdamantusOksana: yes, so the process is doing nothing until that event occurs.05:01
OksanaSounds short and simple. Is it doable in C?05:01
Maxdamantusbut at work atm, so not going to produce example C code. man 2 poll05:02
OksanaAnd the program will be idling in background all the time, but at least not using any resources/CPU...05:02
OksanaWhat is already idling in the background and sending these dbus signals about slider being opened and closed?05:03
* Maxdamantus has a small C program that does something similar to skip songs in mpd when the shutter button is pressed.05:03
Vajbhmm i see. So i would c translator05:09
Vajbi'll see what i manage when i get back home05:09
*** Mr_Pingu has quit IRC05:13
DocScrutinizer05what the heck are you talking about? dbus-scripting doesn't need polling05:29
OksanaDifferent things. dbus-scripts is one solution to detect keyboard-slide being closed, while polling is another (python example above, but just as doable in C).05:30
DocScrutinizer05btw maemo,org cert invalid. search a total fail05:38
DocScrutinizer05nevermind the second05:39
DocScrutinizer05for locking screen just replace the aplay line in my playswoosh script by the according dbus call from phonecontrol05:40
DocScrutinizer05err play-sound05:40
DocScrutinizer05also you want to change "$slide == open"  to "$slide == closed"05:42
DocScrutinizer05or follow my original instructions as of >>for the screen locking on closing kbd slider you may want to add the "else" lines from above<<05:43
DocScrutinizer05Oksana: dbus-monitor (and dbus-scripting) do wait for events. If they use poll() or another equivalent function for it I don't know and doesn't matter05:47
DocScrutinizer05I suspect I'm missing parts of the convo, didn't see how init scripts came in, nor any polling script05:55
OksanaQuestion is, do dbus-scripts add an additional overhead, compared against a lower-level (?) polling of device state?05:57
DocScrutinizer05you do not want to do any polling! that eats battery like mad. Poll() and select() have nothing to do with polling. You also can't use poll() in this context05:59
DocScrutinizer05and no, dbus-scripting doesn't add any overhead05:59
DocScrutinizer05see slide=$(cat sys/devices/platform/gpio-switch/slide/state); in my script, poll() on sysnodes doesn't work usually06:01
DocScrutinizer05it's non-blocking06:01
DocScrutinizer05thus you can't use poll()06:01
DocScrutinizer05polling would be   while sleep 1; do slide=$(cat sys/devices/platform/gpio-switch/slide/state); done;06:02
*** luke-jr has quit IRC06:02
*** luke-jr has joined #maemo06:03
DocScrutinizer05since that's BAD(TM), my script waits for activation by dbus-scripting and then reads out state of slider since stupid dbus messages don't tell the state of a "swirch", only the fact that it changed06:03
*** sleepee has joined #maemo06:05
DocScrutinizer05btw also inotify() doesn't work on sysnodes since their content gets dynamically created on on read()06:12
DocScrutinizer05s/on on/only on/06:13
DocScrutinizer05that's also the reason why they are usually non-blocking read() and thus can't make use of poll()06:13
Vajbthx DocScrutinizer05, i'll try ur play-sound script after i get some sleep.06:23
*** dos1 has quit IRC06:32
*** Kabouik_ has quit IRC06:38
*** dos1 has joined #maemo06:45
*** jon_y has quit IRC08:03
Maxdamantus15:01:13 < DocScrutinizer05> see slide=$(cat sys/devices/platform/gpio-switch/slide/state); in my script, poll() on sysnodes doesn't work usually08:18
MaxdamantusIt specifically does for GPIO "state" nodes with POLLPRI08:18
MaxdamantusSee Documentation/gpio/sysfs.txt .. it's the normal behaviour on Linux.08:20
*** spiiroin has joined #maemo08:22
Maxdamantusalso to clarify, I never intended "polling" as in `for(;;){ sleep(1); check(); }`08:26
MaxdamantusI was specifically referring to `poll(2)`08:26
*** TheKit has quit IRC08:43
*** joga_ is now known as joga08:49
*** joga has quit IRC08:50
*** joga has joined #maemo08:50
*** dafox has joined #maemo09:01
*** esaym153 has quit IRC09:10
*** sleepee has quit IRC09:15
*** esaym153 has joined #maemo09:18
*** lfc22 has joined #maemo09:30
*** dafox has quit IRC09:30
*** lfc22 has quit IRC09:31
*** MetalGearSolid has joined #maemo09:36
*** MetalGearSolid has quit IRC09:45
*** MetalGearSolid has joined #maemo09:46
*** valdyn has quit IRC09:47
*** dmth|intevation has joined #maemo09:50
*** MetalGearSolid has quit IRC09:52
*** jon_y has joined #maemo09:54
*** xorly has joined #maemo09:56
*** geaaru has joined #maemo10:00
MaxdamantusThe code I wrote works as-is btw10:02
* Maxdamantus just copied it into the repl10:02
*** TriztAway is now known as Trizt10:07
*** NeKit has joined #maemo10:09
*** azkay has joined #maemo10:28
*** Smily has joined #maemo10:39
*** RzR has joined #maemo10:55
*** jskarvad has joined #maemo11:01
*** jskarvad has quit IRC11:01
*** jskarvad has joined #maemo11:01
*** xy2_ has joined #maemo11:13
*** eMHa__ has quit IRC11:39
*** Sicelo009N has joined #maemo11:53
*** jskarvad has quit IRC11:54
*** jskarvad has joined #maemo12:02
*** jskarvad has quit IRC12:02
*** jskarvad has joined #maemo12:02
*** xy2_ has quit IRC12:10
*** eMHa__ has joined #maemo12:15
*** Sicelo009 has joined #maemo12:17
*** Sicelo009N has quit IRC12:18
*** xy2_ has joined #maemo12:18
*** azkay has quit IRC12:19
*** Sicelo009 has quit IRC12:25
*** xy2_ has quit IRC12:29
*** xy2_ has joined #maemo12:36
*** xy2_ has quit IRC12:40
*** xy2_ has joined #maemo12:58
*** TheKit has joined #maemo13:14
*** NeKit has quit IRC13:17
*** xorly has quit IRC13:25
sixwheeledbeast^Locking screen on keyboard state closed would drive me mad.13:47
enyc->  SSL certificate error fail expired today!13:47
enycCan we have  IPv6-enabled on server and SSL letsencrypt or something that autorenews ????13:48
enycI can help [...]13:48
enycnot sure who looks after servers13:48
*** jskarvad has quit IRC13:50
*** florian has joined #maemo14:15
*** azkay has joined #maemo14:21
*** florian has quit IRC14:23
*** florian has joined #maemo14:24
sixwheeledbeast^Certs are to be renewed.
sixwheeledbeast^I would imagine it will be mentioned on Tuesday's meeting if it hasn't happened.14:30
*** Mr_Pingu has joined #maemo14:39
enycok but outdate atlready ran-out ??14:49
enycwarfare: meow! =)14:49
*** azkay has quit IRC14:59
*** florian has quit IRC14:59
enychrrm expried a wek ago actually15:00
*** heroux has quit IRC15:02
*** heroux has joined #maemo15:02
*** jskarvad has joined #maemo15:04
*** jskarvad has quit IRC15:04
*** jskarvad has joined #maemo15:04
*** spiiroin has quit IRC15:06
*** azkay has joined #maemo15:10
*** frals has quit IRC15:11
*** frals has joined #maemo15:11
*** frals has joined #maemo15:11
*** xy2_ has quit IRC15:20
*** azkay has quit IRC15:30
*** xorly has joined #maemo15:52
*** sunshavi has quit IRC15:56
*** sunshavi has joined #maemo16:06
*** jskarvad has quit IRC16:10
*** jskarvad has joined #maemo16:19
*** jskarvad has quit IRC16:19
*** jskarvad has joined #maemo16:19
*** dmth|intevation has quit IRC16:33
*** dmth|intevation has joined #maemo16:36
*** Vajb has quit IRC17:13
*** Vajb has joined #maemo17:24
*** spiiroin has joined #maemo17:50
*** xy2_ has joined #maemo17:52
*** dmth|intevation has quit IRC17:53
*** err0r3o3 has quit IRC18:06
*** mp107 has joined #maemo18:11
*** chainsawbike has quit IRC18:39
*** xy2_ has quit IRC18:49
*** jskarvad has quit IRC18:51
*** jskarvad has joined #maemo18:53
*** Pali has joined #maemo18:55
*** xy2_ has joined #maemo18:56
*** mp107 has quit IRC19:06
*** valdyn has joined #maemo19:14
*** dafox has joined #maemo19:14
*** jasuarez_off has joined #maemo19:30
*** jasuarez_off has quit IRC19:33
*** jasuarez_off has joined #maemo19:37
*** xy2_ has quit IRC19:42
*** jasuarez_off has quit IRC19:42
DocScrutinizer05LE is a PITA19:43
*** jasuarez_off has joined #maemo19:44
DocScrutinizer05juiceme: could you get a 2 xear wildcard cert and get the expense refunded by MCeV?19:44
*** jasuarez_off has quit IRC19:48
*** dafox has quit IRC19:49
*** jrayhawk_ is now known as jrayhawkj19:50
*** jrayhawkj is now known as jrayhawk19:50
*** jasuarez_off has joined #maemo19:51
*** xy2_ has joined #maemo19:55
*** eMHa__ has quit IRC20:00
*** geaaru has quit IRC20:14
*** jasuarez_off has quit IRC20:19
*** spiiroin has quit IRC20:23
*** eMHa__ has joined #maemo20:25
*** chainsawbike has joined #maemo20:26
*** spiiroin has joined #maemo20:35
*** jskarvad has quit IRC21:20
*** xy2_ has quit IRC21:20
*** xy2_ has joined #maemo21:52
*** xy2_ has quit IRC22:11
freemangordonHi there :)22:35
*** pagurus` has joined #maemo22:44
*** xy2_ has joined #maemo22:45
*** pagurus has quit IRC22:46
*** l_bratch has quit IRC23:50
*** l_bratch has joined #maemo23:50

Generated by 2.15.1 by Marius Gedminas - find it at!