| Summary: | kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_ALLOC" when Kwin tries to update the cursor image | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | postix <postix> |
| Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nate, postix, xaver.hugl |
| Priority: | NOR | Keywords: | wayland-only |
| Version First Reported In: | 5.25.2 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/commit/f4e917f734056d9e957aeb2af7e9687a4beb7bc8 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: |
kWin Support Info
journalctl | grep -i kwin > journalctl.txt |
||
So I looked through Mesa and the only situation I can see where EGL_BAD_ALLOC can be caused is when the surface never got rendered to. In KWin all code paths do render to the cursor surface though... Are there any other errors or warnings from kwin in the log? Created attachment 150678 [details] journalctl | grep -i kwin > journalctl.txt (In reply to Zamundaaa from comment #1) > Are there any other errors or warnings from kwin in the log? Yes there are. Here's the journalctl output regarding kwin for the last two days. There are often but not always the following log lines `kwin_wayland[2823]: QMetaProperty::read: Unable to handle unregistered datatype 'KWin::SessionState' for property 'KWin::EffectsHandlerImpl::sessionState'` or `kwin_screencast: Dropping a screencast cursor update because the compositor is slow` followed by `kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_ALLOC"` At least that is what was most obvious to me at a first glance. Thanks for looking into it. Regarding the SUMMARY of the OT: The EGL error is not always reported when moving the cursor. So at this state, it's not clear to me by what the issue is initially triggered. The warning will only be printed when the cursor image changes, as that's the only time that KWin tries to repaint the cursor.
Of the other warnings, none are really relevant.
One thing we can try is if you put
> KWIN_DRM_NO_AMS=1
into /etc/environment and reboot. Do the warnings go away with that?
I had seen it between Jun 16 and Jul 15, but the issue seem to have disappeared since then. I will change the status of the report to "waiting for info" and add the requested information whenever it appears again. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! So this warning is now appearing on my laptop as well, it happens after I plug in a new monitor and then remove it again. The cause is that one or even two of the cursor buffers got stored on the plane for the second monitor and never released, which sometimes causes Mesa to run out of buffers for the surface. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2814 Git commit f4e917f734056d9e957aeb2af7e9687a4beb7bc8 by Xaver Hugl. Committed on 12/08/2022 at 19:52. Pushed by zamundaaa into branch 'master'. backends/drm: release buffers for disabled objects M +1 -0 src/backends/drm/drm_object_plane.cpp M +9 -2 src/backends/drm/drm_pipeline.cpp https://invent.kde.org/plasma/kwin/commit/f4e917f734056d9e957aeb2af7e9687a4beb7bc8 |
Created attachment 150589 [details] kWin Support Info SUMMARY When moving the cursor eg over - the content in Firefox - between two different windows - between two elements of a window like Konsole's tabbar and Konsole's content journalctl gets spammed with kwin_wayland[2823]: kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_ALLOC" SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20220711 KDE Plasma Version: 5.25.2 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5 Kernel Version: 5.18.9-2-default (64-bit) Graphics Platform: Wayland Graphics Processor: AMD Radeon RX 580 Series