17

I am currently working on a Kiosk system based on the Raspberry Pi 2 running Raspbian which runs a Java app. Everything works perfectly well, except for a distortion on the screen which appears while objects are moving. Normally, this wouldn’t be a problem, but I have a list on the Java app which will be extensively used by the users. The distortion is visible while scrolling on this list.

The link below shows this in action:

A GIF showing the distortion

What I know so far:

  • This only occurs while the screen is rotated. I have rotated the screen by 270* by setting “display_rotate=3” in /boot/config.txt
  • It is not dependent on the screen resolution or the “hdmi_group"
  • This doesn’t happen only on the GUI, the distortion is also visible during boot time
  • Overlocking doesn’t affect the distortion
  • It always appearson the right-bottom side of the screen
  • This issue was also present in Ubuntu Mate
Arlind Hajredinaj
  • 8,380
  • 3
  • 30
  • 45
DrenImeraj
  • 171
  • 5
  • 5
    Appears to be *"screen tearing"*. Do you know how to enable `VSYNC` (wait-for-vsync) within the software stack being used? Alternately check for config options to double/triple buffer the display framebuffer? – TheCodeArtist Jan 07 '16 at 09:31
  • Have you tried updating your firmware? See http://raspberrypi.stackexchange.com/questions/37645/when-using-display-rotate-1-the-screen-tears – Peter Brittain Jan 09 '16 at 18:50
  • Does it occur with other rotation angles, like 90 degrees? – pietv8x Jan 11 '16 at 21:43
  • as @TheCodeArtist already mentioned - this is called tearing. you need a graphic library that is hardware accelerated (use opengl). without vsync you have no change to remove the tearing. – lumos0815 Jan 11 '16 at 21:58

2 Answers2

0

I'm not a specialist in Linux or anything like that but hear me out,

You say that you rotate your screen in the config file. Could you put it back to the default? Why do you need it to be rotated? Because this rotation could cause it to off align parts of the screen. I would first for your problem look at experimenting with that variable and see how it changes. :)

Electro lemon
  • 75
  • 1
  • 1
  • 6
0

Look at this: https://github.com/justincjack/rasp_pi_graphics

It's a library that I wrote that will definitely solve your issue. It will create a shared object (and static) with a C header file. If you can create Java bindings for it to be able to use the lib it produces your problems will be over.

I couldn't find any info that really worked, so this is the product of a few weeks worth of work.

It allows smooth rendering with no tearing and no crazy deep-digging into libdri (libdrm)/kms.

Justin Jack
  • 525
  • 6
  • 13