![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,730
Karma: 103020299
Join Date: Apr 2011
Device: pb360
|
Turning off charging for long term USB power
I'm preparing to jb my KOA2 and began by looking over the mountable drive contents. I hadn't looked inside in a long time (Turns out I hadn't made the update preventor directory yet, so it's good I checked.
Anyway, there turned out to be a file .fuse_hidden0000020c00000001 which I thought might have been put there by my laptop, but it has a 2017-10-13 time stamp, weeks before KOA2 release. Turns out it is a shell script. Code:
#!/bin/bash while true; do CAPACITY=$(cat /sys/class/power_supply/max77796-battery/capacity) if [ $CAPACITY -gt 70 ]; then echo 0 > /sys/class/power_supply/max77796-charger/charging elif [ $CAPACITY -lt 65 ]; then echo 1 > /sys/class/power_supply/max77796-charger/charging fi sleep 30 done Maybe I'm the only one that cares, but this looks like a good way to have a Kindle max out at 50% or so when on a charger long term. Update: Code:
echo 0 > /sys/class/power_supply/max77796-charger/charging Last edited by j.p.s; 03-03-2018 at 05:38 PM. Reason: update |
![]() |
![]() |
![]() |
#2 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
You haven't jail broken the device yet, so you can't see the entire system tree.
Code:
/ |-- bin |-- dev | |-- block | |-- char | |-- disk | |-- fd -> /proc/self/fd | |-- i2c | |-- input | |-- loop | |-- misc | |-- net | |-- pts | |-- shm | |-- snd | |-- vc | `-- vcc |-- etc | |-- audio | |-- crontab | |-- dbus-1 | |-- default | |-- fonts | |-- gtk-2.0 | |-- init -> /etc/upstart | |-- init.d | |-- kdb -> /etc/kdb.src/yoshi | |-- kdb.src | |-- network | |-- pango | |-- ppp | |-- profile.d | |-- rc0.d | |-- rc1.d | |-- rc2.d | |-- rc3.d | |-- rc4.d | |-- rc5.d | |-- rc6.d | |-- rc.d | |-- rcS.d | |-- resolv.d | |-- ssl | |-- sysconfig | |-- syslog-ng | |-- sysv | |-- todo | |-- udev | |-- uks | |-- upstart | |-- X11 | |-- xdg | `-- xorg |-- lib | |-- firmware | |-- modules | `-- udev |-- mnt | |-- base-mmc | |-- base-us | |-- mmc | |-- rwfs | |-- us | `-- wfm |-- opt | |-- amazon | |-- ar6k | |-- config | |-- factory | |-- var | `-- wan |-- proc | |-- 1 | |-- 10 | |-- 11 | |-- 12 | |-- 1205 | |-- 1223 | |-- 1225 | |-- 1226 | |-- 1227 | |-- 1229 | |-- 1231 | |-- 1232 | |-- 1236 | |-- 125 | |-- 1250 | |-- 1277 | |-- 129 | |-- 1295 | |-- 1299 | |-- 13 | |-- 1305 | |-- 1308 | |-- 131 | |-- 1313 | |-- 1333 | |-- 134 | |-- 1397 | |-- 14 | |-- 1456 | |-- 1482 | |-- 1492 | |-- 1493 | |-- 15 | |-- 154 | |-- 1584 | |-- 1586 | |-- 16 | |-- 1615 | |-- 1618 | |-- 1675 | |-- 1676 | |-- 178 | |-- 19 | |-- 19665 | |-- 19696 | |-- 19704 | |-- 19765 | |-- 19781 | |-- 19788 | |-- 2 | |-- 2071 | |-- 2072 | |-- 256 | |-- 259 | |-- 260 | |-- 261 | |-- 2619 | |-- 262 | |-- 263 | |-- 27082 | |-- 27083 | |-- 2944 | |-- 3 | |-- 396 | |-- 397 | |-- 4 | |-- 403 | |-- 405 | |-- 448 | |-- 456 | |-- 458 | |-- 459 | |-- 463 | |-- 4748 | |-- 5 | |-- 5090 | |-- 549 | |-- 560 | |-- 6 | |-- 6308 | |-- 6309 | |-- 6315 | |-- 642 | |-- 647 | |-- 662 | |-- 670 | |-- 678 | |-- 686 | |-- 694 | |-- 7 | |-- 702 | |-- 769 | |-- 8 | |-- 9 | |-- 9449 | |-- 970 | |-- 978 | |-- asound | |-- bd | |-- bootglobals | |-- bus | |-- cpu | |-- driver | |-- fs | |-- irq | |-- net -> self/net | |-- sdma | |-- self -> 6315 | |-- sys | |-- sysvipc | |-- tty | |-- wan | `-- wf |-- sbin |-- sys | |-- block | |-- bus | |-- class | |-- dev | |-- devices | |-- firmware | |-- fs | |-- kernel | |-- module | `-- power |-- tmp -> /var/tmp |-- usr | |-- bin | |-- java | |-- lib | |-- libexec | |-- local | |-- sbin | |-- share | `-- ssl `-- var |-- backups |-- cache |-- lib |-- local |-- lock |-- log |-- run `-- tmp 215 directories This is the topmost visible level of USB storage. If the Kindle system allowed you to access anything above /mnt/us/ or along side of it, there would be no need to jail break the device. Note: I had to add the .bin extension to tree to keep the attachment manager happy. It didn't hurt it and can be removed if desired. This version of tree will run on any touch screen Kindle. Last edited by knc1; 02-17-2018 at 08:34 PM. |
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,730
Karma: 103020299
Join Date: Apr 2011
Device: pb360
|
The Voyage is JB.
I'm just reporting that the KOA2 has something leftover from the factory, possibly the FUSE equivalent of an NFS temporary file that is a shell script. It looks to me that charging can be turned off by a user even if the battery isn't fully charged. |
![]() |
![]() |
![]() |
#4 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
That might have been put on the device by the factory-only, production line, Q.A. firmware build that you installed in order to jail break it. The name is misleading. There is a FUSE system on the device, it is the fuse layer on top of /mnt/us that actually gets exported to USB driver. But as long as it is running (or anything is running on /mnt/us) the export over USB can not be made. Which might be part of its reason for being. The way you wrote your post made it read as if you made the discovery while preparing to jail break it, not after you did. And yes, the Kindle system is capable of NFS (both client and server). You can find threads here on the subject. The Kindles can also do a network boot from NFS in the initramfs system (before flash gets mounted). Ah, it also does NBD You can find some posts here where people played with swap over NBD (which really isn't very stable - that arrangement is subject to a deadlock) OH, and also CIFS (Windows networking). You can find posts/threads here on that also. This is how you learn what filesystems the kernel is built to support: Code:
[root@kindle us]# cat /proc/filesystems nodev sysfs nodev rootfs nodev bdev nodev proc nodev debugfs nodev sockfs nodev pipefs nodev anon_inodefs nodev tmpfs nodev inotifyfs nodev devpts ext3 ext2 ext4 cramfs squashfs nodev ramfs vfat msdos nodev unionfs nodev nfs nodev nfs4 nodev mqueue nodev rpc_pipefs nodev fuse fuseblk nodev fusectl Hmm... I don't see CIFS on that list - Oh well, I will not worry about it - this is just a quick example. Last edited by knc1; 02-17-2018 at 09:04 PM. |
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,730
Karma: 103020299
Join Date: Apr 2011
Device: pb360
|
Quote:
I wrote the post that way because that is exactly what happened. |
|
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,730
Karma: 103020299
Join Date: Apr 2011
Device: pb360
|
The presumably lab126 written script in post #1 above will keep the KOA2 battery charge between 65% and 70%. I had hoped that
Code:
echo 0 > /sys/class/power_supply/max77796-charger/charging I have not found a way to do anything similar on the Voyage. |
![]() |
![]() |
![]() |
#7 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Why not just unplug it?
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,730
Karma: 103020299
Join Date: Apr 2011
Device: pb360
|
The convenience of just leaving it plugged in
Long ssh sessions Making battery drain measurements without having to unplug and replug Not having to deal with wifi battery drain Haven't got around to setting up wifi yet Ability to set max charge < 100% Just because |
![]() |
![]() |
![]() |
#9 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
(plus, how many users know how to even check the battery status while plugged in - not even you know that, see: #3) 2) Running ssh sets a "wake lock" in the kernel internals, it is locked awake. The battery of a Kindle only gives a 2 to 3 hour run-time on a single charge. You might consider that a "long" ssh session, but others consider a "long" ssh session measuring in weeks. 3) There is a command for that purpose, does not require plug/un-plug. Keep looking, you will find it. ![]() 4) You would rather let the Wifi run down the battery? That does not sound like the best alternative. 5) Why would that make a difference? The system is still locked awake while using ssh. 6) The battery management system in a Kindle isn't sophisticated enough to do the same sort of management you can expect on an electric car with a $10,000 battery. (And a correspondingly sophisticated battery management system). 7) There is a fool born every minute. So you have to consider that some of those are readers of this site when posting here. (1806 January, The European Magazine And London Review, Essay on False Genius, Page 26, Vol. XLIX, James Asperne, London.) Last edited by knc1; 03-04-2018 at 08:38 AM. |
|
![]() |
![]() |
![]() |
Tags |
battery drain, charging |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle DX long-term storage: how to? | milivella | Amazon Kindle | 7 | 12-03-2015 04:02 PM |
Which format is best for long-term storage? | klmmc13 | General Discussions | 145 | 08-20-2014 03:41 AM |
Lowest long term costs | jbcohen | Which one should I buy? | 5 | 08-01-2013 10:36 AM |
Question about Charging via USB and Turning off screen (Pocket eDGe) | user452 | enTourage Archive | 4 | 12-16-2010 02:15 PM |
What to do with your old Kindle, long term? | carld | Amazon Kindle | 4 | 09-05-2010 07:34 PM |