Skip to content
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

rviz2 major screen flickering/tearing #1079

Open
fprott opened this issue Oct 20, 2023 · 7 comments
Open

rviz2 major screen flickering/tearing #1079

fprott opened this issue Oct 20, 2023 · 7 comments
Labels
more-information-needed Further information is required

Comments

@fprott
Copy link

fprott commented Oct 20, 2023

Hello,

As the following video shows I experience a critical bug with rviz2. The screen is flickering/tearing even when not displaying any data. This will happen even if I don't resize!

Basically as soon as I start rviz2 I get the following flickering only inside the 3D scene (not the surrounding tools!).

vokoscreenNG-2023-10-20_14-51-06.mp4

This is NOT a monitor issue, this recording was not filmed off the monitor but I used a screen-grabbing software.

Now it appears to be a frame rate issue. When I play around with the frame rate, then save that option and then restart rviz the bug will no longer appear till I resize or switch out of the window in any way. I suspect that on the time of resizing rviz forgets the frame rate?

So I suspect the problem is that Compositor is at fault. It turns out that if I unset the option "Allow applications to block compositing", as seen in the attached screenshot, the problem will no longer appear till the window is resized. So Compositor can't properly work?

image

Anyway, with this remedy I can make RVIZ2 barely usable but it is not really a good experience. Without it this is totally system breaking and might cause epilepsy or something.

My specs:
ros: iron
cpu: i9-13900HX
monitor: ASUS VG34V
gpu: NVIDIA GeForce RTX 4080 Laptop GPU/PCIe/SSE2
VGA compatible controller: NVIDIA Corporation Device 27e0 (rev a1)
NVRM version: NVIDIA UNIX x86_64 Kernel Module 530.41.03 Thu Mar 16 19:48:20 UTC 2023

@sloretz sloretz added the more-information-needed Further information is required label Nov 2, 2023
@sloretz
Copy link
Contributor

sloretz commented Nov 2, 2023

Does this happen with any other OpenGL windows? It seems like something that might be a bug with wayland or X11 or the QT version on the system.

@mw46d
Copy link

mw46d commented Feb 1, 2024

Same problem:-(
CPU: i9-13980HX
GPU: NVIDIA GPU NVIDIA RTX 2000 Ada Generation Laptop GPU
Kubuntu 22.04 & Humble fully updated (running X-server)
Nvidia driver: 545.29.06

glmark2 (defaults to Mesa/Intel GPU) works fine
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glmark2 (to force the nvidia GLX/GL implementation) works as well

rviz2 and
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia rviz2
both show the flickering:-(

With LD_DEBUG=files ..., you can actually see, which shared libraries are loaded 'during startup' of the process;-)

Addition 20240201:
Can anybody seeing this problem check if they have 'screen scaling' enabled?! For me, when I have
QT_SCREEN_SCALE_FACTORS=eDP-1=1.75;DP-1-1.3=1.75;DP-1-0=1.75;DP-1-1=1.75;DP-1-2=1.75;DP-1-3=1.75;HDMI-1-0=1.75;
in the environment, rviz2 flickers. But starting a new shell, un-setting QT_SCREEN_SCALE_FACTORS and starting rviz2 in there, I did not see the flickering yet.
That would point to some QT issue ?! But with a sample of one, it's hard to know:-(

Maybe flameshot-org/flameshot#564 (comment) is related?!

@DerProfessor
Copy link

For me it works to set QT_SCREEN_SCALE_FACTORS=1 before running rviz2. This seems to be related to #1052.

@mw46d
Copy link

mw46d commented Feb 23, 2024

Yeah;-) or setting it to '1' archives the same thing. No scaling for HighRes monitors. I created a little rviz2 script, so I don't forget;-)

#!/usr/bin/bash

unset QT_SCREEN_SCALE_FACTORS
exec /opt/ros/$ROS_DISTRO/bin/rviz2 "$@"

@macmacal
Copy link

macmacal commented Feb 29, 2024

I had similar flickering problems on Kubuntu 22.04 on laptop Lenovo Legion Pro7 (Ryzen 9 7945HX RTX 4080).

After disabling the integrated AMD graphics I run into a problem with the global scale on Qt applications (which seems related to this issue). To overcome this I just set the global scale to the minimal value above 100% (i.e. 106,25%):

image

After that modifications RViz2 was still working fine, until some system update for Plasma / ROS Humble packages.

For me it works to set QT_SCREEN_SCALE_FACTORS=1 before running rviz2. This seems to be related to #1052.

This works like a charm, many thanks!

@TheRealBeef
Copy link

Interestingly, I have the same issue, but it persists regardless of the DPI setting for me. I also tried setting via commandline the QT_SCREEN_SCALE_FACTORS=1 and also unsetting the scale factors as well.

I'm running Ubuntu 22.04 on a laptop with Nvidia GPU and this happens both in Mate and in KDE desktops although with KDE I can do what's in the original post and stop compositing so it doesn't flicker so long as I don't alter the size of the windows (not sure yet how to do that in Mate).

It flickers not just the world visualization but also any images that are displayed in their own boxes as well.

@Frank1126lin
Copy link

Same issue, adjust the display setting screen scale to 1, that problem fixed. But the words get too small to see clearly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

7 participants