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 03-12-2016, 06:28 PM   #1
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
CPU Governor Menu (KUAL extension)

Since all devices are using (or can use) KUAL . . .
Since Lab126 has been including all of the cpu governors in the kernel build, like in forever . . .

A governor selection and report generation menu for the KUAL.
The report generated will be helpful in finding the cause of excessively short battery run-time.

Installation:
Un-zip the attached archive in the top level of visible USB storage.
It will create or re-use the /extensions directory -
It will create or re-use (since: v-1.1) its own sub-menu directory and populate it.

The CPU report generator requires the lua-base-penlight.zip archive from:
http://www.mobileread.com/forums/sho...d.php?t=272221
That archive is installed the same way an extension is, un-archive the contents to the visible root of USB storage.
It will create or re-use its own KUAL-system sub-tree.

v-1.3 change:
* Add device manufacturing code to report head section.
* Add permissions to each feature (r- read only, rw read/write (a control knob) )
* Annotate "time in state" with hh:mm:ss in human terms.
* Fix the missing time zone on the report date line.

v-1.2 change:
* Fix for idme differences on older firmware
* Hyphenate the model number field to make it more apparent
(Now known to work on 5.3.7.3 (K5) )

v-1.1 change:
KUAL -> CPU Control ->

Four new buttons:
  • CPU Report -- (new: v-1.1)
    The report's content is dynamic, just as the kernel's /sys info tree is dynamic.
    The report will appear on your Kindle as a 'Personal' document (select 'all items' to see it).
    Although the extension is '.txt' the content is '.html'.
  • ondemand - - the default governor used by the Kindles.
    (This setting will also be restored by a Kindle re-boot.)
  • powersave - - for those who want to extend their battery time and don't mind waiting a bit for the Kindle to respond
    (Really, you might want to touch 'next page' before you start reading the last paragraph of the current page. Just one touch, then wait, it will get around to it RSN, it isn't bricked.)
    Note: You may have to use external power to get KUAL to run - this setting is serious about being low speed/low power.
  • performance - - for those who just can't wait to get to the next page
    (and don't mind using their charger)

The i.MX6 cpu frequency driver in the 3.0.x kernel does not have anywhere near the features of the Intel/AMD driver but it does make a difference in performance and power consumption.

Should work on **any** model Kindle that includes Lua in the Amazon firmware, **any** version firmware with the exception of the DX(F).
(At least that is my intention in using the system key database.)

Repository:
https://github.com/janetizzy/KUAL-buttons
Attached Files
File Type: zip gov-set-1.3.zip (5.3 KB, 54 views)

Last edited by knc1; 04-01-2016 at 03:48 PM.
knc1 is offline   Reply With Quote
Old 03-16-2016, 12:41 PM   #2
rogerinnyc
Zealot
rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.rogerinnyc is that somebody.
 
Posts: 122
Karma: 45678
Join Date: Apr 2009
Device: Kobo Auro H2O; Kindle Voyage; Galaxy Note 4
Thanks for this extension. FWIW, I tried powersave on my Voyage with 5.7.3 and, in addition to being really, really slow, it did eventually freeze and spontaneously reboot. So I can't say it's practical for my purposes. If there is any way of doing a slightly less aggressive powersave I'd be happy to test.
rogerinnyc is offline   Reply With Quote
 
Advertisement
Old 03-16-2016, 12:51 PM   #3
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by rogerinnyc View Post
Thanks for this extension. FWIW, I tried powersave on my Voyage with 5.7.3 and, in addition to being really, really slow, it did eventually freeze and spontaneously reboot. So I can't say it's practical for my purposes. If there is any way of doing a slightly less aggressive powersave I'd be happy to test.
Thanks for the feedback.

I don't have a KV to test with -
But I'll add another button that will dump out the choices on a KV-5.7.3 firmware.
They may be different.
Give me 24 hours - I'll bump this thread when I update the button set.

My PW-3 has been in 'powersave' mode since I posted the menu button.
It has not "frozen" (at least not yet).
(and it seems to be using about 2% battery per day (50 days between charges? Too soon to say.)
knc1 is offline   Reply With Quote
Old 03-28-2016, 07:34 PM   #4
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
24 hours my a..

Oh, well, 16 days was more like it.

The CPU controls report has been added to the v-1.1 set of buttons.
See first post of this thread.

Now the user (and our developers here) have something to study, and hopefully learn more about the 'short battery run-time' problem.

= = = =

Yes Virginia, KUAL has no problems running a Lua script rather than a shell script.

= = = =

Edit: 1
Report fails on 5.3.7.3 (K5) due to a change in the 'idme' function.
Will be fixed in v-1.2 (like, RSN).

Last edited by knc1; 03-30-2016 at 08:35 AM.
knc1 is offline   Reply With Quote
Old 03-30-2016, 03:14 PM   #5
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
Posted v-1.2, which fixes the problem with older versions of the idme command.

Just un-zip in the USB visible root, it will create or re-use/overwrite as required any prior gov-set buttons.

Now known to work on 5.3.x and 5.6.x - should also work on 5.4.x, 5.5.x and 5.7.x (but does no harm if it fails).
knc1 is offline   Reply With Quote
Old 03-30-2016, 03:35 PM   #6
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by rogerinnyc View Post
Thanks for this extension. FWIW, I tried powersave on my Voyage with 5.7.3 and, in addition to being really, really slow, it did eventually freeze and spontaneously reboot. So I can't say it's practical for my purposes. If there is any way of doing a slightly less aggressive powersave I'd be happy to test.
If you would please install the current version, which includes a report on the cpu controls, and run that report . . . .

Then attach the report to a post here, where we can read it . . . .
(You can read the report yourself, on the Kindle, it shows up as a 'personal' document.)

It might be possible to find out why your 5.7.x got worse than the (bad) 5.6.y
knc1 is offline   Reply With Quote
Old 04-01-2016, 03:50 PM   #7
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
Version 1.3 posted in top post attachments.
knc1 is offline   Reply With Quote
Old 04-01-2016, 10:03 PM   #8
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by rogerinnyc View Post
Thanks for this extension. FWIW, I tried powersave on my Voyage with 5.7.3 and, in addition to being really, really slow, it did eventually freeze and spontaneously reboot. So I can't say it's practical for my purposes. If there is any way of doing a slightly less aggressive powersave I'd be happy to test.
It looks like it is possible, it might even be practical.

Points:
*) Both the i.MX50 and the i.MX6 that I have seen so far provide two cpu clock speeds, a high and a low.
*) The two hardware/kernel version combinations I have seen so far use the 'standard' Linux cpu frequency governors.
*) Both combinations have a working 'userspace' governor.

The 'standard' cpu frequency governors use control algorithms for controlling 'general purpose' computer systems.
I.E: No outside knowledge of the 'jobs' that the system will be running.
BUT...
These are special purpose devices, they are e-book readers.
We KNOW what the job(s) and job-mix is - to open a book and display a page - then wait (forever in terms of a 1Ghz cpu) to turn the next page.

Currently, there is no direct connection between user interaction and cpu speed (that is: cpu power consumption).
But we could change that -

Say, in general, monitor for user interaction events, in those cases, immediately switch to 'high speed' -
As soon as that event action completes, immediately switch to 'low speed' -
Any other 'jobs' the cpu has to do are just internal supporting tasks, they can all run at the 'low speed' while the person is reading the page, or drop into 'suspend' in the usual manner.

The cpu takes 61035 clock cycles to switch speeds -
I.E: It can switch speeds before the user can lift their finger from the touch screen -
the user should never notice that the device had been running at low speed (or even suspended) in-between touches of the screen.

BUT
I would really like to see more "cpu reports" from other device/firmware combinations before I even consider designing a user space controller for the Kindles.
That is not something to tackle in an information vacuum.

Last edited by knc1; 04-01-2016 at 10:07 PM.
knc1 is offline   Reply With Quote
Old 04-02-2016, 11:42 AM   #9
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
@Phooey ...
The 'time in state' conversion to hh:mm:ss figures are off by an order of magnitude.
(The original units are 1/100 of a second, not 1/1000)

Which at the moment does not matter, since we are only interested in the High speed:Low speed ratio of the original values.

Fixed in git and will be fixed in the next release.

Ref:
https://www.kernel.org/doc/Documenta...freq-stats.txt

Last edited by knc1; 04-02-2016 at 11:49 AM.
knc1 is offline   Reply With Quote
Old 04-02-2016, 01:12 PM   #10
dhdurgee
Addict
dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.
 
Posts: 253
Karma: 58594
Join Date: Jun 2010
Device: K3W, KT2
Quote:
Originally Posted by knc1 View Post
It looks like it is possible, it might even be practical.

Points:
*) Both the i.MX50 and the i.MX6 that I have seen so far provide two cpu clock speeds, a high and a low.
*) The two hardware/kernel version combinations I have seen so far use the 'standard' Linux cpu frequency governors.
*) Both combinations have a working 'userspace' governor.

The 'standard' cpu frequency governors use control algorithms for controlling 'general purpose' computer systems.
I.E: No outside knowledge of the 'jobs' that the system will be running.
BUT...
These are special purpose devices, they are e-book readers.
We KNOW what the job(s) and job-mix is - to open a book and display a page - then wait (forever in terms of a 1Ghz cpu) to turn the next page.

Currently, there is no direct connection between user interaction and cpu speed (that is: cpu power consumption).
But we could change that -

Say, in general, monitor for user interaction events, in those cases, immediately switch to 'high speed' -
As soon as that event action completes, immediately switch to 'low speed' -
Any other 'jobs' the cpu has to do are just internal supporting tasks, they can all run at the 'low speed' while the person is reading the page, or drop into 'suspend' in the usual manner.

The cpu takes 61035 clock cycles to switch speeds -
I.E: It can switch speeds before the user can lift their finger from the touch screen -
the user should never notice that the device had been running at low speed (or even suspended) in-between touches of the screen.

BUT
I would really like to see more "cpu reports" from other device/firmware combinations before I even consider designing a user space controller for the Kindles.
That is not something to tackle in an information vacuum.
Do you still need any from KT2 running 5.6.5 or K3 running 3.4.2 at this point? If so, I will get you data from mine.

Dave
dhdurgee is offline   Reply With Quote
Old 04-02-2016, 01:18 PM   #11
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
Yours will be the first report I have seen, other than on my own devices.
knc1 is offline   Reply With Quote
Old 04-02-2016, 11:32 PM   #12
qqqqqqqqqqqz
Member
qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.qqqqqqqqqqqz can self-interpret dreams as they happen.
 
Posts: 14
Karma: 20994
Join Date: Mar 2013
Device: PW2
Well ello guvna!

Sorry, I just had to.

This looks really neat though. Trying it now
qqqqqqqqqqqz is offline   Reply With Quote
Old 04-03-2016, 11:17 AM   #13
dhdurgee
Addict
dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.
 
Posts: 253
Karma: 58594
Join Date: Jun 2010
Device: K3W, KT2
Quote:
Originally Posted by knc1 View Post
Yours will be the first report I have seen, other than on my own devices.
My first report is a negative one. As it was handy, I first tried this on my K3 unit. I installed everything, ejected from my laptop and opened KUAL.

Instead of getting the menu, I got an error message about an improperly closed document and a restart of some kind. When the home screen was back I again opened KUAL. This time I got the menu and your extension was there. I went into the CPU Control menu and hit enter on the CPU Report button. A message appeared refreshing menu, please wait and then I was back on the home screen. No new document listed, so I guess something went boom.

I have myts installed, so if I can try something from the command line to get you more please let me know.

Dave
dhdurgee is offline   Reply With Quote
Old 04-03-2016, 11:27 AM   #14
knc1
Helpdesk Junkie
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: 10,452
Karma: 9884718
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by dhdurgee View Post
My first report is a negative one. As it was handy, I first tried this on my K3 unit. I installed everything, ejected from my laptop and opened KUAL.

Instead of getting the menu, I got an error message about an improperly closed document and a restart of some kind. When the home screen was back I again opened KUAL. This time I got the menu and your extension was there. I went into the CPU Control menu and hit enter on the CPU Report button. A message appeared refreshing menu, please wait and then I was back on the home screen. No new document listed, so I guess something went boom.

I have myts installed, so if I can try something from the command line to get you more please let me know.

Dave
The K3 must not have Lua installed.

I'll update the KUAL-system base files to account for that (RSN).
I need to blow the dust off my K2, K3, and K4 devices first (and re-charge them).

The governor select commands will still work - they are shell scripts.
knc1 is offline   Reply With Quote
Old 04-04-2016, 01:50 PM   #15
dhdurgee
Addict
dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.dhdurgee beat Jules Verne's record by 5 days.
 
Posts: 253
Karma: 58594
Join Date: Jun 2010
Device: K3W, KT2
I just installed the tool on my KT2 and the cpu_report is attached.

Dave
Attached Files
File Type: zip cpu_report.zip (996 Bytes, 17 views)
dhdurgee 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
Tools is there any KUAL extension development guide? fangzi Kindle Developer's Corner 2 01-02-2014 10:11 AM
Kual Menu development - Bitbucket or Github? Your thoughts eureka Kindle Developer's Corner 28 11-01-2013 09:18 AM
K3 Deleted kual by accident from home menu, proper way to get it back? rukawa11 Kindle Developer's Corner 2 09-21-2013 04:09 PM


All times are GMT -4. The time now is 12:54 AM.


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