![]() |
#256 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
I was thinking "what novelty could fbink do today?"
![]() That came to mind: But wait! Why do frame buffer rotations mess screenshots? @NiLuJe Care to shed some light? |
![]() |
![]() |
![]() |
#257 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I have no idea how the stock screenshot tool works, but it's either going through X, or not expecting hardware rotations.
Use fbgrab, it doesn't rotate anything, so at least the dump will be correct, you may just have to rotate it yourself afterwards, although that shouldn't be necessary on Kindle if it's taken at the original rotation (i.e., whatever matches UR, which is most likely not going to be 0, and is likely to be device-specific to some extent ;p). Last edited by NiLuJe; 11-11-2020 at 04:38 PM. |
![]() |
![]() |
![]() |
#258 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
I did:
Code:
[root@kindle root]# cd /mnt/us [root@kindle us]# ./turn -F mcr [FBInk] Detected a Kindle PaperWhite 3 (0G1 -> 0x201 => Muscat on Wario) [FBInk] Clock tick frequency appears to be 100 Hz [FBInk] Screen density set to 300 dpi [FBInk] Variable fb info: 1072x1448, 8bpp @ rotation: 3 (Counter Clockwise, 270°) [FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6782976 bytes & line length: 1088 bytes [FBInk] Fontsize set to 24x24 (IBM base glyph size: 8x8) [FBInk] Line length: 44 cols, Page size: 60 rows [FBInk] Vertical fit isn't perfect, shifting rows down by 4 pixels [FBInk] Pen colors set to #000000 for the foreground and #FFFFFF for the background ... [root@kindle us]# fbgrab grab.png Skipping 0 bytes Resolution: 1088x1448 -> 1072x1448 (cropping: 16 rightmost pixels) @ depth 8 (invert: no) No conversion needed Now writing PNG file (compression 4) [root@kindle us]# screenshot: Last edited by PoP; 11-11-2020 at 08:15 PM. Reason: post both outputs |
![]() |
![]() |
![]() |
#259 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
It's possible something's actually writing to the framebuffer during the runtime (status bar?), I'll double-check on a Kobo tomorrow
![]() Does a plain refresh wreck it the same way? (i.e., fbink -s -f). |
![]() |
![]() |
![]() |
#260 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
The framework is stopped at that time, so no status bar, or other activity.
And yes, after fbink -s -f the physical eink screen is messed up and it matches the screenshot. |
![]() |
![]() |
![]() |
#261 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Okay, a good night's sleep does wonders for your brain
![]() Yes, this is perfectly normal: a rotation doesn't actually rotate the framebuffer's *content*. It's still the same block of memory, it just gets addressed differently. Some kernels *may* just zero the full region after a rotation to hide some of that away, but that doesn't seem to be the case on a Kindle. So, essentially, this works because eInk, where what's on the screen can be completely different than what's on the framebuffer. It works because each and every time, you're refreshing *just* the right region ![]() As a quick test, if you display an full-screen image, and just *invert* the rotation, that "works", because the memory layout is identical (a scanline is still the same length). But as soon as you change the layout, things start getting funky ![]() Last edited by NiLuJe; 11-12-2020 at 10:16 AM. |
![]() |
![]() |
![]() |
#262 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
"The FB contents doesn't get rotated, just the address space." Thanks, makes perfect sense.
Thankfully the Kindle not zeroing after a rotation allowed me to see the effect. One could take a screenshot before a rotation, rotate the screenshot and fbink the new text over that screenshot graphics to finally be able to capture the effect. I definitely *won't be attempting this* ![]() "It works because each and every time, you're refreshing *just* the right region" Yeah. "As a quick test" Indeed. Also of interest?? The PW3 has 3-0-1-2 top-right-bottom-left clockwise rotations and the K3 has 3-0-1-2 right-top-left-bottom counter-clockwise rotations. Go figure. Insights much appreciated. |
![]() |
![]() |
![]() |
#263 | |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Quote:
It's mostly irrelevant on Kindle, because no-one cares about fb-level hardware rotation because X11, and the kernels are generally very sane, but it's fresh hell on Kobo, where having a bit of an idea of what the hell the current state is *is* kinda helpful, despite the kernels being wildly bonkers ![]() Last edited by NiLuJe; 11-12-2020 at 08:50 PM. |
|
![]() |
![]() |
![]() |
#264 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
Code:
./turn -F mcr -S 4 [EDIT 2020-11-18] updated to v0.40 to support K3 [EDIT 2020-11-20] updated to v0.50 to stop parsing the lyrics (thanks NiLuJe) [EDIT 2020-11-20] updated to v0.60 use "eval" don't parse Last edited by PoP; 11-20-2020 at 03:11 PM. Reason: v0.60 |
|
![]() |
![]() |
![]() |
#265 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
|
![]() |
![]() |
![]() |
#266 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PoP:
(Re: a comment in mirror) You can stop argument parsing by using the magic token -- at the *end* of your list of flags, but *before* the actual "argument". e.g., fbink -y -1 -mph -- "Wheeee" (That's a standard GNU behavior, btw ![]() Last edited by NiLuJe; 11-20-2020 at 05:21 PM. |
![]() |
![]() |
![]() |
#267 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
And you can also just eval $(fbink -e), no need to try to parse the output, it's already shell-friendly
![]() c.f., this, where it's used for ${deviceId} ![]() (-e also always implies -q). |
![]() |
![]() |
![]() |
#268 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
![]() ![]() |
|
![]() |
![]() |
![]() |
#269 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
I will understand this, ![]() [EDIT 15:20] Got it! Didn't realize that you structured your output for "eval" since day 1. turn script updated above again. Last edited by PoP; 11-20-2020 at 03:22 PM. Reason: eval is amazing |
|
![]() |
![]() |
![]() |
#270 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
That's kinda why the flag is named -e, --eval ;p.
|
![]() |
![]() |
![]() |
Tags |
eips, fbink |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FBInk: A small tool/library to print crap on your screen! | NiLuJe | Kobo Developer's Corner | 311 | 06-20-2025 01:19 PM |
Small print | Broadback | Conversion | 12 | 12-12-2011 02:31 PM |
Small Tool to change book order (PRS-x50) | goaspy | Sony Reader | 113 | 10-14-2011 03:28 PM |
small print | breezeman | Introduce Yourself | 13 | 07-03-2011 09:02 AM |