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 screen flickering when enable HiDPI #1052

Open
byeongkyu opened this issue Aug 30, 2023 · 6 comments
Open

rviz2 screen flickering when enable HiDPI #1052

byeongkyu opened this issue Aug 30, 2023 · 6 comments
Labels

Comments

@byeongkyu
Copy link

ROS2 distro: Humble
Issue: rviz2 screen flickering when enable HiDPI

When running rviz2, if environment variables such as QT_ENABLE_HIGHDPI_SCALING that activate hidpi are set, the main 3D screen flickers severely. Of course, one can use the option QT_ENABLE_HIGHDPI_SCALING=0 to deactivate hidpi, but then the proportions of the internal components are slightly off. I'm curious about what's causing this issue.

@clalancette
Copy link
Contributor

We don't have a great idea on what could be causing this. It could be a graphics driver problem or maybe something in one of the underlying libraries (OGRE or Qt). Can you please give us a lot more information about your platform, including the graphics card, driver, Linux kernel, etc?

@byeongkyu
Copy link
Author

@clalancette In my opinion, this doesn't seem to be a problem unique to me. It's a common issue on all HiDPI systems I've experienced. The graphics card I'm currently using is Nvidia, and the issue occurs on both the 20 series and 30 series. I will attach detailed spec information.

OS: Ubuntu 22.04.3 LTS x86_64
CPU: 12th Gen Intel i9-12900KF (24) @ 5.100GHz
GPU: NVIDIA 01:00.0 NVIDIA Corporation Device 2203
DE: GNOME 42.9
Shell: bash 5.1.16
Kernel: 6.2.0-26-generic

@fprott
Copy link

fprott commented Oct 20, 2023

When running rviz2, if environment variables such as QT_ENABLE_HIGHDPI_SCALING that activate hidpi are set, the main 3D screen flickers severely.

I also got that flickering issue but changing the QT_ENABLE_HIGHDPI_SCALING variable seems not to help. Can you explain how you set the system variable? Just export QT_ENABLE_HIGHDPI_SCALING=0 has no effect for me.

@byeongkyu
Copy link
Author

@fprott

When using a high-resolution monitor (4K), it's common to set the display scale to 200%. If the QT_ENABLE_HIGHDPI_SCALING option is not used in this case, the size of Qt's resources may not match, leading to misaligned UI sizes. Of course, it's possible to use it without turning on the QT_ENABLE_HIGHDPI_SCALING option, but isn't it necessary for a more beautiful UI?

@vembacher
Copy link

When running rviz2, if environment variables such as QT_ENABLE_HIGHDPI_SCALING that activate hidpi are set, the main 3D screen flickers severely.

I also got that flickering issue but changing the QT_ENABLE_HIGHDPI_SCALING variable seems not to help. Can you explain how you set the system variable? Just export QT_ENABLE_HIGHDPI_SCALING=0 has no effect for me.

Changing QT_SCREEN_SCALE_FACTORS to 1 for each display output worked for me when QT_ENABLE_HIGHDPI_SCALING did not help.

Just echo the variable, then export it with the altered value and finally launch rviz2 from the same shell.

@TheRealBeef
Copy link

Cross-posting from the related topic.

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 of issue #1079 and stop compositing so it doesn't flicker - so long as I don't alter the size of the windows. Once they've been altered in any way then it starts flickering and won't stop.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants