**** BEGIN LOGGING AT Mon May 01 03:00:01 2017 May 01 11:37:29 I have Devuan running on my n900 fine. Boot fast. No udev. Power button working. Screen going to sleep. Keyboard set up. Wifi. Ssh. May 01 11:37:53 I'd need some help with the following steps: May 01 11:38:14 1. How to check whether the battery is charging? If not, what is needed to do that? May 01 11:38:43 2. How to have the right switch working to wake up the screen? (I have scpi-support-base installed.) May 01 11:38:59 3. What is the present state of the art about desktop environments? May 01 11:46:21 My plan is to just modify dwm or i3 or something. May 01 11:46:40 (for the desktop environment) May 01 11:46:54 well, for a window manager at least, which should be sufficient. May 01 11:48:39 Enrico_Menotti: 1. see the bq27xx driver (probably located under /sys/class/power_supply), or the bq27*.sh script May 01 11:50:54 oh err, which kernel are you using btw? May 01 11:51:06 (and why no udev?) May 01 12:03:39 bencoh As discussed with parazyd , udev is not needed for hotplug. And it was creating problems at boot - a 30 seconds delay, with net.agent timing out due to the loopback lo no being mounted, which in turn is a consequence of the missing initrd (I boot directly to rootfs). Hope I don't miss here any step - many details, I don't remember exactly everything. May 01 12:04:16 I'm using mainline kernel with Pali's rx51_defconfig, modified to include the two watchdogs in the kernel and not as modules. May 01 12:05:30 Maxdamantus You talk about a "plan". I'd deduce there is no DE running yet. Am I right? May 01 12:05:54 I don't know. It's just a personal plan. May 01 12:07:59 Just because I'm not really interested in most of the things hildon seems to do, and I suspect I can just modify an existing tiling WM to do the things I would actually be interested in. May 01 12:09:22 (and the ones I mentioned would probably use a lot less memory than hildon) May 01 12:12:58 Maxdamantus Ok. Thanks. May 01 12:27:24 Enrico_Menotti: the kernel should manage the charging stuff by itself, but you can read the currnet state from /sys May 01 12:27:41 /sys/devices/platform/68000000.ocp/48072000.i2c/i2c-2/2-0055/power_supply/bq27200-0/ May 01 12:28:22 as for making specific keys wake up the screen/phone, do you suspend/hibernate-ram he phone, or just want X turned off? May 01 12:28:39 I am pretty sure the switch on the side is just an input device, so it should not be too hard to make it wake up May 01 12:28:54 I don't have my gentoo & devuan n900s next to me right now, but it should not be too hard to make that happen May 01 12:29:05 As for 3, hildon? :) May 01 12:31:05 in the normal maemo system it's a gpio called "slide" May 01 12:31:14 dunno how the names are assigned. May 01 12:32:34 I just usuall do tail -f /dev/input/event* and see which one activates May 01 12:32:52 Wizzup Thanks. I'm trying to read the battery state with the help of a couple of scripts suggested by DocScrutinizer05 . (If I'm able to get them work; they have a few dependences). May 01 12:33:00 also, for led fun - May 01 12:33:01 for i in $(ls /sys/devices/platform/68000000.ocp/48072000.i2c/i2c-2/2-0032/leds/lp5523:*/trigger /sys/devices/platform/68000000.ocp/48072000.i2c/i2c-2/2-0032/leds/lp5523:kb*/trigger) ; do echo timer > $i; done May 01 12:33:14 It's not handled by /dev/input/* May 01 12:33:20 it's just gpio. May 01 12:33:20 Enrico_Menotti: with the current setup, even normal battery monitors will pick it up May 01 12:33:24 Maxdamantus: mainline May 01 12:33:50 Enrico_Menotti: turned off wiht for i in $(ls /sys/devices/platform/68000000.ocp/48072000.i2c/i2c-2/2-0032/leds/lp5523:*/trigger /sys/devices/platform/68000000.ocp/48072000.i2c/i2c-2/2-0032/leds/lp5523:kb*/trigger) ; do echo none > $i; done May 01 12:33:56 Eh, so mainline has an input driver for the GPIO switches? May 01 12:34:02 Enrico_Menotti: e.g. 'batti' will work May 01 12:34:12 Maxdamantus: I would not be surprised, is this not the point of dts and such May 01 12:34:20 I don't think so. May 01 12:34:24 otherwise, if it is just gpio, it's also easy to open+select() the right gpio May 01 12:34:38 well, I am not in a position to check atm. May 01 12:34:38 Right, I think that's the standard way to interact with GPIO. May 01 12:35:10 many keyboards are also gpio, but they have drivers and are exposed not via gpio in sys May 01 12:35:21 I have a funny program I wrote that polls the status of the shutter GPIO. May 01 12:35:22 same for simple buttons on many arm dev boards May 01 12:35:48 the input layer is a perfect place for these things May 01 12:36:00 e.g. closing/opening a laptop will typically also trigger something in /dev/input/ May 01 12:36:29 That seems weird to me. May 01 12:36:48 * Maxdamantus might try it sometime with his laptop. May 01 12:37:11 maybe there'd be something on the trackpad device to indicate that it's active/inactive, dunno. May 01 12:37:12 you can run evdev on all of htem May 01 12:37:16 it will print all the keys they expose May 01 12:37:24 evtest* May 01 12:37:59 Input device name: "Lid Switch" May 01 12:38:13 Event: time 1493642283.711271, type 5 (EV_SW), code 0 (SW_LID), value 1 May 01 12:38:13 Event: time 1493642283.711271, -------------- SYN_REPORT ------------ May 01 12:38:13 Event: time 1493642286.611207, type 5 (EV_SW), code 0 (SW_LID), value 0 May 01 12:38:13 Event: time 1493642286.611207, -------------- SYN_REPORT ------------ May 01 12:38:51 similarly, for mincrophone inserts: Event code 4 (SW_MICROPHONE_INSERT) state 0 May 01 12:42:03 would depend on DT I guess May 01 12:42:56 yes, all sensors should show up as /dev/*, in maemo however they usually are only in /sys May 01 12:43:26 anyway, https://gist.github.com/Maxdamantus/23783a33d9ec43e8be42632566e8d1f9 May 01 12:43:30 Who needs malloc? May 01 12:45:05 any unlike Vol+/- the cam trigger, lockswitch, slider, proxy and camdoor are not input devices May 01 12:45:35 no idea how that got inplemented in devuan aka mainline kernel May 01 14:43:58 About the slide key, there is a module called gpio_keys. I modprobed it. Now the slide key is alive, but it only produces a ^@ symbol on the screen. May 01 14:47:52 which might be okay actually May 01 14:51:43 Ok, so now how to handle that? May 01 14:52:50 gpiokeys are supposed to output events to /dev/input/event* May 01 14:53:37 a glance at /sys/class/input might tell you which one May 01 14:54:10 but X11 isn't supposed to read input form that device, I guess May 01 14:54:22 /dev/input/event* follow a simple read api May 01 14:54:31 (read() syscall I mean) May 01 14:54:36 DocScrutinizer05: sure it does May 01 14:54:41 it isa May 01 14:54:49 is* damnit May 01 14:55:23 err, well May 01 14:56:09 dunno how the switch button was implemented .... I suppose it's a simple press/release key May 01 14:56:33 (gpiokeys are basically that anyway ... press and release events with associated keycode) May 01 14:56:47 sure May 01 14:57:05 on maemo mce is responsible for it iirc May 01 14:57:07 anyway maemo doesn't show an event for lockswitch May 01 14:57:14 yes May 01 14:57:20 that's what I said May 01 14:58:19 and mce opens a file handle to whatever-that-gpioswitch directly instead of listening to X11 events May 01 14:58:50 The power button works just fine without modules, just installed acpi-support-base (Devuan). May 01 14:59:20 mce 824 root 10r REG 0,0 4096 4101 /sys/devices/platform/gpio-switch/kb_lock/state May 01 15:00:10 http://paste.ubuntu.com/24493079 May 01 15:01:42 it's questionable if you want a ^@ input event in X11 for lockswitch May 01 15:02:43 I guess it *could* get implemented that way, but feels somewhat... wrong May 01 15:04:06 at very least it should provide the correct keysym May 01 15:06:47 though don't ask me what's the name May 01 15:08:34 can't find something reasonable in http://wiki.linuxquestions.org/wiki/XF86_keyboard_symbols May 01 15:09:08 maybe XF86ScreenSaver May 01 15:13:25 anyway that's keysym, not scancode. First of all you'd need to make sure the lockswitch generates a unique scancode May 01 15:16:29 Enrico_Menotti: please run xev and pastebin the lockswitch event May 01 15:17:19 xev: command not found. Let me investigate. May 01 15:19:16 It's package x11-utils. A moment. May 01 15:22:21 freaking... WTF?! xev doesn't report events from N900 hw kbd (except for vol+/- aka F6/7(?)) when started via ssh May 01 15:23:58 whatever, busy. AFK, bbl May 01 15:24:11 xev: unable to open display '' May 01 15:24:24 ? May 01 15:24:50 no X11 environment and/or no $DISPLAY defined May 01 15:25:34 Yes, no X11 environment. So how to use that? May 01 15:25:39 IroN900:~# echo $DISPLAY May 01 15:25:41 :0.0 May 01 15:26:05 Ok, I'll try to define it. May 01 15:26:19 doesn't help if it doesn't exist May 01 15:26:45 In fact. May 01 15:27:37 bbl (maybe) May 01 15:28:25 http://paste.ubuntu.com/24493190 May 01 15:29:58 I just have event0 - 3. May 01 15:30:52 http://paste.ubuntu.com/24493197 May 01 16:09:06 sicelo: I guess I found the solution for irssi which you were looking for. https://talk.maemo.org/showpost.php?p=1527540&postcount=10 May 01 17:25:48 hi all :) I'm looking for bitcoin wallet for n900 May 01 17:55:55 https://talk.maemo.org/showthread.php?t=66756 May 01 18:56:30 merlin1991: halfux's solution worked, yay! https://garage.maemo.org/pipermail/extras-cauldron-builds/2017-May/156638.html May 01 18:57:27 Vajb: looks like perl irssi is coming to repos soon :) May 01 19:00:56 they ported irssi to 100% perl? May 01 19:01:50 lol May 01 21:08:49 DocScrutinizer05: ^@ is probably just some undisplayable character May 01 21:12:26 sounds like 0x00 May 01 21:17:02 compare less `which date` May 01 21:30:07 as such it's indeed "undisplayable" and gets represented in ^notation May 01 21:31:41 :o> May 01 21:32:26 shouldn't try to type a ctrl+q to get a ctrl+@ ;-P May 01 21:33:46 :D May 02 02:06:28 sicelo: cool. I bet then there'll be regular updates ;) **** ENDING LOGGING AT Tue May 02 03:00:01 2017