07-20-2024, 01:56 AM | #286 |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Oh, perhaps more importantly: you might want to swap axes *before* mirroring, otherwise you end up mirroring the wrong axis .
|
07-21-2024, 03:34 AM | #287 | ||
Enthusiast
Posts: 30
Karma: 20342
Join Date: Jul 2023
Device: Kobo Glo, Kobo Sage
|
I don't think we've ever talked before - I don't use Discord.
Quote:
Quote:
I'm forcing the Glo into landscape by setting ForceAllowLandscape=true in Kobo eReader.conf and then selecting Landscape rotation in Nickel. I've attached the results of a devcap test. I had originally swapped the axes before mirroring like in ftrace, but that didn't work. I tried a whole bunch of things without really understanding what I was doing (I'm terrible at maths ), and the current code was the only way I could get it to work on my devices. I thought perhaps since I'm translating the coordinates from canonical to native rather than native to canonical, that swapping the axes at the end was the correct thing to do. But I don't really understand why it works or whether it will actually work on other devices. |
||
Advert | |
|
07-21-2024, 01:09 PM | #288 | |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Quote:
(i.e., does this *actually* rotate the framebuffer in some way, or does Nickel handle rotation entirely in software on that device). If it actually rotates the framebuffer, I've got a wrong mapping in fbink; but if it's software rotated, it's working as intended . Last edited by NiLuJe; 07-21-2024 at 01:11 PM. |
|
07-21-2024, 01:22 PM | #289 | |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Quote:
In which case... does this patch fix it? Code:
diff --git a/fbink_device_id.c b/fbink_device_id.c index c324c0c..9a10530 100644 --- a/fbink_device_id.c +++ b/fbink_device_id.c @@ -644,8 +644,14 @@ static void strtcpy(deviceQuirks.devicePlatform, "Mark 4", sizeof(deviceQuirks.devicePlatform)); break; case DEVICE_KOBO_GLO: // Glo (kraken) - deviceQuirks.isKoboNonMT = true; - deviceQuirks.screenDPI = 212U; + deviceQuirks.isKoboNonMT = true; + // {3, 2, 1, 0}, but no ioctl quirks + deviceQuirks.ntxRotaQuirk = NTX_ROTA_CCW_TOUCH; + deviceQuirks.rotationMap[FB_ROTATE_UR] = FB_ROTATE_CCW; + deviceQuirks.rotationMap[FB_ROTATE_CW] = FB_ROTATE_UD; + deviceQuirks.rotationMap[FB_ROTATE_UD] = FB_ROTATE_CW; + deviceQuirks.rotationMap[FB_ROTATE_CCW] = FB_ROTATE_UR; + deviceQuirks.screenDPI = 212U; strtcpy(deviceQuirks.deviceName, "Glo", sizeof(deviceQuirks.deviceName)); strtcpy(deviceQuirks.deviceCodename, "Kraken", sizeof(deviceQuirks.deviceCodename)); strtcpy(deviceQuirks.devicePlatform, "Mark 4", sizeof(deviceQuirks.devicePlatform)); Keep in mind it means rotating the *device* itself, not the buffer. e.g., what Nickel does for landscape for me is a CCW rotate. Last edited by NiLuJe; 07-21-2024 at 01:26 PM. |
|
07-21-2024, 01:25 PM | #290 |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Oops, fixed the patch above .
---- On that note, the sunxi devices (e.g., your Sage) do not support linuxfb hardware rotation at all, so they behave entirely differently (i.e., rotation is handled by the driver at blit-time). FBInk hides the mess away by returning potentially sensible rotate constants, but it's entirely fake ^^. That also means things gets wonky if FBInk is not the one that triggered the rotation, because the only thing we can do is query the accelerometer... and that can be finicky as hell . Last edited by NiLuJe; 07-21-2024 at 01:47 PM. |
Advert | |
|
07-22-2024, 03:21 AM | #291 | |
Enthusiast
Posts: 30
Karma: 20342
Join Date: Jul 2023
Device: Kobo Glo, Kobo Sage
|
Quote:
Portrait: Code:
[FBInk] Detected a Kobo Glo (330 => Kraken @ Mark 4) [FBInk] Enabled Kobo w/o Multi-Touch quirks [FBInk] Clock tick frequency appears to be 100 Hz [FBInk] Screen density set to 212 dpi [FBInk] Variable fb info: 758x1024, 32bpp @ rotation: 3 (Counter Clockwise, 270°) [FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 3072 bytes [FBInk] Canonical rotation: 0 (Upright, 0°) [FBInk] Fontsize set to 16x16 (IBM (Default) base glyph size: 8x8) [FBInk] Line length: 47 cols, Page size: 64 rows [FBDepth] Screen is 758x1024 (768x1024 addressable, fb says 768x1024) [FBDepth] Buffer is mapped for 3145728 bytes with a scanline stride of 3072 bytes Code:
[FBInk] Detected a Kobo Glo (330 => Kraken @ Mark 4) [FBInk] Enabled Kobo w/o Multi-Touch quirks [FBInk] Clock tick frequency appears to be 100 Hz [FBInk] Screen density set to 212 dpi [FBInk] Variable fb info: 1024x758, 32bpp @ rotation: 0 (Upright, 0°) [FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 3145728 bytes & line length: 4096 bytes [FBInk] Canonical rotation: 1 (Clockwise, 90°) [FBInk] Fontsize set to 16x16 (IBM (Default) base glyph size: 8x8) [FBInk] Line length: 64 cols, Page size: 47 rows [FBInk] Horizontal fit is perfect! [FBInk] Vertical fit isn't perfect, shifting rows down by 3 pixels [FBDepth] Screen is 1024x758 (1024x768 addressable, fb says 1024x768) [FBDepth] Buffer is mapped for 3145728 bytes with a scanline stride of 4096 bytes I have noticed the accelerometer rotation detection occasionally being out of sync with Nickel on my Sage. Think I'll make sunxi_force_rota user-configurable in my remote so people can lock it to a certain rotation if they want. |
|
07-22-2024, 03:56 AM | #292 | |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Great, thanks for testing that, I've pushed the fix!
Quote:
You can also set `FBINK_FORCE_ROTA` in the env to any of the values accepted by `fbink_sunxi_ntx_enforce_rota`, that'll be honored by the first `fbink_init` call . |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Small tool for filling book library in Kobo Aura | Paxerus | Kobo Developer's Corner | 2 | 12-31-2013 07:05 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 |