pw_utils: Wait for frame completion before queueing

Without explicit sync, we have no way to signal the PipeWire consumer when the
rendering is done. So, wait until it's done before giving it the frame.

This should fix flickering screencasts on NVIDIA.
This commit is contained in:
Ivan Molodetskikh
2025-08-03 13:29:48 +03:00
parent 15b4acc17e
commit f49ecc31c4
5 changed files with 101 additions and 80 deletions
-17
View File
@@ -21,7 +21,6 @@ debug {
force-pipewire-invalid-modifier
dbus-interfaces-in-non-session-instances
wait-for-frame-completion-before-queueing
wait-for-frame-completion-in-pipewire
emulate-zero-presentation-time
disable-resize-throttling
disable-transactions
@@ -155,22 +154,6 @@ debug {
}
```
### `wait-for-frame-completion-in-pipewire`
<sup>Since: 25.05</sup>
Wait until every screencast frame is done rendering before handing it over to PipeWire.
Sometimes helps on NVIDIA to prevent glitched frames when screencasting.
This debug flag will eventually be removed once we handle this properly (via explicit sync in PipeWire).
```kdl
debug {
wait-for-frame-completion-in-pipewire
}
```
### `emulate-zero-presentation-time`
Emulate zero (unknown) presentation time returned from DRM.
+3 -1
View File
@@ -42,9 +42,11 @@ The fix shipped in the driver at the time of writing uses a value of 0, while th
### Screencast flickering fix
<sup>Until: next release</sup>
If you have screencast glitches or flickering on NVIDIA, set this in the niri config:
```kdl
```kdl,must-fail
debug {
wait-for-frame-completion-in-pipewire
}