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.
This commit is contained in:
outfoxxed 2026-03-04 23:26:33 -08:00
parent a849a88893
commit 5721955686
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -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) { void PwCore::onError(void* data, quint32 id, qint32 /*seq*/, qint32 res, const char* message) {
auto* self = static_cast<PwCore*>(data); auto* self = static_cast<PwCore*>(data);
if (message != nullptr) { // Pipewire's documentation describes the error event as being fatal, however it isn't.
qCWarning(logLoop) << "Fatal pipewire error on object" << id << "with code" << res << message; // We're not sure what causes these ENOENTs on device removal, presumably something in
} else { // the teardown sequence, but they're harmless. Attempting to handle them as a fatal
qCWarning(logLoop) << "Fatal pipewire error on object" << id << "with code" << res; // 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(); emit self->fatalError();
} }