简体   繁体   English

Raspberry Pi 2 - 在纵向模式下移动物体时出现失真

[英]Raspberry Pi 2 - Distortion while moving objects in Portrait mode

I am currently working on a Kiosk system based on the Raspberry Pi 2 running Raspbian which runs a Java app.我目前正在开发一个基于运行 Raspbian 的 Raspberry Pi 2 的 Kiosk 系统,它运行一个 Java 应用程序。 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.通常,这不是问题,但我在 Java 应用程序上有一个列表,将被用户广泛使用。 The distortion is visible while scrolling on this list.在此列表上滚动时可以看到失真。

The link below shows this in action:下面的链接显示了这一点:

A GIF showing the distortion显示失真的 GIF

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我通过在/boot/config.txt中设置“display_rotate=3”将屏幕旋转了 270*
  • It is not dependent on the screen resolution or the “hdmi_group"它不依赖于屏幕分辨率或“hdmi_group"
  • This doesn't happen only on the GUI, the distortion is also visible during boot time这不仅发生在 GUI 上,在启动时也会出现失真
  • Overlocking doesn't affect the distortion锁边不影响失真
  • It always appearson the right-bottom side of the screen它总是出现在屏幕的右下角
  • This issue was also present in Ubuntu Mate这个问题也出现在 Ubuntu Mate 中

I'm not a specialist in Linux or anything like that but hear me out,我不是 Linux 或类似方面的专家,但请听我说,

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.对于您的问题,我首先会尝试使用该变量进行试验,看看它是如何变化的。 :) :)

Look at this: https://github.com/justincjack/rasp_pi_graphics看看这个: 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.它将创建一个带有 C 头文件的共享对象(和静态对象)。 If you can create Java bindings for it to be able to use the lib it produces your problems will be over.如果您可以为它创建 Java 绑定以便能够使用它产生的库,那么您的问题就会结束。

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.它允许平滑渲染,没有撕裂和疯狂深入挖掘 libdri (libdrm)/kms。

Based on the information provided, it appears that the distortion is caused by an issue with the display hardware or driver.根据提供的信息,失真似乎是由显示硬件或驱动程序问题引起的。

It is possible that the GPU or display driver is not correctly configured to handle the rotation of the display or that the display hardware cannot control the rotation. GPU 或显示驱动程序可能未正确配置以处理显示器的旋转,或者显示硬件无法控制旋转。 To troubleshoot this issue, you could try the following steps:要解决此问题,您可以尝试以下步骤:

  1. Try different display resolutions and settings in /boot/config.txt to see if the distortion is affected.在 /boot/config.txt 中尝试不同的显示分辨率和设置以查看失真是否受到影响。
  2. Try a different display driver, such as the open-source driver from the Raspberry Pi Foundation.尝试不同的显示驱动程序,例如 Raspberry Pi Foundation 的开源驱动程序。
  3. Try a different display, such as a different monitor or television.尝试不同的显示器,例如不同的显示器或电视。
  4. Try a different operating system, such as Raspbian or Ubuntu.尝试不同的操作系统,例如 Raspbian 或 Ubuntu。
  5. Check the display hardware for any signs of damage or wear.检查显示硬件是否有损坏或磨损的迹象。

If these steps do not resolve the issue, then it is likely that the display hardware is not compatible with the rotation of the display.如果这些步骤不能解决问题,则可能是显示器硬件与显示器的旋转不兼容。 In this case, you may need to purchase a different display or use a different rotation setting.在这种情况下,您可能需要购买不同的显示器或使用不同的旋转设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM