*** florian has joined #maemo | 00:01 | |
*** florian has joined #maemo | 00:01 | |
*** xy2_ has quit IRC | 00:02 | |
*** herekun has quit IRC | 00:13 | |
*** ollieparanoid[m] has joined #maemo | 00:16 | |
*** chfoo[m] has joined #maemo | 00:16 | |
*** florian has quit IRC | 00:19 | |
*** xy2_ has joined #maemo | 00:22 | |
*** Vajb has joined #maemo | 00:23 | |
*** xorly has quit IRC | 01:07 | |
*** Pali has quit IRC | 01:16 | |
*** xy2_ has quit IRC | 01:33 | |
*** atk has quit IRC | 03:00 | |
*** atk has joined #maemo | 03:00 | |
*** dos1 has quit IRC | 03:07 | |
*** dos1 has joined #maemo | 03:14 | |
*** dos1 has quit IRC | 03:16 | |
*** dos1 has joined #maemo | 03:19 | |
Vajb | is it possible to make n900 lock the screen when i close hwkbd? | 03:21 |
---|---|---|
*** dos1 has quit IRC | 03:23 | |
*** dos1 has joined #maemo | 03:29 | |
Oksana | Does it send a dbus signal when hwkbd is being closed? | 03:34 |
Vajb | not sure, but it must send something since device wakes up when kbd is opened... | 03:37 |
Vajb | i think i saw entries in syslog about hwkbd activated and deactivated | 03:38 |
Vajb | slide open, slide closed actually... | 03:39 |
Vajb | and actually n900 actually locks the screen if it is locked when i open kbd and close it, without touching screen | 03:41 |
Vajb | from syslog "slide (GPIO 71) is now open" | 03:50 |
Vajb | "slide (GPIO 71) is now closed" | 03:52 |
Oksana | Yes, dbus-monitor --system reports platform_slide events too | 04:08 |
Vajb | so i would need a script which trickers lock command when it sees slide closed, i guess | 04:09 |
Vajb | no idea how to make one tho... | 04:10 |
Maxdamantus | You can always just poll the gpio node in sysfs. | 04:11 |
Oksana | I suggest the dbus because there is dbus-scripts-settings in maemo repositories. | 04:12 |
Maxdamantus | Can just open the right /sys/devices/platform/gpio-switch/*/state file, read it, poll it for POLLPRI, repeat | 04: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 something | 04:18 | |
* Oksana goes to read start-up scripts in /etc/something.d/ ; do they detect slide as event? | 04:19 | |
Oksana | Init scripts are an interesting field | 04:22 |
Maxdamantus | When I say "poll", I mean poll(2) | 04:36 |
Maxdamantus | The operation that waits for an event on a set of fds. | 04:36 |
Vajb | dbus-script-settings has just keyboard slide option. Or should it be taken care on command "lock if unlocked and unlock if locked" | 04:38 |
Oksana | fds? Waiting for an event sounds nice | 04:40 |
Maxdamantus | file descriptors | 04:42 |
Maxdamantus | If you're using Python, it seems like it should be simple enough using the `select` module thing. | 04:43 |
Maxdamantus | something like: f = open("/sys/..", "r"); while True: state = f.read(); poll = select.poll(); poll.register(f, select.POLLPRI); poll.poll(); f.seek(0); | 04:45 |
Maxdamantus | So you just detect when `state` changes from "open\n" to "closed\n" or whatever. | 04:46 |
Maxdamantus | Actually, don't need to create a `poll` object each iteration. Just register it outside of the loop then keep doing `state = f.read(); poll.poll(); f.seek(0)` | 04:49 |
Maxdamantus | Python seems to have a decent IO library. | 04:50 |
* Maxdamantus wishes it were also a decent language. | 04:50 | |
Vajb | u lost me | 04:56 |
Maxdamantus | What 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 = f.read(); print(state); poll.poll(); f.seek(0); | 05:00 |
Maxdamantus | which should print the state of the GPIO each time it's updated. | 05:00 |
Oksana | Does poll.poll(); means wait-till-an-event-happens? | 05:00 |
Maxdamantus | Don't need dbus or anything fancy. | 05:00 |
Maxdamantus | Oksana: yes, so the process is doing nothing until that event occurs. | 05:01 |
Oksana | Sounds short and simple. Is it doable in C? | 05:01 |
Maxdamantus | Yes. | 05:01 |
Maxdamantus | but at work atm, so not going to produce example C code. man 2 poll | 05:02 |
Oksana | And the program will be idling in background all the time, but at least not using any resources/CPU... | 05:02 |
Maxdamantus | Indeed. | 05:02 |
Oksana | What 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 | |
Vajb | hmm i see. So i would c translator | 05:09 |
Vajb | i'll see what i manage when i get back home | 05:09 |
*** Mr_Pingu has quit IRC | 05:13 | |
DocScrutinizer05 | what the heck are you talking about? dbus-scripting doesn't need polling | 05:29 |
Oksana | Different 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 |
DocScrutinizer05 | http://talk.maemo.org/showthread.php?t=48504 | 05:34 |
DocScrutinizer05 | btw maemo,org cert invalid. talk.maemo.org search a total fail | 05:38 |
DocScrutinizer05 | nevermind the second | 05:39 |
DocScrutinizer05 | for locking screen just replace the aplay line in my playswoosh script by the according dbus call from phonecontrol | 05:40 |
DocScrutinizer05 | err play-sound | 05:40 |
DocScrutinizer05 | also you want to change "$slide == open" to "$slide == closed" | 05:42 |
DocScrutinizer05 | or 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 |
DocScrutinizer05 | Oksana: 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 matter | 05:47 |
DocScrutinizer05 | I suspect I'm missing parts of the convo, didn't see how init scripts came in, nor any polling script | 05:55 |
Oksana | Question is, do dbus-scripts add an additional overhead, compared against a lower-level (?) polling of device state? | 05:57 |
DocScrutinizer05 | you 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 context | 05:59 |
DocScrutinizer05 | and no, dbus-scripting doesn't add any overhead | 05:59 |
DocScrutinizer05 | see slide=$(cat sys/devices/platform/gpio-switch/slide/state); in my script, poll() on sysnodes doesn't work usually | 06:01 |
DocScrutinizer05 | it's non-blocking | 06:01 |
DocScrutinizer05 | thus you can't use poll() | 06:01 |
DocScrutinizer05 | polling would be while sleep 1; do slide=$(cat sys/devices/platform/gpio-switch/slide/state); done; | 06:02 |
*** luke-jr has quit IRC | 06:02 | |
*** luke-jr has joined #maemo | 06:03 | |
DocScrutinizer05 | since 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 changed | 06:03 |
*** sleepee has joined #maemo | 06:05 | |
DocScrutinizer05 | btw also inotify() doesn't work on sysnodes since their content gets dynamically created on on read() | 06:12 |
DocScrutinizer05 | s/on on/only on/ | 06:13 |
DocScrutinizer05 | that's also the reason why they are usually non-blocking read() and thus can't make use of poll() | 06:13 |
Vajb | thx DocScrutinizer05, i'll try ur play-sound script after i get some sleep. | 06:23 |
*** dos1 has quit IRC | 06:32 | |
*** Kabouik_ has quit IRC | 06:38 | |
*** dos1 has joined #maemo | 06:45 | |
*** jon_y has quit IRC | 08:03 | |
Maxdamantus | 15:01:13 < DocScrutinizer05> see slide=$(cat sys/devices/platform/gpio-switch/slide/state); in my script, poll() on sysnodes doesn't work usually | 08:18 |
Maxdamantus | It specifically does for GPIO "state" nodes with POLLPRI | 08:18 |
Maxdamantus | See Documentation/gpio/sysfs.txt .. it's the normal behaviour on Linux. | 08:20 |
*** spiiroin has joined #maemo | 08:22 | |
Maxdamantus | also to clarify, I never intended "polling" as in `for(;;){ sleep(1); check(); }` | 08:26 |
Maxdamantus | I was specifically referring to `poll(2)` | 08:26 |
*** TheKit has quit IRC | 08:43 | |
*** joga_ is now known as joga | 08:49 | |
*** joga has quit IRC | 08:50 | |
*** joga has joined #maemo | 08:50 | |
*** dafox has joined #maemo | 09:01 | |
*** esaym153 has quit IRC | 09:10 | |
*** sleepee has quit IRC | 09:15 | |
*** esaym153 has joined #maemo | 09:18 | |
*** lfc22 has joined #maemo | 09:30 | |
*** dafox has quit IRC | 09:30 | |
*** lfc22 has quit IRC | 09:31 | |
*** MetalGearSolid has joined #maemo | 09:36 | |
*** MetalGearSolid has quit IRC | 09:45 | |
*** MetalGearSolid has joined #maemo | 09:46 | |
*** valdyn has quit IRC | 09:47 | |
*** dmth|intevation has joined #maemo | 09:50 | |
*** MetalGearSolid has quit IRC | 09:52 | |
*** jon_y has joined #maemo | 09:54 | |
*** xorly has joined #maemo | 09:56 | |
*** geaaru has joined #maemo | 10:00 | |
Maxdamantus | The code I wrote works as-is btw | 10:02 |
* Maxdamantus just copied it into the repl | 10:02 | |
*** TriztAway is now known as Trizt | 10:07 | |
*** NeKit has joined #maemo | 10:09 | |
*** azkay has joined #maemo | 10:28 | |
*** Smily has joined #maemo | 10:39 | |
enyc | | 10:41 |
*** RzR has joined #maemo | 10:55 | |
*** jskarvad has joined #maemo | 11:01 | |
*** jskarvad has quit IRC | 11:01 | |
*** jskarvad has joined #maemo | 11:01 | |
*** xy2_ has joined #maemo | 11:13 | |
*** eMHa__ has quit IRC | 11:39 | |
*** Sicelo009N has joined #maemo | 11:53 | |
*** jskarvad has quit IRC | 11:54 | |
*** jskarvad has joined #maemo | 12:02 | |
*** jskarvad has quit IRC | 12:02 | |
*** jskarvad has joined #maemo | 12:02 | |
*** xy2_ has quit IRC | 12:10 | |
*** eMHa__ has joined #maemo | 12:15 | |
*** Sicelo009 has joined #maemo | 12:17 | |
*** Sicelo009N has quit IRC | 12:18 | |
*** xy2_ has joined #maemo | 12:18 | |
*** azkay has quit IRC | 12:19 | |
*** Sicelo009 has quit IRC | 12:25 | |
*** xy2_ has quit IRC | 12:29 | |
*** xy2_ has joined #maemo | 12:36 | |
*** xy2_ has quit IRC | 12:40 | |
*** xy2_ has joined #maemo | 12:58 | |
*** TheKit has joined #maemo | 13:14 | |
*** NeKit has quit IRC | 13:17 | |
*** xorly has quit IRC | 13:25 | |
sixwheeledbeast^ | Locking screen on keyboard state closed would drive me mad. | 13:47 |
enyc | -> talk.maemo.org SSL certificate error fail expired today! | 13:47 |
enyc | Can we have IPv6-enabled on server and SSL letsencrypt or something that autorenews ???? | 13:48 |
enyc | I can help [...] | 13:48 |
enyc | not sure who looks after servers | 13:48 |
*** jskarvad has quit IRC | 13:50 | |
*** florian has joined #maemo | 14:15 | |
*** azkay has joined #maemo | 14:21 | |
*** florian has quit IRC | 14:23 | |
*** florian has joined #maemo | 14:24 | |
sixwheeledbeast^ | Certs are to be renewed. http://mg.pov.lt/maemo-irclog/%23maemo.2017-07-28.log.html#t2017-07-28T10:59:38 | 14:29 |
sixwheeledbeast^ | I would imagine it will be mentioned on Tuesday's meeting if it hasn't happened. | 14:30 |
*** Mr_Pingu has joined #maemo | 14:39 | |
enyc | ok but outdate atlready ran-out ?? | 14:49 |
enyc | warfare: meow! =) | 14:49 |
*** azkay has quit IRC | 14:59 | |
*** florian has quit IRC | 14:59 | |
enyc | hrrm expried a wek ago actually | 15:00 |
*** heroux has quit IRC | 15:02 | |
*** heroux has joined #maemo | 15:02 | |
*** jskarvad has joined #maemo | 15:04 | |
*** jskarvad has quit IRC | 15:04 | |
*** jskarvad has joined #maemo | 15:04 | |
*** spiiroin has quit IRC | 15:06 | |
*** azkay has joined #maemo | 15:10 | |
*** frals has quit IRC | 15:11 | |
*** frals has joined #maemo | 15:11 | |
*** frals has joined #maemo | 15:11 | |
*** xy2_ has quit IRC | 15:20 | |
*** azkay has quit IRC | 15:30 | |
*** xorly has joined #maemo | 15:52 | |
*** sunshavi has quit IRC | 15:56 | |
*** sunshavi has joined #maemo | 16:06 | |
*** jskarvad has quit IRC | 16:10 | |
*** jskarvad has joined #maemo | 16:19 | |
*** jskarvad has quit IRC | 16:19 | |
*** jskarvad has joined #maemo | 16:19 | |
*** dmth|intevation has quit IRC | 16:33 | |
*** dmth|intevation has joined #maemo | 16:36 | |
*** Vajb has quit IRC | 17:13 | |
*** Vajb has joined #maemo | 17:24 | |
*** spiiroin has joined #maemo | 17:50 | |
*** xy2_ has joined #maemo | 17:52 | |
*** dmth|intevation has quit IRC | 17:53 | |
*** err0r3o3 has quit IRC | 18:06 | |
*** mp107 has joined #maemo | 18:11 | |
*** chainsawbike has quit IRC | 18:39 | |
*** xy2_ has quit IRC | 18:49 | |
*** jskarvad has quit IRC | 18:51 | |
*** jskarvad has joined #maemo | 18:53 | |
*** Pali has joined #maemo | 18:55 | |
*** xy2_ has joined #maemo | 18:56 | |
*** mp107 has quit IRC | 19:06 | |
*** valdyn has joined #maemo | 19:14 | |
*** dafox has joined #maemo | 19:14 | |
*** jasuarez_off has joined #maemo | 19:30 | |
*** jasuarez_off has quit IRC | 19:33 | |
*** jasuarez_off has joined #maemo | 19:37 | |
*** xy2_ has quit IRC | 19:42 | |
*** jasuarez_off has quit IRC | 19:42 | |
DocScrutinizer05 | LE is a PITA | 19:43 |
*** jasuarez_off has joined #maemo | 19:44 | |
DocScrutinizer05 | juiceme: could you get a 2 xear wildcard cert and get the expense refunded by MCeV? | 19:44 |
DocScrutinizer05 | pleeease! | 19:45 |
*** jasuarez_off has quit IRC | 19:48 | |
*** dafox has quit IRC | 19:49 | |
*** jrayhawk_ is now known as jrayhawkj | 19:50 | |
*** jrayhawkj is now known as jrayhawk | 19:50 | |
*** jasuarez_off has joined #maemo | 19:51 | |
*** xy2_ has joined #maemo | 19:55 | |
*** eMHa__ has quit IRC | 20:00 | |
*** geaaru has quit IRC | 20:14 | |
*** jasuarez_off has quit IRC | 20:19 | |
*** spiiroin has quit IRC | 20:23 | |
*** eMHa__ has joined #maemo | 20:25 | |
*** chainsawbike has joined #maemo | 20:26 | |
*** spiiroin has joined #maemo | 20:35 | |
*** jskarvad has quit IRC | 21:20 | |
*** xy2_ has quit IRC | 21:20 | |
*** xy2_ has joined #maemo | 21:52 | |
*** xy2_ has quit IRC | 22:11 | |
freemangordon | Hi there :) | 22:35 |
*** pagurus` has joined #maemo | 22:44 | |
*** xy2_ has joined #maemo | 22:45 | |
*** pagurus has quit IRC | 22:46 | |
TheKit | hi! | 23:09 |
*** l_bratch has quit IRC | 23:50 | |
*** l_bratch has joined #maemo | 23:50 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!