Skip to content

Kindle: Find the input device the hard way on the PW5 #11052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented Oct 29, 2023

Fix #11050 (for real this time).

My first PoC unearthed an unfortunate bug in the input backend (koreader/koreader-base#1685), but this one should behave.


This change is Reviewable

@NiLuJe NiLuJe added this to the 2023.10 milestone Oct 29, 2023
@NiLuJe
Copy link
Member Author

NiLuJe commented Oct 29, 2023

The ABS cap check is extremely dumb here, see plugins/externalkeyboard.koplugin/find-keyboard.lua for a more better implementation ;p.

On my own device, the power button doesn't report any EV_ABS capabilities (as it should, it's just a button), so this should be good enough for now.

@NiLuJe
Copy link
Member Author

NiLuJe commented Oct 29, 2023

For context, on affected devices:

ls -lash /sys/class/input

total 0      
     0 drwxr-xr-x    2 root     root           0 Oct 29 18:56 .
     0 drwxr-xr-x   57 root     root           0 Oct 29 18:56 ..
     0 lrwxrwxrwx    1 root     root           0 Oct 29 18:56 event0 -> ../../devices/platform/10019000.i2c/i2c-1/1-004b/gpio-keys.7.auto/input/input0/event0
     0 lrwxrwxrwx    1 root     root           0 Oct 29 18:56 event1 -> ../../devices/virtual/input/input1/event1
     0 lrwxrwxrwx    1 root     root           0 Oct 29 18:56 input0 -> ../../devices/platform/10019000.i2c/i2c-1/1-004b/gpio-keys.7.auto/input/input0
     0 lrwxrwxrwx    1 root     root           0 Oct 29 18:56 input1 -> ../../devices/virtual/input/input1

(Which is slightly different than on my 5.14.1.1 device, but I lost the backlog and the device is stashed now, so you'll have to take my word for it ;p.)

And there's only the power button in /dev/input/by-path.

@Frenzie Frenzie merged commit d805a69 into koreader:master Oct 30, 2023
@Frenzie Frenzie added the Kindle label Oct 30, 2023
@hius07
Copy link
Member

hius07 commented Oct 30, 2023

Confirm, it fixed PW5 G002DK, works well (from 4pda.ru).

@hius07
Copy link
Member

hius07 commented Oct 30, 2023

But there's another PW5 showing

ffi.load: blitbuffer
./luajit: ./ffi/framebuffer_linux.lua:55: cannot open framebuffer
stack traceback:
	[C]: in function 'assert'
	./ffi/framebuffer_linux.lua:55: in function 'init'
	./ffi/framebuffer_mxcfb.lua:803: in function 'init'
	./ffi/framebuffer.lua:138: in function 'new'
	frontend/device/kindle/device.lua:1203: in function 'init'
	frontend/device.lua:62: in main chunk
	[C]: in function 'require'
	./reader.lua:151: in main chunk
	[C]: at 0x00013ead

@NiLuJe
Copy link
Member Author

NiLuJe commented Oct 30, 2023

@hius07: That one was for an incomplete JB ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kindle Paperwhite 5 16GB touch not working
3 participants