SUMMARY When browsing folders within the file dialog in Wayland, bad tearing can happen, making the dialog unusable. This can always be reproduced with Firefox (version 94.0.1), but only occasionally with other applications (I also got it reliably when trying to choose a new notification sound in System Settings). STEPS TO REPRODUCE 1. Open the file dialog from Firefox 2. Try to browse OBSERVED RESULT The folder view tears badly, making the dialog unusable. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.23.2 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.2 Kernel Version: 5.14.16-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 4 × Intel® Core™ i5-7200U CPU @ 2.50GHz Memory: 7.7 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 620
Can you attach a screenshot?
Created attachment 143406 [details] Tearing in file dialog. Here is a screenshot of the bug occurring. The application used to trigger this is Firefox with "widget.use-xdg-desktop-portal" enabled in about:config.
Thanks. Looks like content from Dolphin is leaking into the render buffer for this window. Moving to KWin.
I think I see the same thing, additional information how I reproduce this: 1. Open app that uses the KDE file dialog (tested with Ark, Kate, Firefox), try to open a file 2. Everything seems fine first 3. Ensure that the information pane on the right side (F11) in file dialog is enabled 4. Go to a directory that contains archive files (e.g. /var/log on my system) 5. Hover over files/scroll. 6. Graphical corruptions start to appear (see attached screenshot). 7. The graphical corruptions will appear in every directory until the file dialog gets closed. 8. If I invoke the MinimizeAll kwin function, the corruptions on an open file dialog go away temporarily until I scroll or hover over the items. (Minimizing the dialog window with via minimize button from the title bar leaves the corrupted window content unchanged.) Workaround: Disable the information pane in file dialog (F11). I'll try to check if this is maybe a regression in the KDE Frameworks update to 5.88 that I installed this morning. My system: Kubuntu 21.10 with Kubuntu-backports Plasma 5.23.3 Frameworks 5.88.0 Graphics: Asus AMD Radeon R7 240 Kind regards, Jan
Created attachment 143601 [details] Graphical corruptions in file dialog
Oh, my bad, the original report is from a system with Frameworks 5.87, so it doesn't seem to be a regression (I can also reproduce the bug with an alternate installation with fresh home dir containing Frameworks 5.87).
Please do not move bugs to kwin unless you have proved kwin is responsible. You can add the wayland keyword.
It's the issue seen before. QWidget::winId() called on a non-toplevel First QPlatformWindow #10 0x00007ffff5d6f6ce in QWidget::winId (this=0x55555f2023e0) at ../../include/QtWidgets/../../../../../src/Qt5/qtbase/src/widgets/kernel/qwidget.h:132 #11 0x00007ffff01aef0d in KDEPlatformFileDialogHelper::restoreSize (this=0x55555efd5ef0) Second QPlatformWindow #10 0x00007ffff5d7b760 in QWidget::setVisible (this=this@entry=0x7fffffffc610, visible=visible@entry=true) at /home/david/projects/kde5/src/Qt5/qtbase/src/widgets/kernel/qwidget.cpp:8044 #11 0x00007ffff5f79542 in QDialog::setVisible (this=this@entry=0x7fffffffc610, visible=visible@entry=true) note how this is a different widget. Code in KDEPlatformFileDialogHelper is probably wrong.
Edit, it's not quite the same. The window parent is null in both cases. Though it's still a bit odd that we're creating two platform windows when we open the open dialog.
Edit again. It was the same bug, just I had the wrong traces. There are two windows for the native and built-in dialog. That's fine. But it's this code in gstreamer (which we load randomly) that causes the subsurface issue. --Type <RET> for more, q to quit, c to continue without paging-- #29 0x00007ffff66faad7 in QWidget::setAttribute(Qt::WidgetAttribute, bool) () at /usr/lib/libQt5Widgets.so.5 #30 0x00007ffff66fa659 in QWidgetPrivate::createWinId() () at /usr/lib/libQt5Widgets.so.5 #31 0x00007ffff66fc6c5 in QWidget::winId() const () at /usr/lib/libQt5Widgets.so.5 #32 0x00007fffd02cd341 in Phonon::Gstreamer::VideoWidget::setupVideoBin() (this=this@entry= 0x555555ed12a0) at /home/david/projects/kde5/src/kdesupport/phonon-gstreamer/gstreamer/videowidget.cpp:171 #33 0x00007fffd02cd1eb in Phonon::Gstreamer::VideoWidget::VideoWidget(Phonon::Gstreamer::Backend*, QWidget*) (this=0x555555ed12a0, backend=<optimized out>, parent=<optimized out>) at /home/david/projects/kde5/src/kdesupport/phonon-gstreamer/gstreamer/videowidget.cpp:65 #34 0x00007fffd02aae00 in Phonon::Gstreamer::Backend::createObject(Phonon::BackendInterface::Class, QObject*, QList<QVariant> const&) (this=0x555555f98700, c=Phonon::BackendInterface::VideoWidgetClass, parent=0x5555562c3dd0, args=<optimized out>) at /home/david/projects/kde5/src/kdesupport/phonon-gstreamer/gstreamer/backend.cpp:173 #35 0x00007fffe0099004 in Phonon::Factory::createVideoWidget(QObject*) (parent=0x5555562c3dd0) at /home/david/projects/kde5/src/kdesupport/phonon/phonon/factory.cpp:294 #36 0x00007fffe00c8f41 in Phonon::VideoWidgetPrivate::createBackendObject() (this=0x5555562d1380) at /home/david/projects/kde5/src/kdesupport/phonon/phonon/videowidget.cpp:76 #37 0x00007fffe00c8e52 in Phonon::VideoWidget::VideoWidget(QWidget*) (this=0x5555562c3dd0, parent=<optimized out>) at /home/david/projects/kde5/src/kdesupport/phonon/phonon/videowidget.cpp:46 #38 0x00007fffe098f5ca in KFileAudioPreview::KFileAudioPreview(QWidget*, QList<QVariant> const&) (this= 0x555555f5c3c0, parent=0x555555e9b410) QWidget *parentWidget = qobject_cast<QWidget*>(parent()); if (parentWidget) { parentWidget->winId(); // Due to some existing issues with alien in 4.4, this should obviously be parentWidget->window()->winId();
A possibly relevant merge request was started @ https://invent.kde.org/libraries/phonon-gstreamer/-/merge_requests/2
Git commit bbbb160f30a394655cff9398d17961142388b0f2 by David Edmundson. Committed on 19/11/2021 at 14:03. Pushed by davidedmundson into branch 'master'. Only create window handles for actual windows winId() creates a platform window for the given widget. This makes sense for the topmost widget in a tree, we can't assume the parent widget is the topmost widget. Doing this on XCB is confusing and wrong, but apparently harmless. Doing this on wayland causes issues as we promote the parent window to a subsurface but never show that window leaving things in a bizarre corrupt state that leads to content not updating. M +3 -3 gstreamer/videowidget.cpp https://invent.kde.org/libraries/phonon-gstreamer/commit/bbbb160f30a394655cff9398d17961142388b0f2
*** Bug 450199 has been marked as a duplicate of this bug. ***
*** Bug 415137 has been marked as a duplicate of this bug. ***
*** Bug 454795 has been marked as a duplicate of this bug. ***
Hello, I'm able to reproduce this on KDE Plasma 5.24.5 on a Wayland session: https://www.reddit.com/r/kde/comments/vbwige/firefox_vs_qtplasma_file_picker_and_visual/
*** Bug 457559 has been marked as a duplicate of this bug. ***
Hello, this bug has been marked as fixed for a good while, but there hasn't been a Phonon release since then to distribute the fix. Could it be possible to do a new minor release of Phonon, or at least recommend distros to include this patch, since this has long persisted as a serious usability problem on Wayland?
you can install the following package from AUR https://aur.archlinux.org/packages/phonon-qt5-gstreamer-git or open a report in Arch bug tracker asking for the patch that fixes the bug.
See https://invent.kde.org/libraries/phonon-gstreamer/-/issues/1
*** Bug 461589 has been marked as a duplicate of this bug. ***
*** Bug 477640 has been marked as a duplicate of this bug. ***
*** Bug 450595 has been marked as a duplicate of this bug. ***