08-27-2010, 02:47 PM | #61 | |||
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
Quote:
I try to publish the most popular options... F.e. I also prefer a smaller gap I've never been into mainstream... Quote:
In fact, that was the purpose of passing args to callbacks! EDIT: wow, 5th page! Last edited by Iņigo; 08-27-2010 at 02:52 PM. |
|||
08-27-2010, 03:14 PM | #62 | |
Member
Posts: 15
Karma: 10
Join Date: Feb 2010
Device: IREX-DR800SG
|
Quote:
And I think this one that I am using know is "e". I like it |
|
08-27-2010, 03:18 PM | #63 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
|
|
08-27-2010, 05:59 PM | #64 | |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Quote:
Where is the code/script related to this analysis? |
|
08-27-2010, 07:35 PM | #65 |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Does anybody know where is the code that updates the pagebar?
OK, the pagebar is part of UDS. Last edited by CoolDragon; 08-27-2010 at 08:06 PM. |
08-28-2010, 10:39 AM | #66 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
The behaviour is in: \4.0\iRex\sysd\src\system.c.
103: #define IDLE_TIMEOUT_SEC 5 296: g_idle_time_source = g_timeout_add_seconds(IDLE_TIMEOUT_SEC, on_idle_timeout, NULL); 2324: static gboolean on_idle_timeout(gpointer data) 2361: do_idle(); 2653: // call idle script and wait for it to return 2654: gchar *command = g_strdup_printf("idle.sh %d", min_before_standby); 2655: sys_spawn_sync(command); idle.sh can be found here: \4.0\iRex\sysd\data\idle.sh Which contains: 10: hwclock -s -u I assume that this command stops the cpu clock, stalling all processing. It will presumally also trigger a special DRAM refresh mode to preserve the ram-content. Since the cpu stopped, power consumption is very low. An external processor (I assume there is a separate display processor that controls the eInk-screen, pre-processes the wacom layer events and checks the keys.) can get the main cpu out of the low-power mode by triggering an external interrupt on the main cpu. Note that this is all based on interpreting the code/scripts and some knowledge on consumer electronics hardware. Hope this helps. |
08-30-2010, 04:48 AM | #67 | |
ex-IRX developer
Posts: 158
Karma: 224
Join Date: Oct 2008
Device: Irex DR800S, DR1000S, iLiad
|
Quote:
|
|
08-30-2010, 08:55 AM | #68 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Thanks for the info Gertjan!
|
08-30-2010, 09:52 AM | #69 |
Fanatic
Posts: 597
Karma: 430
Join Date: Aug 2008
Location: Ellesmere Port, UK
Device: DR1000S Sony PRS505 iPad iPhone
|
Good to here from you again Gertjan. I hope things work out well for you and your colleagues.
Howard |
08-30-2010, 11:41 AM | #70 | |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Quote:
Code:
SERIO=`find /sys/devices -name "serio*"` #echo -n "1 0" > $SERIO/rgbled if [[ "$1" == "" ]]; then echo -n "idle 0" > $SERIO/power_mode else echo -n "idle $1" > $SERIO/power_mode fi So now it is clear that user defined CPU timer is "paused" after this idle mode is activated, and will be "resumed" after this mode is terminated. Regarding the clock implementation, the only way to make it self-updated is to set its timer in sync with the idle timer (5 sec) so that the idle mode is never enabled. I have tested this on my device and it works this way. However, not going to idle mode will significantly reduce battery time, so it is not worth it. So setting the clock timeout to be between 5 and 10 is more usable. In this case, the clock timer is likely to be suspended on the idle timer, and times out during the next idle window to update the clock. Currently I am using 7 on my device, and works fine without noticeable battery problem. Of course, if the device is busy (flipping pages in less than 5 seconds, or using the stylus all the time etc etc), there is some overhead to have a 7 seconds timers. What I don't understand yet is why adding an eripc call in the clock timeout function will SOMETIMES update the clock after about 30 seconds of page turn, which is much longer than the idle timeout. Another way is to only update the clock on a page turn event. Unfortunately, there is no obvious event that can be used after using DR1000's uds, since the "page counter" in the popupmenu is disabled in document viewer, and the "pagebar" is embedded in the uds. Using dbus-monitor shows some signals being sent when flipbar is flipped left or right for a PDF doc, will have to do more experiments in other cases to identify a usable signal. |
|
08-30-2010, 03:00 PM | #71 | |
Enthusiast
Posts: 42
Karma: 10
Join Date: Aug 2010
Device: IREX DR800S
|
Quote:
Thank you for not abanding us! Regards Bran |
|
08-30-2010, 04:27 PM | #72 |
Groupie
Posts: 175
Karma: 863
Join Date: Oct 2009
Location: Germany, Karlsruhe
Device: Iliad v2, DR800S (inlove)
|
Came back from short vacation and realized that I've missed all the fun.. Anyways, the new info is interesting, gives a food for understanding the hardware+software design.
|
08-31-2010, 02:15 AM | #73 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
When the UDS is pre-rendering pages, it can delay idle mode by using the background busy ipc-call ("sysSetBgBusy"). This would allow the clock updates to continue until pre-rendering is finished. I think that is what you are seeing. The extra eripc-call makes sure that the change is 'significant-enough' to trigger a screen-update I guess.
|
08-31-2010, 10:11 AM | #74 | |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
My clock solution
Quote:
I don't understand how can the eripc call trigger a screen update if the CPU clock is disabled. Anyway, it doesn't matter now. So here is the solution: Since it is not worth the battery to update the clock by itself, we will leave the clock timeout to be anyway between 30s-60s. If the device is busy for more than this period, the clock will be updated automatically, and the power overhead should be minimal. Add this line to the end of /usr/bin/idle.sh: Code:
dbus-send --print-reply --dest='com.irexnet.popupmenu' /com/irexnet/popupmenu com.irexnet.popupmenu.updatesFinished Of course we need to change the code a little bit: 1. At the beginning of statusbar_update_toolbar() (statusbar.c), call toolbar_timeout_clock() 2. To avoid potential re-entry problem of toolbar_timeout_clock(), though very unlikely, add a semaphore around it. Code:
static gboolean in_clock = FALSE static gboolean toolbar_timeout_clock() { if ( in_clock ) return TRUE; in_clock = TRUE; ..... //update clock in_clock = FALSE; return TRUE; } |
|
09-01-2010, 12:15 PM | #75 |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
I have attached the binary along with the statusbar.c source code (need to learn Mercurial for submitting changes), you are welcome to test it. Don't forget to change the installation script to also copy idle.sh.dr800+ to /usr/bin/idel.sh. It has been very stable on my device so far.
|
Tags |
devel, dr800+, features |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 ANN: DR800+. Port of some DR1000 features to the DR800 | Iņigo | iRex | 274 | 04-05-2013 02:24 PM |
DR800 usbnet (USB networking to make development easier) for DR800 | GregorRichards | iRex | 40 | 07-20-2011 09:38 PM |
DR800 Plugin development for DR800/DR1000 | yuri_b | iRex Developer's Corner | 0 | 09-18-2010 09:46 AM |
DR800 | parryl | iRex | 1 | 08-06-2010 03:00 PM |