https://bugs.kde.org/show_bug.cgi?id=527137

--- Comment #5 from Maximilian Meßmann <[email protected]> ---
(In reply to TraceyC from comment #1)
> This looks related to bug 521742, which was supposed to be fixed in 6.7.3
> 
> Please attach the output of
> > wayland-info
> > eglinfo
> and
> > journalctl --user-unit plasma-kwin_wayland --boot 0
> 
> Thanks.

I uploaded the outputs you requested. The journal is not from current boot but
from the last one that ended in a permanent freeze.

I am not that big of a C++ dev, so i asked Claude to try and find a possible
cause. I know, LLM bad, but I didn't want to withhold its answer from you:

```
Likely trigger, found in kpipewire (present in v6.7.5 and current master):

`PipeWireSourceStream::process()` returns the buffer to KWin right after
`handleFrame()`, which
only copies the raw plane fds. The actual EGL import happens later on the
render thread
(`PipeWireSourceItem::updatePaintNode()`), and it uses the stream's *current*
size
(`d->m_stream->size()`, pipewiresourceitem.cpp:347) instead of the frame's
`attribs.width/height`.

For window streams, KWin renegotiates whenever the window size changes
(`ScreenCastStream::record()` → `resize()`), e.g. while a new PWA window
settles and gets
quick-tiled. If that happens before the import, the old buffers' fds are closed
or reused, and
the import mixes the old buffer's fd/stride/offsets/modifier with the new size.
That explains the
`invalid image "EGL_BAD_ALLOC"` before each hang. When the stride happens to
fit, a mismatched
image may get sampled, which plausibly causes the GPU hang (unproven).

Possible fix (untested): dup the plane fds in `updateTextureDmaBuf()` and use
`attribs.width/height`. Open MR kpipewire!237 keeps `m_stream->size()` too.

Why the whole session freezes is a separate question.
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to