From 5721955686a474b814c27bc0ec743f86e473ac4f Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 4 Mar 2026 23:26:33 -0800 Subject: [PATCH] services/pipewire: ignore ENOENT errors Pipewire describes all errors as fatal, however these just aren't, don't seem to be squashable, and resetting for them breaks users. --- src/services/pipewire/core.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/services/pipewire/core.cpp b/src/services/pipewire/core.cpp index e40bc54..5077abe 100644 --- a/src/services/pipewire/core.cpp +++ b/src/services/pipewire/core.cpp @@ -143,12 +143,17 @@ void PwCore::onSync(void* data, quint32 id, qint32 seq) { void PwCore::onError(void* data, quint32 id, qint32 /*seq*/, qint32 res, const char* message) { auto* self = static_cast(data); - if (message != nullptr) { - qCWarning(logLoop) << "Fatal pipewire error on object" << id << "with code" << res << message; - } else { - qCWarning(logLoop) << "Fatal pipewire error on object" << id << "with code" << res; + // Pipewire's documentation describes the error event as being fatal, however it isn't. + // We're not sure what causes these ENOENTs on device removal, presumably something in + // the teardown sequence, but they're harmless. Attempting to handle them as a fatal + // error causes unnecessary triggers for shells. + if (res == -ENOENT) { + qCDebug(logLoop) << "Pipewire ENOENT on object" << id << "with code" << res << message; + return; } + qCWarning(logLoop) << "Pipewire error on object" << id << "with code" << res << message; + emit self->fatalError(); }