|
|
Thread Tools | Search this Thread |
09-29-2013, 06:15 AM | #1 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Running apps while framework is down on kindle PW, for better performance
Hi there, I've a question.
Is there a way to run apps after setting the framework down on Kindle Paperwhite? It would be really useful to free memory with heavy apps, and the workframe could be still set on after closing the program. I know that it was possible on kindle 3: with KindlePdfViewer for example you had just to stop the framework with: /etc/init.d/framework stop Then run the software, enjoy outstanding performance and executing "/etc/init.d/framework start" after it closes. I've tried to achieve this for example with koreader, using the command: stop framework The problem is that after executing this, everything stops and can get through the rest of the code and make other apps launch, as I did instead on Kindle 3. I've tried also with /etc/upstart/framework stop, but didn't work. So I wonder if running apps while framework is down is still possible with kindle PW devices. It would be really important to me, because PW has still 256 Mbyte of RAM like kindle 3, but a really heavier firmware that waste all of this memory, so apps like Koreader continue to crash. Thank you in advance Last edited by Aeris; 09-29-2013 at 06:23 AM. |
09-29-2013, 07:40 AM | #2 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
The issue is really that this device works on an X.
the touchscreen is serviced by it. as is the Xdamage code (decides what to redraw on the screen) squirrelled away in the LUA. it's this 2nd point that is the issue really, the first one I could help with by simply providing a tinier X, with the relevant config for the Touchscreen. I have actually done some research on hi-jacking the xdamage code however it is Amazon proprietary code so that limits how we can use it in a few ways. Posting stuff about it on here for example can not contain code excerpts etc etc. but yeah, that is the issue and yep I have tried to work around it before. DOUBTLESS it can be done. Haven't had time to properly have a dig into it yet. Too much too do, not enough time, not enough people digging... When you say "crash" do you mean restart the X? or what? IIRC there is a hardcoded "reset X cos we are low on memory" value that maybe could be adjusted... Need more info on exactly what you are trying to fix. |
Advert | |
|
09-29-2013, 08:07 AM | #3 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Here there is the bug-thread I've opened on github (with a bugmenot account cuz lazy xD):
https://github.com/koreader/koreader/issues/285 Yes, it restarts the framework due to low memory, to avoid crashing itself. The framework now is so heavy, if only it could be shut off while keeping X on... maybe would be useful also to execute debian and other distro flawlessly. It's quite a shame to have a Kindle PW with a double frequency CPU respect to Kindle 3, but that runs slower due to insufficient RAM... |
09-29-2013, 08:21 AM | #4 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
hmmmmmm
thinking |
09-29-2013, 08:28 AM | #5 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
stop lab126_gui stops the UI, and still leaves X running (which you'd stop by, you guessed it stop x).
If you kill x, start x restarts everything. If you don't, start lab126_gui. (Why lab126_gui and not framework? Because it's a meta event, and handles a bunch of other things more neatly (the progress bar, among other things)). You will have to trap SIGTERM if this is used in a KUAL script, because stopping the framework propagates a SIGTERM to everything the framework launched (meaning KUAL & the script it ran). Check the ScreenSavers/Fonts KUAL extension for examples of how I did it for X or the framework (because busybox's trap implementation is finicky, and so is upstart, so you can potentially confuse upstart by doing it wrong). Last edited by NiLuJe; 09-29-2013 at 11:08 AM. |
Advert | |
|
09-29-2013, 12:39 PM | #6 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
I put stop lab126_gui in the koreader script, before launching ./reader.lua, but the screen became all black and koreader didn't appear later
Sorry but I'm a newbie and not sure to get all what you mean... by "trapping", as you say, the SIGTERM, can I start Koreader while taking off the framework? Last edited by Aeris; 09-29-2013 at 12:43 PM. |
09-29-2013, 12:47 PM | #7 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
I did:
trap "" SIGTERM stop framework And, after closing the app start framework What to say, it's great! Last edited by Aeris; 09-29-2013 at 01:32 PM. |
09-29-2013, 01:34 PM | #8 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
I kind of recall the upper mem cap being somewhere in upstart but it's been a long time since I fiddled in there... Sorry...
EDIT: And I am not certain it is in there... but I am certain I have seen the setting "somewhere". Last edited by twobob; 09-29-2013 at 01:39 PM. |
09-29-2013, 02:13 PM | #9 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Some off-the-wall file name, like kdb.src or something. I posted about it somewhere recently. |
|
09-29-2013, 02:16 PM | #10 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
ah cool. Easy enough to amend and build another one then.
Good info! (might end up doing that myself) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is the difference between framework.fiona.conf vs framework.mario.conf | kocoman | Kindle Developer's Corner | 1 | 03-19-2013 09:40 AM |
Stopping running apps | msxman | Kobo Tablets | 11 | 12-15-2011 06:32 AM |
running apps | richard_iii | Nook Developer's Corner | 5 | 03-29-2011 11:42 AM |
Apps running in the background | devseev | enTourage Archive | 14 | 10-25-2010 04:24 AM |
apps running in background? | kejia | Spring Design Alex | 0 | 05-13-2010 03:55 PM |