baskerville / plato

Document reader
Other
1.26k stars 105 forks source link

No UI text is rendered besides the footer and header #263

Closed Earnestly closed 2 years ago

Earnestly commented 2 years ago

As per the title, there appears to be no UI fonts at all. The header displays "Sort by", the time and icons. The footer suggests there are no books (which there are, they exist directly on /mnt/onboard.

I did notice that when using the burger menu a text field does show up just below the header with the input: /mnt/sd which is why I assume it's not finding any books.

There does appear to be some interactivity when I touch various parts of the "hidden" UI.

Any ideas?

baskerville commented 2 years ago

Bring up the library menu by tapping the label in the bottom bar that reads Removable (No books) (Removable is the name of the current library). Then select Library → On Board.

Earnestly commented 2 years ago

There's no text, while "Removable (No books)" and "No pages" appear in the footer, when tapping the labels, nothing appears to happen. In general the menu items seem to be present, but they are invisible.

Here is what I see after tapping the "burger menu":

plato

The "[X]" or Home buttons do nothing but flash when tapped; the text cannot be editted and nothing happens when tapping it, etc.

At this point I appear to be softlocked and only a hard poweroff and reboot can get me back to nickel (nickelmenu)

baskerville commented 2 years ago

Unfortunately it means that the touch events that your device generates aren't interpreted correctly by Plato.

Could you try the attached binary? It's a modified Plato version that logs all the touch events. Could you try tapping the aforementioned label while running it? You'll then have to shut down using the power button and restart. Please post the resulting info.log.

plato-touch_n905.zip

Earnestly commented 2 years ago

Thanks for the help, here's the log:

info.log ``` Can't load settings: can't read file Settings.toml: No such file or directory (os error 2). Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. Add new entry: 5044F37E000714B5, catalogue/philosophy/the-technological-society.epub. Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. error: cannot open icons/home.svg: No such file or directory thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/view/icon.rs:32:67 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. error: cannot open icons/home.svg: No such file or directory thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/view/icon.rs:32:67 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. 1662280908.993964 3 1 414 1662280908.993973 3 0 776 1662280908.993976 3 24 101 1662280908.993979 1 330 1 1662280908.993986 0 0 0 1662280909.149088 3 0 777 1662280909.149095 3 24 100 1662280909.149104 0 0 0 1662280909.157662 3 0 185 1662280909.157667 3 1 777 1662280909.157669 3 24 0 1662280909.157671 1 330 0 1662280909.157676 0 0 0 contacts 0 segments 1 1662280911.348883 3 1 29 1662280911.348889 3 0 20 1662280911.348892 3 24 101 1662280911.348894 1 330 1 1662280911.348898 0 0 0 1662280911.448907 3 24 100 1662280911.448919 0 0 0 1662280911.457916 3 1 27 1662280911.457921 3 0 19 1662280911.457923 3 24 101 1662280911.457929 0 0 0 1662280911.462269 3 0 572 1662280911.462273 3 1 19 1662280911.462275 3 24 0 1662280911.462277 1 330 0 1662280911.462281 0 0 0 contacts 0 segments 1 1662280912.575757 3 1 26 1662280912.575948 3 0 95 1662280912.576066 3 24 100 1662280912.576172 1 330 1 1662280912.576279 0 0 0 1662280912.679824 3 0 573 1662280912.679831 3 1 95 1662280912.679833 3 24 0 1662280912.679836 1 330 0 1662280912.679841 0 0 0 contacts 0 segments 1 1662280914.777361 3 1 172 1662280914.777369 3 0 777 1662280914.777371 3 24 101 1662280914.777374 1 330 1 1662280914.777379 0 0 0 1662280914.877397 3 1 171 1662280914.877403 3 0 778 1662280914.877405 3 24 100 1662280914.877412 0 0 0 1662280914.885809 3 0 428 1662280914.885814 3 1 778 1662280914.885817 3 24 0 1662280914.885818 1 330 0 1662280914.885821 0 0 0 contacts 0 segments 1 1662280917.880944 3 1 569 1662280917.88095 3 0 24 1662280917.880952 3 24 101 1662280917.880954 1 330 1 1662280917.880958 0 0 0 1662280917.985637 3 0 30 1662280917.985643 3 1 24 1662280917.985646 3 24 0 1662280917.985647 1 330 0 1662280917.985652 0 0 0 contacts 0 segments 1 1662280919.457409 3 1 566 1662280919.457416 3 0 85 1662280919.457419 3 24 100 1662280919.457422 1 330 1 1662280919.457426 0 0 0 1662280919.483612 3 0 33 1662280919.483618 3 1 85 1662280919.48362 3 24 0 1662280919.483622 1 330 0 1662280919.483627 0 0 0 contacts 0 segments 1 1662280923.375103 1 116 1 1662280923.625097 1 116 0 1662280926.395099 1 116 1 ```

PS: Perhaps unrelated but recently also experienced touch issues with koreader: https://github.com/koreader/koreader/issues/2128#issuecomment-1236178826 (and onwards)

baskerville commented 2 years ago

I'm not sure if @NiLuJe has any insights on this but it seems that the last touch coordinates reported just before the ABS_PRESSURE 0 are somehow transformed: X and Y are swapped and Y is mirrored.

In this excerpt for example:

1662280914.777361 EV_ABS ABS_Y 172
1662280914.777369 EV_ABS ABS_X 777
1662280914.777371 EV_ABS ABS_PRESSURE 101
1662280914.777374 EV_KEY BTN_TOUCH 1
1662280914.777379 EV_SYN SYN_REPORT 0
1662280914.877397 EV_ABS ABS_Y 171
1662280914.877403 EV_ABS ABS_X 778
1662280914.877405 EV_ABS ABS_PRESSURE 100
1662280914.877412 EV_SYN SYN_REPORT 0
1662280914.885809 EV_ABS ABS_X 428
1662280914.885814 EV_ABS ABS_Y 778
1662280914.885817 EV_ABS ABS_PRESSURE 0
1662280914.885818 EV_KEY BTN_TOUCH 0
1662280914.885821 EV_SYN SYN_REPORT 0

Instead of

1662280914.885809 EV_ABS ABS_X 428
1662280914.885814 EV_ABS ABS_Y 778

The device should have generated:

1662280914.885809 EV_ABS ABS_Y 171
1662280914.885814 EV_ABS ABS_X 778

(Or nothing since the coordinates didn't change!)

Where 171 is computed as 599 - 428.

Earnestly commented 2 years ago

Perhaps worth noting that just as in that koreader issue I do mention that the latest fix works but the Y coordinate is mirrored, events on the right appear on the left.

In the koreader codebase they do have some routines for swapping XY for the Kobo Touch. I.e. https://github.com/koreader/koreader/commit/49e5200c8ac43868d21baadde6dd18255c5ed26f#diff-1a99db0519dbd26f02db9571238e358c3c272a6776f051668559db4716c8e33dL776

NiLuJe commented 2 years ago

Yup, noticed the same thing on @Earnestly's logs last night (https://github.com/koreader/koreader/issues/2128#issuecomment-1236289909).

Because we already covered that in that issue, this is a Trilogy B, FWIW.

I have zero experience with any of the three variants, but what KOReader tried to do on those always seemed fishy to me, but apparently it had a basis on something ;o).

(One of the weird things the code did is basically ignore all the X/Y events and only keep the one from the report w/ pressure == 0. I have no idea how that didn't horribly break even basic stuff like swipes, but, oh, well :D).

NiLuJe commented 2 years ago

I'm assuming this a Mk.3 quirk (e.g., Touch A/B), as I got logs from a Mini a few days ago, and they behave sensibly (and it's a Mk. 4 like the Touch C).

baskerville commented 2 years ago

@Earnestly Could you try the attached binary?

Can you bring up the main menu (by tapping the icon in the top right corner) and select Applications → Rotations Values? If so, please follow the instructions and post the resulting info.log.

plato-touch_n905-test_01.zip

Earnestly commented 2 years ago

First thing to note is that with this test binary not only does the menu show up but I can seemingly interact with it properly.

I went ahead and followed the rotation values prompts, but it asked for portrait mode where the kobo logo would be at the bottom, however on my device this would be upside down. I ignored that and kept it right way up, if you need it upside down I can repeat the tests.

After going through the prompts and it ended I used "Quit" to exit Plato.

info.log ``` Can't load settings: can't read file Settings.toml: No such file or directory (os error 2). Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. Add new entry: 5044F37E000714B5, catalogue/philosophy/the-technological-society.epub. Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. error: cannot open icons/home.svg: No such file or directory thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/view/icon.rs:32:67 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. error: cannot open icons/home.svg: No such file or directory thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/view/icon.rs:32:67 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. 1662280908.993964 3 1 414 1662280908.993973 3 0 776 1662280908.993976 3 24 101 1662280908.993979 1 330 1 1662280908.993986 0 0 0 1662280909.149088 3 0 777 1662280909.149095 3 24 100 1662280909.149104 0 0 0 1662280909.157662 3 0 185 1662280909.157667 3 1 777 1662280909.157669 3 24 0 1662280909.157671 1 330 0 1662280909.157676 0 0 0 contacts 0 segments 1 1662280911.348883 3 1 29 1662280911.348889 3 0 20 1662280911.348892 3 24 101 1662280911.348894 1 330 1 1662280911.348898 0 0 0 1662280911.448907 3 24 100 1662280911.448919 0 0 0 1662280911.457916 3 1 27 1662280911.457921 3 0 19 1662280911.457923 3 24 101 1662280911.457929 0 0 0 1662280911.462269 3 0 572 1662280911.462273 3 1 19 1662280911.462275 3 24 0 1662280911.462277 1 330 0 1662280911.462281 0 0 0 contacts 0 segments 1 1662280912.575757 3 1 26 1662280912.575948 3 0 95 1662280912.576066 3 24 100 1662280912.576172 1 330 1 1662280912.576279 0 0 0 1662280912.679824 3 0 573 1662280912.679831 3 1 95 1662280912.679833 3 24 0 1662280912.679836 1 330 0 1662280912.679841 0 0 0 contacts 0 segments 1 1662280914.777361 3 1 172 1662280914.777369 3 0 777 1662280914.777371 3 24 101 1662280914.777374 1 330 1 1662280914.777379 0 0 0 1662280914.877397 3 1 171 1662280914.877403 3 0 778 1662280914.877405 3 24 100 1662280914.877412 0 0 0 1662280914.885809 3 0 428 1662280914.885814 3 1 778 1662280914.885817 3 24 0 1662280914.885818 1 330 0 1662280914.885821 0 0 0 contacts 0 segments 1 1662280917.880944 3 1 569 1662280917.88095 3 0 24 1662280917.880952 3 24 101 1662280917.880954 1 330 1 1662280917.880958 0 0 0 1662280917.985637 3 0 30 1662280917.985643 3 1 24 1662280917.985646 3 24 0 1662280917.985647 1 330 0 1662280917.985652 0 0 0 contacts 0 segments 1 1662280919.457409 3 1 566 1662280919.457416 3 0 85 1662280919.457419 3 24 100 1662280919.457422 1 330 1 1662280919.457426 0 0 0 1662280919.483612 3 0 33 1662280919.483618 3 1 85 1662280919.48362 3 24 0 1662280919.483622 1 330 0 1662280919.483627 0 0 0 contacts 0 segments 1 1662280923.375103 1 116 1 1662280923.625097 1 116 0 1662280926.395099 1 116 1 Plato is running on a Kobo Touch A/B. The framebuffer resolution is 600 by 800. Tap (33, 544) (600, 800) Tap (41, 34) (600, 800) Tap (761, 31) (600, 800) Tap (746, 563) (600, 800) Framebuffer rotation: 0 -> 0. Tap (31, 31) (800, 600) Framebuffer rotation: 1 -> 1. Tap (753, 38) (600, 800) Framebuffer rotation: 2 -> 2. Tap (754, 564) (800, 600) Framebuffer rotation: 3 -> 3. Tap (28, 561) (600, 800) Framebuffer rotation: 3 -> 3. Startup rotation: 3. Mirroring scheme: (2, 1). ```