Fix sleeping and add stop script#12
Conversation
Xatter
left a comment
There was a problem hiding this comment.
These look like really useful updates to lower the power utilization so maybe kindles can work on battery rather than being plugged in all the time.
Just seems to be missing a script otherwise looks good and when the script is checked in I'll test this on my Gen 7 PW
| if [ 1 -eq $DISABLE_WIFI ]; then | ||
| eips_debug "Disabling WiFi" | ||
| lipc-set-prop com.lab126.cmd wirelessEnable 0 | ||
| #lipc-set-prop com.lab126.wifid enable 0 |
There was a problem hiding this comment.
Delete commented code if not going to be readily used
There was a problem hiding this comment.
I don't really know if disabling wifid would be relevant here, there doesn't seem to be any information about it on kindlemodding.org. Maybe it would be interesting for power utilization, but it would require more testing.
This script will try to ping the given IP until it succeeds. We use it to be sure that the kindle is connected to internet before trying to get an image.
|
I forgot to add the script, here it is. I tried to run the code during the week-end on my kindle and the results were interesting:
|
| /etc/init.d/framework stop | ||
| initctl stop webreader >/dev/null 2>&1 | ||
| echo powersave >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | ||
| lipc-set-prop com.lab126.powerd preventScreenSaver 1 |
There was a problem hiding this comment.
I'm pretty sure frontlight problem comes from line 66, I have to check if it impacts the refresh if I remove it.
There was a problem hiding this comment.
I just checked this on my Gen7 PW and my light does not stay on, it does come on briefly when it refreshes but then turns off again so not sure. I might be able to come up with a way to have device specific code run though
There was a problem hiding this comment.
After retesting, I have the same behaviour. I will try to find something better, maybe we can refresh the screen without turning it on at all.
There was a problem hiding this comment.
Hey @Xatter
I do have a Gen7 PW too but I've been struggling for quite some time to have the TRMNL PNGs render
I only get a blank screen - using other PNGs seem to work but not the TRMNL API one :/
There was a problem hiding this comment.
@Ectalite did you find any solutions regrading the lights up ?
There was a problem hiding this comment.
Hi @sohel2020,
I think we should check into creating a native application, a bash script is nice as a proof of concept, but it has too many issues.
|
LGTM 👍 Works on my Gen7 PW and increases the battery life |
|
Nice to hear |
As said in issue #10, my kindle PW3 goes into deep sleep after circa 1min in sleep. Because of this, you have to use something other than just the sleep function.
After some reading on https://github.com/pascalw/kindle-dash and https://www.mobileread.com/forums/showthread.php?t=235821, I wrote a commit to fix it.
It works on my PW3 and should also work on a PW2.
I don't know how sleep is managed on more recent models.
I also included some power management functions that are called in the https://github.com/pascalw/kindle-dash project.