You are not logged in.

#1 2021-09-09 02:30:09

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

[SOLVED] QT5 artefacts when drawing windows and menus

I've noticed recently that I now see artefacts when resizing QT windows or opening and closing menus. Basically I'll get a rectangle with static that then resolves itself to the correct drawing after a few hundred milliseconds.
I'm using qt5ct to configure Qt and am currently using the kvantum-dark theme. This is on a laptop with a Intel integrated graphics chip, an NVidia card that's off most of the time and Bumblebee to use NVidia when needed.

I have the same issue with other themes and when running an application with NVidia on via e.g. primusrun.

I've had no luck searching for QT5, shearing, artefacts, etc. It could very well be some odd old configuration that I set up and forgot about but I can't find anything right now and I'm almost certain that it's a recent thing.

Does anyone have any suggestions of what I can check to debug this? I'm out of ideas.

edit: It's also only QT apps so it doesn't seem to be some sort of systemwide graphical issue.

Last edited by Xyne (2021-09-12 23:12:12)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2021-09-09 06:08:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,519

Re: [SOLVED] QT5 artefacts when drawing windows and menus

It's probably because of how Qt (assuming you're not talking 'bout QuickTime here tongue )  withdraws the menu.
There's an "Interface" tab in qt5ct which allows you to "enable gui effects" and there you can "animate" or "fade" menus (and other stuff) - regardless of a compositor.

Is any of that enabled?
Speaking of "compositor": do you use one? Does it matter?

Offline

#3 2021-09-09 13:56:23

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] QT5 artefacts when drawing windows and menus

The gui effects in qt5ct are disabled. I don't use a compositor but I've just tested picom and it at least hides the issue. I can use tht for now but I'm still interested in other potential solutions as I haven't needed a compositor until now.

Thanks for the reply.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2021-09-09 15:39:49

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,519

Re: [SOLVED] QT5 artefacts when drawing windows and menus

I have the same issue with other themes and when running an application with NVidia on via e.g. primusrun.

"Only" w/ primusrun or "also" w/ primusrun?

Does "Rectangle with static" mean like a screenshot of what was below (but doesn't update) or do you see artifacts of the menu (eg. only the background but the text is gone)?
Do you spot this because what's below is a video?
Do you get it if you "sleep 10; pkill qt_application" and have the client killed while the menu is visible?
Do you get it w/ "export QT_OPENGL=software"? (theorizing that this is a actually limited amount of QMenus and you see an invalid GL texture)

Offline

#5 2021-09-12 21:05:50

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] QT5 artefacts when drawing windows and menus

seth wrote:

"Only" w/ primusrun or "also" w/ primusrun?

"also". Same problem without nvidia support, with nvidia via primusrun and with nvidia via optirun.

seth wrote:

Does "Rectangle with static" mean like a screenshot of what was below (but doesn't update) or do you see artifacts of the menu (eg. only the background but the text is gone)?

I see random short horizontal white and black lines over what should be displayed, which then disappear upon a window update event (e.g. opening a menu may show static in the menu but it will resolve the static of the main window).
Here's a screenshot of qt5ct when it start up. Sorry for the quality but it's taken with a phone because trying to capture the actual screen updates the window and removes the static.
https://xyne.archlinux.ca/img/forum/qt_static.jpg

seth wrote:

Do you spot this because what's below is a video?

No, it occurs regardless of what is beneath the window and even if the window is the only one on the screen.

seth wrote:

Do you get it if you "sleep 10; pkill qt_application" and have the client killed while the menu is visible?

It's only visible within the application's window and as soon as the application is killed whatever was beneath it is drawn correctly.

seth wrote:

Do you get it w/ "export QT_OPENGL=software"? (theorizing that this is a actually limited amount of QMenus and you see an invalid GL texture)

Setting QT_OPENGL=software makes no different.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2021-09-12 21:15:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,866

Re: [SOLVED] QT5 artefacts when drawing windows and menus

Looks like the iris mesa bug, try downgrading mesa to 21.1.6 or update to mesa-git, see e.g. https://bbs.archlinux.org/viewtopic.php … 8#p1989018 and the linked bug report.

Offline

#7 2021-09-12 23:11:37

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] QT5 artefacts when drawing windows and menus

V1del wrote:

Looks like the iris mesa bug, try downgrading mesa to 21.1.6 or update to mesa-git, see e.g. https://bbs.archlinux.org/viewtopic.php … 8#p1989018 and the linked bug report.

Upgrading to mesa-git partly solves the problem: I still see the static when opening and resizing windows and menus but it seems to clear almost instantly afterwards. I'll mark the thread as solved and stick with mesa+picom until the fix is officially released.

Thanks to you both!


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB