-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Kobo] [framebuffer]: koreader doesn't work with FW 4.2.8432 #2542
Comments
I imagine this is a duplicate of #2502 which has some investigations into supporting 32 bits. Until such time your workaround might not be a bad thing to add, but of course it can't be added to koreader.sh just like that. I suppose the simplest option would be something along these lines[1] but perhaps checking against device names (
[1] NB Totally wouldn't work like that but I can't be bothered to look up shell syntax atm. =P |
Those values are device specific (in that case for Kobo Aura HD). Here is a hackish device agnostic approach As for the rotation value it might change between devices, but I don't know |
Right, I suggested device specific values because those would've been tested and confirmed. Naturally a device-agnostic approach is better, but then again it's just a hack in lieu of 32-bit support… Btw, you can just stick a short script like that in using three backticks. Makes it easier to read. ;-) #!/bin/sh
geometry=`fbset | grep geometry | sed 's/ /*/g' | xargs`
geom1=`echo $geometry | cut -d "*" -f2`
geom2=`echo $geometry | cut -d "*" -f3`
geom3=`echo $geometry | cut -d "*" -f4`
geom4=`echo $geometry | cut -d "*" -f5`
geom5=`echo $geometry | cut -d "*" -f6`
# before reader.lua
if [ $geom5 -eq 32 ]; then
last_geom=`fbset | grep geometry | xargs`
echo "switching to 16bpp mode"
echo fbset -geometry $geom1 $geom2 $geom3 $geom4 16
fi
# after reader.lua (just in case we don't reboot and go back straight to nickel)
if [ $geom5 -eq 32 ]; then
echo "returning to 32bpp mode"
echo fbset -$last_geom
fi Btw, if you take a look at the issue I referenced above perhaps you'd be able to assist somehow? |
@Frenzie thanks for the tip ;) I'm an hobbie user here, so no clues for the 32 bit support thing. Sorry |
In the other bug @hwhw said he'll look at it, so we can safely consider this taken care of. :-) I'll close this issue in favor of the other. |
Thanks for the workaround! I've come up with a short patch: diff --git a/platform/kobo/koreader.sh b/platform/kobo/koreader.sh
index 703d146..d914577 100755
--- a/platform/kobo/koreader.sh
+++ b/platform/kobo/koreader.sh
@@ -114,8 +114,11 @@ fi
# we keep maximum 500K worth of crash log
cat crash.log 2> /dev/null | tail -c 500000 > crash.log.new
mv -f crash.log.new crash.log
+FB_BPP=$(cat /sys/class/graphics/fb0/bits_per_pixel)
+[ "$FB_BPP" -gt 16 ] && fbset -depth 16
./reader.lua "${args}" >> crash.log 2>&1
RESULT=$?
+[ "$FB_BPP" -gt 16 ] && fbset -depth "$FB_BPP"
if [ "${FROM_NICKEL}" = "true" ] ; then
if [ "${FROM_KFMON}" != "true" ] ; then |
After upgrading to FW 4.2.8432 koreader doesn't start with crash.log:
...
[*] Current time: 02/16/17-11:52:26
02/16/17-11:52:26 ERROR cannot open translation file: l10n/en_US/koreader.po
./luajit: ./ffi/framebuffer_linux.lua:60: unknown bpp value for the eink driver
stack traceback:
[C]: in function 'error'
./ffi/framebuffer_linux.lua:60: in function 'init'
./ffi/framebuffer_mxcfb.lua:290: in function 'init'
./ffi/framebuffer.lua:59: in function 'new'
frontend/device/kobo/device.lua:127: in function 'init'
frontend/device.lua:39: in main chunk
[C]: in function 'require'
frontend/ui/uimanager.lua:1: in main chunk
[C]: in function 'require'
./reader.lua:93: in main chunk
[C]: at 0x00013e85
to make it work
before run koreader:
fbset -geometry 1080 1440 1088 3072 16
echo 3 > /sys/class/graphics/fb0/rotate
after run koreader and before run nickel:
fbset -geometry 1080 1440 1088 3072 32
echo 1 > /sys/class/graphics/fb0/rotate
We should edit koreader.sh, because the current implementation is broken on new firmware (unless opened with KSM8), or add 32 bpp support in koreader.
The text was updated successfully, but these errors were encountered: