Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-29-2010, 07:33 PM   #1
thatsme
Junior Member
thatsme began at the beginning.
 
Posts: 2
Karma: 14
Join Date: Dec 2010
Device: none
Bypassing the screensaver entirely on suspend

Here is how to disable the Kindle screensaver entirely, and very easily; assuming usbnetworking anyway. (But obviously, if you brick your kindle attempting this, it's not my fault...!)

Background: I was looking for a way to disable the Kindle screensaver, so that it would still go through the two phases of t1_timeout and t2_timeout, with keys being locked after t1, and kindle actually going to suspend after t2.

This is different from just increasing t1_timeout, because I *want* my Kindle keys to be locked if I put the thing into my bag without pressing the power button. And I do not want to see an actual screensaver, neither built-in nor my own images. It's an E-ink display, so it should be able to keep showing the current page of the book I'm reading... forever, right?

(I tried the ;debugOn and `disablescreensaver people keep mentioning, but the 2.5 firmware on my k2i doesn't seem to understand it.)

Anyway, the instructions:

powerd sends the dbus event "goingToScreenSaver" after t1, and "suspending" after t2. The actual screen saver nonsense then happens somewhere on the Java side in the screensaver booklet probably, which I didn't want to mess with.

Solution: Take a hex editor and edit the /usr/bin/powerd binary directly. Change "goingToScreenSaver" and "suspending" to something bogus, like "goingToScreenSaXXX" and "suspendXXX" (obviously keeping the length). Restart using /etc/init.d/powerd. (And for testing purposes, don't forget to disconnect, because kindle wouldn't actually suspend anyway while attached to USB.)

So, problem solved: after t1_timeout, the kindle screen just stays unchanged. The user power button touch brings it back to life, still without an apparent change on the screen. Bliss!

[Okay, admittedly it would be a tad cooler still if there was a *little* indication that the thing is locked, e.g. by changing the little bar at the bottom. Anyone willing to try and actively observe the dbus event to run, say, eips?]

BTW, if you change only "goingToScreenSaver" (but not "suspending"), the behaviour is weird for me: It doesn't show the screensaver, but the suspending step then blanks the screen. Not what I was after, but also interesting.

Oh, and I didn't observe battery use to see if it is actually still suspending. But I've checked /var/log/messages, and it looks like a real suspend to me. The only change is that the booklet doesn't know what's going on until after resume, at which point it notices that it's not running yet and gives up.

EDIT:

Update for Kindle Paperwhite, Firmware 5.3.1: Still works almost as described. The goingToScreenSaver event is unchanged. Note that the suspending event has been renamed though. Look for :suspend: in the binary and change it to :suspxxx: for example.

Last edited by thatsme; 06-29-2013 at 05:43 AM.
thatsme is offline   Reply With Quote
Old 12-30-2010, 01:26 AM   #2
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Interesting idea! I'd like the screen to stay the same as it is when I lock it too.

Just wondering though, how am I supposed to change the /usr/bin/powerd file? I have a hex editor and what not, but the file is locked because it's in use or something.

My K3G is jailbroken, with usbnetwork setup for WiFi SSH
kranu is offline   Reply With Quote
 
Enthusiast
Old 12-30-2010, 07:26 AM   #3
thatsme
Junior Member
thatsme began at the beginning.
 
Posts: 2
Karma: 14
Join Date: Dec 2010
Device: none
You don't state an exact error message, so it's hard to say what went wrong. I'm guessing that either the root fs wasn't mounted rw, or you tried to edit the file in place instead of replacing it, and the daemon was still running at that point. Personally, I'd replace the file atomically from a copy.

Code:
# mntroot rw
# /etc/init.d/powerd stop

# cd /mnt/us
/mnt/us# cp /usr/bin/powerd powerd-backup # just to be safe
/mnt/us# cp /usr/bin/powerd powerd-modified
# edit powerd-modified

/mnt/us# mv powerd-modified /usr/bin/powerd #replaces the file atomically, even if the daemon were still running
# /etc/init.d/powerd start
# mntroot ro
[edited for various typos]

Last edited by thatsme; 12-30-2010 at 11:10 AM.
thatsme is offline   Reply With Quote
Old 12-30-2010, 10:45 AM   #4
Royski
Junior Member
Royski began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2010
Device: Kindle DX (US only)
Fantastic work - this might be enough motivation for me to get usbnetworking going.
Royski is offline   Reply With Quote
Old 12-30-2010, 05:49 PM   #5
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by thatsme View Post
You don't state an exact error message, so it's hard to say what went wrong. I'm guessing that either the root fs wasn't mounted rw, or you tried to edit the file in place instead of replacing it, and the daemon was still running at that point. Personally, I'd replace the file atomically from a copy.

Code:
# mntroot rw
# /etc/init.d/powerd stop

# cd /mnt/us
/mnt/us# cp /usr/bin/powerd powerd-backup # just to be safe
/mnt/us# cp /usr/bin/powerd powerd-modified
# edit powerd-modified

/mnt/us# mv powerd-modified /usr/bin/powerd #replaces the file atomically, even if the daemon were still running
# /etc/init.d/powerd start
# mntroot ro
[edited for various typos]
I was simply trying to copy a modified version over with WinSCP. I didn't know you had to stop/start it with /etc/init.d/powerd stop/start.
kranu is offline   Reply With Quote
Old 04-25-2011, 08:50 AM   #6
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,635
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
I edited the file and used command /etc/init.d/powerd start, however not worked properly.(nothing changed) I first copied the file to pc then edited with notepad++ and replaced using winSCP.
Attached Thumbnails
Click image for larger version

Name:	screensaver.png
Views:	94
Size:	5.2 KB
ID:	70477   Click image for larger version

Name:	suspendxxx.png
Views:	85
Size:	6.6 KB
ID:	70478  

Last edited by thomass; 04-25-2011 at 09:22 AM.
thomass is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iRex Iliad was not designed for Suspend/Hibernate CommanderROR iRex 52 05-29-2011 09:50 AM
Remapping of Enter to suspend the reader iamphet Sony Reader Dev Corner 4 10-17-2008 10:39 AM
So no sleep or suspend? How about RESUME? Asterra iRex 1 12-28-2007 01:55 PM
iLiad Bypassing iDS rudysplif iRex Developer's Corner 6 12-10-2007 11:01 PM
iLiad Reason for suspend problem bitz iRex Developer's Corner 0 10-01-2007 06:41 PM


All times are GMT -4. The time now is 01:42 PM.


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