Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2018, 07:21 PM   #1
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
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
The Voyage doesn't have a /sys/class/power_supply/max77796-charger directory and on the Voyage /sys/class/power_supply/max77696-charger directory doesn't have a charging entry.

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
turns off charging and the kindle starts running on battery power instead of USB power.

Last edited by j.p.s; 03-03-2018 at 05:38 PM. Reason: update
j.p.s is offline   Reply With Quote
Old 02-17-2018, 08:11 PM   #2
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
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
/mnt/us/... <<-- You can only see this branch of the entire file system tree over USB.
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.
Attached Files
File Type: bin tree.bin (53.2 KB, 135 views)

Last edited by knc1; 02-17-2018 at 08:34 PM.
knc1 is offline   Reply With Quote
Old 02-17-2018, 08:24 PM   #3
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
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.
j.p.s is offline   Reply With Quote
Old 02-17-2018, 08:40 PM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by j.p.s View Post
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.
That might not have been shipped with the device.
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
That is from 5.3.7.3, so of course, 5.9.something may be different.
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.
knc1 is offline   Reply With Quote
Old 02-17-2018, 10:59 PM   #5
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by knc1 View Post
That might not have been shipped with the device.
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.
That is not possible in this particular case because I still had not copied the factory image at the time I made the post.

Quote:
Originally Posted by knc1 View Post
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.
I wrote the post that way because that is exactly what happened.
j.p.s is offline   Reply With Quote
Old 03-03-2018, 05:33 PM   #6
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
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
would turn charging off but continue to supply power to run the kindle. Unfortunately, the kindle begins running off the battery.

I have not found a way to do anything similar on the Voyage.
j.p.s is offline   Reply With Quote
Old 03-03-2018, 07:44 PM   #7
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Why not just unplug it?
knc1 is offline   Reply With Quote
Old 03-03-2018, 08:59 PM   #8
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by knc1 View Post
Why not just unplug it?
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
j.p.s is offline   Reply With Quote
Old 03-04-2018, 08:31 AM   #9
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by j.p.s View Post
1) The convenience of just leaving it plugged in

2) Long ssh sessions

3) Making battery drain measurements without having to unplug and replug

4) Not having to deal with wifi battery drain

5) Haven't got around to setting up wifi yet

6) Ability to set max charge < 100%

7) Just because
1) Disabling battery management, so that the user has to manage the battery charging while plugged in, does not sound very convent to me.
(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.
knc1 is offline   Reply With Quote
Reply

Tags
battery drain, charging


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 05:56 PM.


MobileRead.com is a privately owned, operated and funded community.