[Bug 1097207] New: Resize issues with GLX windows with i965 and sw drivers
http://bugzilla.suse.com/show_bug.cgi?id=1097207 Bug ID: 1097207 Summary: Resize issues with GLX windows with i965 and sw drivers Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: X.Org Assignee: xorg-maintainer-bugs@forge.provo.novell.com Reporter: fvogt@suse.com QA Contact: xorg-maintainer-bugs@forge.provo.novell.com Found By: --- Blocker: --- There are weird redraw issued when resizing qmlscene windows on i965 machines and with LIBGL_ALWAYS_SOFTWARE=1. To reproduce, write import QtQuick 2.0 Rectangle { width: 200 height: 200 color: "red" } into test.qml and run qmlscene test.qml. When maximizing the window and restoring the size again, the window turns white. Resizing the window results in artifacts in many cases. Dragging the window onto a different monitor fixes it until the next resize. This does not happen on a nvidia workstation with the nouveau driver. It happens there with LIBGL_ALWAYS_SOFTWARE=1 though. On a machine with i965 and nouveau, the bug appears with LIBGL_ALWAYS_SOFTWARE=1, DRI_PRIME=1 and no envars. I'm not sure where in the stack the bug is as I was unable to collect any meaningful information on this behaviour. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c1 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fvogt@suse.com Flags| |needinfo?(fvogt@suse.com) --- Comment #1 from Stefan Dirsch <sndirsch@suse.com> --- Hmm. In which package can I find qmlscene? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c2 Fabian Vogt <fvogt@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(fvogt@suse.com) | --- Comment #2 from Fabian Vogt <fvogt@suse.com> --- (In reply to Stefan Dirsch from comment #1)
Hmm. In which package can I find qmlscene?
cnf qmlscene
libqt5-qtdeclarative-tools
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c3 --- Comment #3 from Stefan Dirsch <sndirsch@suse.com> --- Ok. Which desktop? How configured, i.e. with/without Compositor, etc. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c4 --- Comment #4 from Fabian Vogt <fvogt@suse.com> --- (In reply to Stefan Dirsch from comment #3)
Ok. Which desktop? How configured, i.e. with/without Compositor, etc.
I tried KDE Plasma with and without wayland, with and without compositing. Behaviour is the same in all cases. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c5 --- Comment #5 from Fabian Vogt <fvogt@suse.com> --- Just tried with icewm, same behaviour. Broken with llvmpipe, works with nouveau. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c6 Michal Srb <msrb@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msrb@suse.com --- Comment #6 from Michal Srb <msrb@suse.com> --- I was able to reproduce it with both nouveau and software rendering, on KDE with compositing and without. It happens reliably if I move the small qmlscene window away from the left top corner where it appears initially and then do the maximize and restore. I collected apitrace of it, but when replayed it shows that all rendering was done correctly and every single frame was filled with red color. It kinda looks to me like the compositor gets different (previous?) image instead of the one the application just drawn. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c7 Michal Srb <msrb@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS Assignee|xorg-maintainer-bugs@forge. |msrb@suse.com |provo.novell.com | --- Comment #7 from Michal Srb <msrb@suse.com> --- More observations: It also happens in Wayland, both Plasma and Gnome. (With nouveau.) But on X it can be prevented by setting LIBGL_DRI3_DISABLE=1. Qt re-renders the window after it receives the expose event. It seems that at that moment the main framebuffer still has the previous size. So after maximizing the rendering goes into buffer that is too small and does not cover the window. After restoring back to the 200x200 size, the rendering draws into 200x200 rectangle in left bottom corner of the framebuffer, but the window then displays 200x200 rectangle from the left top corner which contains just white color. The main framebuffer seem to be resized after the rendering is done. I am still trying to find why. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c8 --- Comment #8 from Michal Srb <msrb@suse.com> --- I just found out that if I try in Wayland and force qmlscene to actually use Wayland mode (using QT_QPA_PLATFORM=wayland), then it does not happen. It only happens when it runs under Xwayland. So it seems to be X/DRI3 issue only. Smaller area for further debugging... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c9 --- Comment #9 from Michal Srb <msrb@suse.com> --- Dumping what I debugged so far: When the window is maximized or restored, Qt renders everything twice: * As reaction to the Expose event, followed by glXSwapBuffers. * As reaction to some QTimer event, NOT followed by glXSwapBuffers! When using DRI2, Mesa reacts to the DRI2_InvalidateBuffers X11 event as soon as it is received and resizes the framebuffer at the beginning of next OpenGL call. When using DRI3, Mesa waits for first OpenGL call after glXSwapBuffers, then it retrieves events and if there was PresentConfigureNotify, it resizes the framebuffer. So the difference is that DRI2 is willing to resize the framebuffer at any point, DRI3 waits for the buffer swap. I have searched whether it is intentional and so far I have the impression that it is, although I did not find it anywhere explicitly stated. So this is what happens when maximizing and restoring the qmlscene window: * Start: window is small, framebuffer is small * Maximize clicked * PresentConfigureNotify delivered (queued in xcb) * Expose delivered - Qt will redraw, Mesa retrieves the event during the first OpenGL call and resizes the framebuffer -> Qt draws properly into the big framebuffer * Qt calls glXSwapBuffers -> the big framebuffer is delivered to the big window * QTimer event - Qt will draw again, but does not call glXSwapBuffers! -> nothing is delivered to the window * Restore clicked * PresentConfigureNotify delivered (queued in xcb) * Expose delivered - Qt will redraw, since there was no glXSwapBuffers, it is still drawing the "same" frame and the framebuffer is not resized. -> Qt draws small red rectangle into big framebuffer. * Qt calls glXSwapBuffers -> the big framebuffer is delivered to the small window, we see the wrong part of it which was cleared white * QTimer event -> Qt will draw again. This is the first OpenGL call after a swap, so the framebuffer is resized to the small size. -> Qt draws properly into the small framebuffer * No glXSwapBuffers is called! -> nothing is delivered to the window If you maximize & restore repeatedly the issue continues because the missing swap keeps the framebuffer resize delayed. If any other update repaints the window, it gets fixed until the next maximize & restore (or restore & maximize). I have not yet investigated why Qt repaints twice and why it does not call glXSwapBuffers the second time. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|msrb@suse.com | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|msrb@suse.com |xorg-maintainer-bugs@forge. | |provo.novell.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c12 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(fvogt@suse.com) --- Comment #12 from Stefan Dirsch <sndirsch@suse.com> --- Hmm. Has this improved with current TW? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c13 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |NORESPONSE --- Comment #13 from Stefan Dirsch <sndirsch@suse.com> --- Still waiting for a response for more than a month now. Please reopen once you can provide the requested feedback. Thanks. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c14 Fabian Vogt <fvogt@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|NORESPONSE |WORKSFORME Flags|needinfo?(fvogt@suse.com) | --- Comment #14 from Fabian Vogt <fvogt@suse.com> --- Looks like I missed the notification somehow. (In reply to Stefan Dirsch from comment #12)
Hmm. Has this improved with current TW?
Somewhat - the issue is still there but happens very rarely, enough for WORKSFORME for now. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1097207 http://bugzilla.suse.com/show_bug.cgi?id=1097207#c15 --- Comment #15 from Stefan Dirsch <sndirsch@suse.com> --- Ok. Thanks for feedback! -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com