Mobileread
K3 screen hacking
#1  arikfunke 04-21-2012, 01:07 PM
Is there a way to:

1. trigger a framebuffer update? I tried the eips solutions from various posts but nothing seems to work.

2. is it possible to trigger screen rotation from a script?

Many thanks
Reply 

#2  inameiname 04-23-2012, 05:54 AM
Quote arikfunke
Is there a way to:

1. trigger a framebuffer update? I tried the eips solutions from various posts but nothing seems to work.

2. is it possible to trigger screen rotation from a script?

Many thanks

I'm not sure about (1.) but I think for (2.), you can simply use the Launchpad shortcut, show below, if you use Launchpad; otherwise, simply put that command into a simple script and run via Kite or something:

rotate_screen.ini
Code
; Rotate Screen
R = !if [ "$(cat /sys/module/eink_fb_hal_broads/parameters/bs_orientation)" == "1" ]; then lipc-send-event -r 3 com.lab126.hal orientationUp & else lipc-send-event -r 3 com.lab126.hal orientationLeft & fi
Reply 

#3  geekmaster 04-23-2012, 06:01 AM
The framebuffer update sends the contents of the framebuffer to the eink screen. It is used by programs the write directly to the framebuffer. You can do it with eips '' (two single quotes), or you can do it with cat 1 > /proc/eink_fb/update_display, or you can do it with an ioctl() call from a C program.

The eips command works on any eink kindle. The proc port is only for the K3 and earlier (but K4 supports it if booted from main). The K5 does not have the /proc port and uses a different ioctl() call, so the eips command is popular there.

lipc events tell the framework to redraw its screens.

Screen rotation can also be done with /proc ports, but that really confuses the framework, so it is better to ask the framework to do it with lipc commands.

Reply 

#4  arikfunke 04-26-2012, 06:38 AM
Thanks for the replies so far. The lipc events for screen rotation work perfectly.

From geekmaster's response I suspect that the eips command works just fine on my kindle but that my problem was that I need the framework to redraw its screen instead of just the framebuffer. - What is the correct lipc event for this?

Many thanks!
Reply 

#5  inameiname 04-26-2012, 11:46 PM
Quote arikfunke
Thanks for the replies so far. The lipc events for screen rotation work perfectly.

From geekmaster's response I suspect that the eips command works just fine on my kindle but that my problem was that I need the framework to redraw its screen instead of just the framebuffer. - What is the correct lipc event for this?

Many thanks!
No problem. And I am also curious of your question to geekmaster as well.
Reply 

#6  geekmaster 04-27-2012, 03:18 AM
Quote inameiname
No problem. And I am also curious of your question to geekmaster as well.
I do direct access to the framebuffer and input event devices. I have not studied the cvm stuff yet. Some of that is published in the forum, and some may be learned by studying startup scripts and and decompiled javascript. Some projects force keypress events to refresh the screen.

EDIT: My first forum search quickly found this:

lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed

It "presses" the power button. Pressing it two times refreshes framework desktop display.

Reply 

#7  inameiname 04-28-2012, 05:44 AM
Quote geekmaster
I do direct access to the framebuffer and input event devices. I have not studied the cvm stuff yet. Some of that is published in the forum, and some may be learned by studying startup scripts and and decompiled javascript. Some projects force keypress events to refresh the screen.

EDIT: My first forum search quickly found this:

lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed

It "presses" the power button. Pressing it two times refreshes framework desktop display.
Interesting....thanks for sharing.
Reply 

#8  drauger 04-28-2012, 08:41 AM
Quote geekmaster
lipc-send-event com.lab126.powerd.debug dbg_power_button_pressed

It "presses" the power button. Pressing it two times refreshes framework desktop display.
What about lipc-send-event com.lab126.powerd.resuming 1?
Reply 

#9  geekmaster 04-28-2012, 11:43 AM
Quote drauger
What about lipc-send-event com.lab126.powerd.resuming 1?
Did you test that? It does not seem to do anything on my K4 when it is showing a screensaver. It does not seem to do anything on my K4 when it is showing a desktop. Did you TEST it? The command I showed actually works both in modes (awake and "asleep"), and there is a lipc "get" command to find out which mode you are in so you can conditionally press the power button only when needed.

On a related note, when asleep the kindles disable keyboard events EXCEPT that on the touch, the waitforkey command returns rotation event "key codes" even when the kindle is asleep. A practical use is to have a SIMPLE background task that calls "inotify" to wake on filesystem events, which would wake when "waitforkey" writes to /tmp (waitforkey >/tmp/key) and then send a power button press to wake up. Picking up your kindle would wake it...

Reply 

Today's Posts | Search this Thread | Login | Register