View Single Post
Old 11-07-2017, 03:31 PM   #4
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Ideally you should check if the program outputs any useful debugging info. The easiest but more labor-intensive way would be to add -d to the KSM KOReader command. Either in the KSM script or here:

https://github.com/koreader/koreader...reader.sh#L124

Code:
./reader.lua -d "${args}" >>crash.log 2>&1
Then the crash.log will contain the full debugging output. (You could rename it debug.log if you prefer. :P)

The ultimately easier way is to use something like USBNet or SSH so you can easily change configurations and tail the debug output in your console, and of course kill KOReader so you don't have to reboot.

Regarding the screen orientation, I should've mentioned that it's very important not to assume that the touch orientation and display orientation are the same. It could even be mirrored. So basically just try some taps all around the screen, probably starting with top center and bottom center.

As far as what next, I can't really help you there. From what I've seen I don't think it should be necessary to write any new implementation, but some combination of already existing stuff should do: https://github.com/Frenzie/koreader/...e.lua#L20-L134

We know the DPI, we know it has a frontlight and the viewport is probably the same as on the H2O (not terribly important just for getting it to work) but other than that all bets are off. :P

Note that on most Kobos you can play around with the visual rotation like this (in koreader.sh prior to ./reader.lua):

Code:
CUR_ROTATE="$(cat "/sys/class/graphics/fb0/rotate")"
# this suffices on normal devices, but H2O is stupid and sets the opposite
echo "${CUR_ROTATE}" >"/sys/class/graphics/fb0/rotate"
# this therefore turns it around on H2O (and other potential idiots) and merely
# innocently repeats on sane devices
# shellcheck disable=SC2094
cat "/sys/class/graphics/fb0/rotate" >"/sys/class/graphics/fb0/rotate"
You can also reset it (and/or mess it up) using
Code:
/usr/sbin/fbset -depth 32
In principle I don't think the display should turn around compared to KSM unless KSM still does /usr/sbin/fbset -depth 16 somewhere (a workaround for older versions of KOReader since Kobo used to be 16 bit).
Frenzie is offline   Reply With Quote