View Single Post
Old 08-19-2015, 09:41 AM   #530
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by frostschutz View Post
OK, I think I got it installed okay.
Thank you for installing and having a look at it.

Quote:
Originally Posted by frostschutz View Post
I think this could be related to the effect I've noticed once before and described in another post.
I read this post of course, but I was unable to use its information to do something meaningful.

Quote:
Originally Posted by frostschutz View Post
Somehow the device has two possible behaviours. One where no flips occur, and another where flips do occur. So it may be pngshow kicks it into the "start flips" phase.
I misunderstood your other post yesterday. I thought "detect rotation inversion behaviour" means whether the device is in a flipping state or not and pngshow acts somehow accordingly. I wondered anyway how testing once can suffice.

Quote:
Originally Posted by frostschutz View Post
Although that can't be the whole story. I can trigger those flips in KSM only if the pngshow runs in the context of the db_chk_integrity script. If I enable WiFi, telnet in, run pngshow from the telnet console - everything is fine. pngshow shows its pic; navigating ksm does not flip. Running db_chk_integrity also does not flip anymore - probably because my running pngshow from telnet already created the correct /tmp/pngshow file. Somehow only the combination - rotation detection while ksm was executing the script - triggers the flipping.

It's a baffling issue, that's for sure.
Right! I was rather shocked that the test version has this issue (and that it was already there in KSM 7, as reported yesterday by Ken). In case you did not see the previous posts: KSM 7 and the test version used pickel to show the animation, only after boriar reporting the rotation issue, did I replace pickel by pngshow. Under KSM 7 people run test scripts that called pickel to display images and start nickel and logged the rotation values at those points. At that time, they did not suffer a rotation problem.

Quote:
Originally Posted by frostschutz View Post
Maybe if you add a transparent 1x1 pixel png and pngshow that as part of your startup script before KSM starts for seriously, would magically fix things. That's the stupidest thing I can think of right now.
Even if you consider it the stupidest thing, could you please hint at the reasoning behind the magic?

Here is some further information, that might possible be useful:
Spoiler:
When a KSM (Qt) application runs the very first time after boot on a Aura HD or H20, it is upside down, but from then on KSM applications start properly orientated. Therefore, at start up, I run a KSM application without user interaction:

Code:
#(extract from /onstart/ksmhome.sh)
if [ "$PRODUCT" == "dragon" ] || [ "$PRODUCT" == "dahlia" ]; then
  $ksmroot/kobomenu.sh -autoselectafter=0
fi
After that the rotation value is set to 2.
After running the on-animator.sh (involving pickel), the value stays at 2.
After running nickel, the value is 1.

I then set it back (in onstart/start_nickel.sh) to 2 by,
Code:
if [ "$fbrotatevalue" != "$(cat /sys/class/graphics/fb0/rotate)" ]; then
  echo "$fbrotatevalue" > /sys/class/graphics/fb0/rotate
  cat /sys/class/graphics/fb0/rotate > /sys/class/graphics/fb0/rotate
fi
$fbrotatevalue is set to 2 in ksmhome.sh
after echo "$fbrotatevalue" > /sys/class/graphics/fb0/rotate the value is 0
after cat /sys/class/graphics/fb0/rotate > /sys/class/graphics/fb0/rotate the value is 2

On Glo HD the first running KSM application is correctly orientated from start. The rotation value is 0.
After running the on-animator.sh (involving pickel), the value is 3.
After running nickel, the value is still 3.

I then set it back (in onstart/start_nickel.sh) to 0 by,
Code:
if [ "$fbrotatevalue" != "$(cat /sys/class/graphics/fb0/rotate)" ]; then
  echo "$fbrotatevalue" > /sys/class/graphics/fb0/rotate
  cat /sys/class/graphics/fb0/rotate > /sys/class/graphics/fb0/rotate
fi
$fbrotatevalue is set to 0 in ksmhome.sh
after echo "$fbrotatevalue" > /sys/class/graphics/fb0/rotate the value is 0
after cat /sys/class/graphics/fb0/rotate > /sys/class/graphics/fb0/rotate the value is 0.

Kobo Touch (and Mini and Glo, I guess) behaves like Glo HD, with the exception, that the value after on-animator.sh is still 0, and only after nickel 3.


Not sure what exactly one can undestand from that (written in the spoiler). I guess my question is whether to call pngshow 1x1pixel.png before
Code:
if [ "$PRODUCT" == "dragon" ] || [ "$PRODUCT" == "dahlia" ]; then
  $ksmroot/kobomenu.sh -autoselectafter=0
fi
or after. Or does it not matter?


Quote:
Originally Posted by frostschutz View Post
To fix it properly KSM would have to detect the rotation behaviour somehow. You can see on telnet once it starts flipping the fb0/rotation is switching between 0 and 2 as you navigate the KSM
There are mainly two problems: The first is that I do not have the necessary knowledge, and then, I do not have a flipping device, fbo/rotation stays alway at 0.
tshering is offline   Reply With Quote