Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-24-2019, 10:28 AM   #31
schuhumi
Member
schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.schuhumi ought to be getting tired of karma fortunes by now.
 
Posts: 17
Karma: 222284
Join Date: Jul 2018
Device: PW3
Quote:
Originally Posted by NiLuJe View Post
@schuhumi:

I'll need to recap a few things in order to make the distinction between the is_dithered/sw_dithering FBInkConfig fields, and the dithering_mode argument to fbink_refresh() clearer .

Only very recent devices ship an EPDC that actually supports hardware dithering (Kobo Mk.7, for sure; and potentially Kindle Rex & Zelda).
The driver theoretically supports various dithering algorithms, but, on those devices, in practice, only ORDERED (and, of course, nothing, i.e., PASSTHROUGH) are supported.

In order to be somewhat future-proof (and/or make testing those easier), fbink_refresh allows setting those unsupported modes (in which case the driver safely fallbacks to PASSTHROUGH), hence the dithering_mode argument and the matching enum.


But, for stuff where the refresh is implicit (i.e., everything else ;p), this means we don't need to be able to set a specific algorithm: hence is_dithered, which will use ORDERED behind the scenes.

sw_dithering, on the other hand, is specific to image drawing, and does the dithering in software .

When it's supported, ORDERED will be tweaked to match the expectations of the specific waveform mode used (i.e., B&W for A2/DU, 8 or 16 shades of gray otherwise).
So its use is not limited to A2 (f.g., on Kobo, every screen with an image gets dithered that way, and those are usually GC16, either directly, or via AUTO).

On the other hand, sw_dithering will always dither to the exact 16 'color' eInk palette.

----

A2/DU are designed to be fast, at the expense of ghosting, yeah. You can request a flash with them, but they won't actually flash, and it may not actually help all that much (or at all) with ghosting .

From what I saw on my PW2 with the whole doom fire experiment, AUTO takes some pretty smart decisions depending on the content of the region . Which means it should often be using the *_FAST variants or DU for B&W content.

Which means, that, yeah, if you want to be specifically using A2/DU at some key moments (i.e., scrolling), you'll have to do that yourself .

----

As a rule, with FBInk, if you're not sure of a setting, the default is 0 and should behave sanely in most cases . (f.g., wfm 0 is AUTO, dither 0 is PASSTHROUGH, etc.).
I understand, thank you very very much for that thorough explanation @NiLuJe !

The last few days I did this:
  • started with an automatic A2 mode in fbink-xdamage. Now it keeps track of areas which are subject to change, and xdamage rectangles that intersect those areas get added to the area. All that is so that the rate of change in each area can be tracked, and when it's less than 500ms between xdamage events, A2 mode is activated for that area. When the quick xdamage events stop again a normal refresh+flashing is done to clear up the ghosting. What I'm not too happy about right now is the criterion for switching to A2, because even simple stuff like opening a terminal window triggers a number of xdamage events. I think I'll go for something like "if user drags the finger on the screen" or something like that. The ugly code: https://github.com/schuhumi/fbink-xd.../master/main.c
  • I reached out to Marc Juul who does the http://fread.ink/ project because I had trouble getting his free graphics driver to work. That turned out to be an issue with compiler (or rather linker) flags because Alpine Linux uses muslLibC, so no ldconfig and so on. I figured out how to packages stuff for Alpine, so I'll clean up all the things and also provide APKBUILDs ofc.
  • I fiddled with xf86-input drivers, and settled with evdev which provides fully working multitouch -yay! So there's drag to scroll in all GTK3 apps as well now, and also pinch to zoom

So in essentially I got the graphics working completely inside Alpine without the Kindles Xserver / Xephyr.

You can see a short video here with drag2scroll (Chromium and GTK3), pinch2zoom, GTK3 touch-text-selection and auto-A2-mode working here:



Stay tuned for the next update, I "only" need to package everything properly and create a new release

Last edited by schuhumi; 09-24-2019 at 10:46 AM.
schuhumi is offline   Reply With Quote
Old 09-24-2019, 11:59 AM   #32
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@schuhumi: Speaking of musl, I did also fix an issue with broken error messages a few days ago in FBInk .

I don't *think* there's any other obvious GNUisms left (or at least ones that could cause problems with musl on Linux), but if anything of the sort ever happens, do tell me about it, as I don't often (read: almost never) test stuff with a musl TC .
NiLuJe is offline   Reply With Quote
Advert
Old 10-10-2019, 10:58 PM   #33
HoanPiTa
Enthusiast
HoanPiTa began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Jul 2019
Device: Kindle paperwhite 3
It seem heavily. Can you make a simple extension for it

Gửi từ COL-L29 của tôi bằng cách sử dụng Tapatalk
HoanPiTa is offline   Reply With Quote
Old 10-11-2019, 01:07 PM   #34
WaseemAlkurdi
Zealot
WaseemAlkurdi began at the beginning.
 
Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
Quote:
Originally Posted by HoanPiTa View Post
It seem heavily. Can you make a simple extension for it

Gửi từ COL-L29 của tôi bằng cách sử dụng Tapatalk
@schuhumi has already done an extension.
Link: https://github.com/schuhumi/alpine_kindle_kual/releases
WaseemAlkurdi is offline   Reply With Quote
Old 10-12-2019, 03:48 PM   #35
WaseemAlkurdi
Zealot
WaseemAlkurdi began at the beginning.
 
Posts: 147
Karma: 20
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi x 2, Kindle (7th Gen, KT2), Paperwhite 3rd Gen
Dear @schuhumi,

After a lot of holding it off, I've recently found some time and tried this on my Kindle. It's a Kindle 7th gen (KT2) with a 160 dpi E Ink Pearl.
The interface is not at all usable, nor are programs when opened using a SSH terminal.
Any idea how to scale it down a little?Click image for larger version

Name:	IMG_20191011_193442.jpg
Views:	580
Size:	34.9 KB
ID:	174192

Last edited by WaseemAlkurdi; 10-13-2019 at 09:29 AM.
WaseemAlkurdi is offline   Reply With Quote
Advert
Old 03-04-2020, 06:13 PM   #36
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
Smile #gratitude, intention to add usb-otg keyboard support

This thread is the reason I bought a $20 ebay PW3 back in Sept.

Finally looping back to read it carefully last night, I unexpectedly learned quite a lot about the kindle graphics stack and epaper driver.

I didn't realize till I read carefully how much you had pushed things forward @schuhumi with determined graphics research/experimentation leading to getting a pure-alpine graphics stack working, and building on NiLuJe's fbink to implement optimized rendering using xdamage. And then to top it all off you published well-organized code with image releases and a nice install/runner script. This is really exceptional work, (PS I just got on Secure Scuttlebutt and was delighted to find Juul active there)

Also thank you @NiLuJe for so doing so much of the foundational work for this community (which I'm just beginning to discover) and for being a repository of specialized knowledge for other folks working to move things forward!

I am highly motivated to enable these devices as off-grid typewriters / network terminals with a connected physical keyboard (ambitions to write a book + need to #work-from-outdoors when the weather is nice). Now that I'm read up, I'm planning to:
  • Try to replicate @glasnost's reported success using @lucida's USB-OTG work to enable USB keyboard input, and if successful, package that enablement as a standalone package.
  • Make a small alpine image using your build scripts focused on terminal work and writing (vim, maybe some tools for writers - is there a lightweight gtk alternative to scrivener?)
  • If I end up with a device supporting bluetooth (PW4 or oasis), look into enabling alpine bluetooth stack.

If this all works out I might also at some point look into making some wlroots-based wayland touch ereader compositor using fbink for damage stuff. I am neither an experienced low lever dev nor graphics programmer so this is pretty pie-in-the-sky and would be done for my own learning/curiousity rather than any expectation of usefulness).

edrex is offline   Reply With Quote
Old 03-04-2020, 08:32 PM   #37
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
The PW4 and the Oasis are not the only models with Bluetooth.
But
The PW4 and, IIRC, the Oasis have the non-jailbreakable, Androidized, file system.
(With the exception of some PW4 devices, see (open the spoiler): https://www.mobileread.com/forums/sh...&postcount=185 )
knc1 is offline   Reply With Quote
Old 03-05-2020, 01:37 AM   #38
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
Quote:
Originally Posted by knc1 View Post
The PW4 and the Oasis are not the only models with Bluetooth.
But
The PW4 and, IIRC, the Oasis have the non-jailbreakable, Androidized, file system.
(With the exception of some PW4 devices, see (open the spoiler): https://www.mobileread.com/forums/sh...&postcount=185 )

Thanks for the intel. Any post-PW3 and/or bluetooth-enabled devices with a reliable JB method, or just have to score a PW4 with old enough fw? This is a bit OT for this thread, sorry.
edrex is offline   Reply With Quote
Old 03-05-2020, 01:43 AM   #39
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
nm last Q, will read that thread and continue there
edrex is offline   Reply With Quote
Old 03-09-2020, 05:18 PM   #40
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
Update: with lucida's usb otg support, evtest sees input events!

https://www.mobileread.com/forums/sh...0&postcount=97

Next: Investigate why no input in alpine X yet.

- Need to edit x config?
- Link devices in chroot?

Maybe it would make sense to include this support in the alpine kual menu somehow, since the ability to plug in a keyboard is pretty useful for a linux desktop.
edrex is offline   Reply With Quote
Old 03-09-2020, 05:22 PM   #41
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
Seems a black hole (moderation queue?) ate my last message.

USB device is working using lucida's otg script / usbhid.ko (over wifi/ssh, evtest /dev/input/event2 works). Posted here too.

Next: why doesn't alpine x11 see input events? I think because this is still xephyr and there is some translation layer.

@schuhumi I would be willing to work on packaging/scripting your work on native/accel Xorg, if you want to post WIP. I'll poke around your repos and see if I can figure out where things are.

Last edited by edrex; 03-09-2020 at 05:26 PM.
edrex is offline   Reply With Quote
Old 03-09-2020, 05:30 PM   #42
edrex
Member
edrex began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2020
Device: Kindle PW3
btw, I'm planning to use a little usb wireless dongle keyboard (mine is logitech k400r, but a more compact/light one without touchpad would be pref) with a small lipo or 18650 usb PS taped to the back of the device for destrain (those micro ports are pretty fragile, wouldn't want to have the kb physically attached for regular outdoor usage)

longer term, I might route/carve a clamshell enclosure out of plywood paneling. And post pics of course :P
edrex is offline   Reply With Quote
Old 05-07-2020, 06:40 AM   #43
etienne85
Junior Member
etienne85 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2019
Location: France
Device: PW3 (serial jailbreaked)
greetings

Hi,

This is kind of funny.
I'm doing project, and I looked for a way to use my PW3 for monitoring and control purpose.
I came on this thread which sparked my interest, notably because I tried to run web apps in the past on kindle which was difficult due to native browser limitations regarding recent javascript, ...

What is suprising, is when I looked at your presentation on youtube, it showed another video with exactly the same project I'm currently working on (an autonomous lawn mower robot).
I first thought it was suggested based on my history but i saw it was coming from same user....
Kind of nice coincidence to look for kindle subject and finally find the very same project your working on

So as I, maybe you had the intent to connect your kindle to an arduino in order to monitor/control it using serial communication over OTG usb port?

I'd be interested knowing if Alpine image, could help?

As it is running on top of original kernel, I imagine it inherits same capabilities/limitation.
Given someone else anwser on this thread, it seems it may require compilation and load of additional modules, so probably it won't..

Btw, I would still be interested if you or someone managed to do serial communication over ttyUSB ?

Thanks I find it great idea to get recent chromium run on kindle!
It will be surely useful to run web apps, and develop some tools based on it.
etienne85 is offline   Reply With Quote
Old 05-13-2020, 05:01 AM   #44
etienne85
Junior Member
etienne85 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2019
Location: France
Device: PW3 (serial jailbreaked)
some feedback

I tested the Alpine distribution. So far I'm very satisfied with it.

Just a few things I noticed at usage:
- the embedded onscreen keyboard is less pratical than the kindle or kterm ones.
I don't know if there would be a way to use them instead...
- the power button doesn't put the device into sleep. Maybe just an option to configure.
On the other hand the nice thing is when the device goes into sleep after a while, it no longer display kindle ads but a custom screensaver
- also the limited space in /mnt/us... due to alpine image and installation files.
As I used automatic installation with kual extensions, I didn't see it put alpine.zip taking 300mb+ for installation.. Then I saw it could be deleted. So I got some storage space back then.

The things I could do so far which were not possible or straightforward before:
- install linux packages using alpine apk (could make git works )
- web app works out of the box in chromium which I consider a great improvement for projects

The things I'm still looking to do:
having usb serial communication works... need to investigate further...
At last resort I remember someone during serial jailbreaking including a bluetooth serial transmitter inside.. but I hope a simpler software solution exists...
etienne85 is offline   Reply With Quote
Old 07-09-2020, 03:28 AM   #45
miran
Junior Member
miran began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2020
Device: Kindle pw3
other distros

can we load other distros? if so plz mentions steps involved?
miran is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone run Linux on an ereader? Panchax General Discussions 63 10-17-2017 02:05 PM
Alpine Linux on Kindle zaoqi Kindle Developer's Corner 3 08-21-2017 01:23 PM
Alpine Linux on Kindle zaoqi Kindle Developer's Corner 2 08-20-2017 10:43 AM
Running calibre on Alpine Linux? ljnelson Calibre 1 12-14-2016 01:34 AM
how to run an app with full screen kdusr Kindle Developer's Corner 5 11-28-2016 05:04 AM


All times are GMT -4. The time now is 03:11 PM.


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