**** BEGIN LOGGING AT Sat Jul 29 03:00:01 2017 Jul 29 03:01:45 it's a total brainfuck to allow any peripheral to do DMA under own control Jul 29 03:02:36 yeah, especially considering most ARM CPUs post-CortexA9 _do_ have an IOMMU Jul 29 03:02:50 [2017-07-27 Thu 16:13:50] https://blog.exodusintel.com/2017/07/26/broadpwn/ a few lessons to learn: *) firmware blobs to upload are better than ROM or flash in wifi *) PCIe or any other interface that allows DMA control by peripheral is EVIL Jul 29 04:37:34 ~flashing Jul 29 04:37:34 somebody said maemo-flashing was http://wiki.maemo.org/Updating_the_tablet_firmware, or - on linux PC - download&extract http://maemo.cloud-7.de/maemo5/patches_n_tools/maemo-my-private-workdir.tgz, cd into it, do sudo ./flash-it-all.sh; or see ~flashing-cmdline, or see ~lazyflashing Jul 29 04:44:54 ~lazyflashing Jul 29 04:44:54 methinks lazyflashing is http://wiki.maemo.org/Updating_the_tablet_firmware#The_Lazy_Approach Jul 29 23:07:19 Anyone know how to get the power management to not show my fully charged battery as depleted via http://talk.maemo.org/showthread.php?t=96573? Jul 29 23:07:32 The system shutsdown if I unplug the power Jul 29 23:09:53 got this in the logs Jul 29 23:10:02 [ 22.991455] bq27xxx-battery 2-0055: battery is not calibrated! ignoring capacity values Jul 29 23:34:31 Does it instantly go dead? Jul 29 23:48:44 ShadowJK yea it instantly shuts down in the Kali OS despite it being 100% charged Jul 29 23:49:18 I guess I can do some normal battery calibration as if it was a laptop but was hoping it would just instinctively work Jul 29 23:49:37 or if there was something I can do on my end without doing standard calibrations Jul 29 23:56:27 I'm not quite sure how it all works in Kali etc Jul 29 23:56:47 In general a orderly shutdown commanded by the OS isn't instant Jul 29 23:56:54 Running out of actual power tends to be quite instant Jul 30 00:09:55 Well as soon as the graphical interface loads it shutsdown if not connected to power Jul 30 00:10:09 It just doesn't read thed actual batteries legitimate charge Jul 30 00:12:52 Alright, that does sound like a problem with the OS not recognizing the charge level of the battery properly. Jul 30 00:13:50 Im toying with the power manager but might just try a different one Jul 30 01:04:47 this is bullshit anyway, shutdown *allways* by voltage, not estimated available charge Jul 30 01:05:52 power manager?? Jul 30 01:12:23 oooh THAT power manager. Yes it's designed for laptops with decent accurate battery capacity gauge. For N900 you must not use the estimated available capacity for system shutdown, it's not reliable enough Jul 30 01:13:50 FalconSpy: ^^^ Jul 30 01:16:47 DocScrutinizer05 so what do I use to deal with battery management Jul 30 01:17:05 I was using the built in Kali xfce4-power-manager Jul 30 01:17:16 I'm seeing things like gapcmon (apcupsd) Jul 30 01:18:56 no idea Jul 30 01:19:10 never looked into kali linux Jul 30 01:19:53 doesnt have to be kali specific Jul 30 01:19:53 first of all try to change percentage level for shutdown from 10% or whatever to 0% Jul 30 01:20:35 please rephrase your question Jul 30 01:22:02 battery management is done by kernel (and mainly by hardware) via bq24150 module Jul 30 01:22:21 so you don't do anything about it Jul 30 01:22:43 My question I guess is how can I get the battery manager to show an accurate charge Jul 30 01:23:42 ~bq27k-detail Jul 30 01:23:42 i heard bq27k-detail is http://maemo.cloud-7.de/maemo5/usr/local/sbin/bq27k-detail2, or ~bq27 Jul 30 01:24:31 ~listvalues calibrate Jul 30 01:24:33 Factoid search of 'calibrate' by value (8): tslib-xfbdev ;; calibratebq27200 ;; discovers that scribble pad ;; xcalibrate ;; xcalibrate source ;; oink ;; bq-calibrate ;; jargon speedometer. Jul 30 01:24:45 ~calibratebq27200 Jul 30 01:24:45 well, calibratebq27200 is http://acehack.de/~kerio/calibratebq27200 Jul 30 01:24:54 FUH! Jul 30 01:25:01 ^ dead link Jul 30 01:25:08 thank god Jul 30 01:25:29 ~listvalues calibrate Jul 30 01:25:30 Factoid search of 'calibrate' by value (8): jargon speedometer ;; bq-calibrate ;; tslib-xfbdev ;; calibratebq27200 ;; xcalibrate ;; oink ;; discovers that scribble pad ;; xcalibrate source. Jul 30 01:25:38 ~calibrate Jul 30 01:25:44 damn! Jul 30 01:25:54 ~bq-calibrate Jul 30 01:25:55 bq-calibrate is, like, http://maemo.cloud-7.de/maemo5/patches_n_tools/calibrate-bq27k.sh, or http://talk.maemo.org/showthread.php?p=1247595 Jul 30 01:26:33 ~forget calibratebq27200 Jul 30 01:26:33 DocScrutinizer05: i forgot calibratebq27200 Jul 30 01:27:51 note that calibrate-bq27k.sh only works via I2V with bq27200.sj in same dir Jul 30 01:28:40 and won't work with kernel module taking care about batery management, since that needs other methods to stop charging Jul 30 01:30:45 you *might* get away with replacing my "stop vme" by a "modprobe -r bq24150" or whatever the name, see lsmod. And "start bme" by a "modprobe bq24150" Jul 30 01:31:02 s/vme/bme/ Jul 30 01:31:03 DocScrutinizer05 meant: you *might* get away with replacing my "stop bme" by a "modprobe -r bq24150" or whatever the name, see lsmod. And "start bme" by a "modprobe bq24150" Jul 30 01:31:27 http://http//maemo.org/packages/view/i2c-tools/ is a dead link Jul 30 01:31:41 o.O Jul 30 01:31:43 or should this be ran inside maemo? Jul 30 01:32:00 cause kali can't find i2c tools or any of those tools Jul 30 01:32:19 no, should be an installable package from err tools or maemo.extras(-devel) Jul 30 01:32:39 Maemo's battery manager works fine Jul 30 01:32:44 Its the Kali one that's having issues Jul 30 01:32:50 so? Jul 30 01:33:08 So is what you gave me going to help resolve the Kali one? Jul 30 01:33:09 sorry I won't provide a calibration script for kali linux Jul 30 01:33:25 no worries Jul 30 01:33:35 you will either have to adapt it by yourself, or run calibration under maemo Jul 30 01:35:10 generally the whole tricj is to fully charge the battery, then discharge it until EVF voltage (some 3.24V iirc) Jul 30 01:35:53 redo until total capacity (LMD) doesn't change anymore Jul 30 01:38:42 there's also possibly still a bug in nq27xx.ko kernel module. It _never_ should report a calculated value for "design capacity", this is a constant that should be 1340mAh Jul 30 01:38:58 bq27xx.ko Jul 30 01:40:08 generally your power manager must not check available capacity from bq27xx but VOLTAGE for deciding when to shut down Jul 30 01:40:57 so probably best is to not run such power manager at all Jul 30 01:43:21 the kernel itself will do a brute force shutdown (though with trying to correctly flush and umount storage) when battery err system voltage reaches shutdown limit which iirc is 3.0V for OMAP/TWL4030 Jul 30 01:46:03 it *might* be possible that bq24150.ko or bq27xx.ko also take care about shutdown, I don't know for sure Jul 30 01:46:39 if that's the case, try modprobe -r bq27xx Jul 30 01:46:55 get a fixed module Jul 30 01:48:32 you might want to provide `modibfo bq27xx.sh` and ask Pali about details of operation of that module Jul 30 01:48:42 modinfo* Jul 30 01:49:26 it *should* not mess with system shutdown on its own, I guess Jul 30 01:50:35 s/EVF/EDV0/ Jul 30 01:52:27 nfc where from you got that garbled link, this works: http://maemo.org/packages/view/i2c-tools/ Jul 30 01:53:48 hint: should also run under arbitrary other linux systems on N900 Jul 30 01:54:43 get http://repository.maemo.org/extras-testing/pool/fremantle/free/i/i2c-tools/i2c-tools_3.0.2-1maemo3_armel.deb and install locally on your kali linux Jul 30 01:55:22 FalconSpy: ^^^ Jul 30 01:55:55 my scripts should be mostly OS-afnostic anyway Jul 30 01:56:37 credits where credit due: bq27200.sh is by ShadowJK Jul 30 01:59:08 so if i run your calibration through maemo it should hopefully show the correct charge % in kali? Jul 30 01:59:20 Your tool won't work since it is looking for armhf Jul 30 02:01:59 yes Jul 30 02:03:16 there's a CI (capacity incorrect) bit in that bat gauge chip that gets reset by calibration. I guess that's first culprit for your problems (after power manager doing the fundamentally wrong thing, to start with) Jul 30 02:04:05 my tool looks for armhf? nope Jul 30 02:04:11 i2ctools might Jul 30 02:04:44 https://pastebin.com/cN7N6TZ5 is the upower dump Jul 30 02:05:18 no idea, what's that? Jul 30 02:05:47 Tool that gives I guess the information about all sources of power Jul 30 02:06:01 obviously it's defect then Jul 30 02:06:16 I can't help fix defect kali linux tools Jul 30 02:10:50 and please find a better pastebin, this one doesn't allow zooming the way too small text font Jul 30 02:16:45 anyway that stuff is non-coherent: /org/freedesktop/UPower/devices/battery_bq27200_0 tells a bogus "energy-full: 7.91478 Wh" (should be 3.x Wh) and "capacity: 100%" (full) at "voltage: 3.788 V" which isn't bad but for sure not full Jul 30 02:18:40 "state: discharging" while /org/freedesktop/UPower/devices/battery_bq24150a_0 says "state: charging" -- not even the most braindead power manager should shut down device when it's charging Jul 30 02:21:18 /org/freedesktop/UPower/devices/line_power_isp1704 says "online: no" so not charging Jul 30 02:21:38 and /org/freedesktop/UPower/devices/battery_rx51_battery is pretty much completely confused Jul 30 02:23:00 also I'd think /org/freedesktop/UPower/devices/battery_rx51_battery would be mutually exclusive with /org/freedesktop/UPower/devices/battery_bq27200_0 in a few aspects, they both use same source of info, or at least should. For sure they report about same battery Jul 30 02:24:47 that stuff evidently is pretty much messed up in kali linux, sorry **** ENDING LOGGING AT Sun Jul 30 03:00:01 2017