![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36
Karma: 41848
Join Date: Mar 2011
Device: iRex
|
K3 screen hacking
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 |
![]() |
![]() |
![]() |
#2 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 159
Karma: 20390
Join Date: Feb 2009
Device: none
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#3 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
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. ![]() Last edited by geekmaster; 04-23-2012 at 05:05 AM. |
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36
Karma: 41848
Join Date: Mar 2011
Device: iRex
|
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! |
![]() |
![]() |
![]() |
#5 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 159
Karma: 20390
Join Date: Feb 2009
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#6 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
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. ![]() Last edited by geekmaster; 04-27-2012 at 02:25 AM. |
|
![]() |
![]() |
![]() |
#7 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 159
Karma: 20390
Join Date: Feb 2009
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 32
Karma: 46558
Join Date: Feb 2012
Device: Kindle4NT
|
|
![]() |
![]() |
![]() |
#9 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
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... ![]() Last edited by geekmaster; 04-28-2012 at 10:48 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hacking my Broken Screen Kindle 3 | mpolo | Kindle Developer's Corner | 0 | 07-12-2011 05:02 PM |
Can hacking the screen saver on the K3 get you black listed? | undeliverable | Amazon Kindle | 5 | 01-05-2011 12:31 PM |
hacking in? | omro | Astak EZReader | 5 | 12-09-2009 05:59 PM |
iLiad hacking the screen refresh cycle | DHer | iRex Developer's Corner | 2 | 05-13-2008 03:07 PM |