diff --git a/src/daemon/main.c b/src/daemon/main.c index a9c1bff6d..f79fc5bcb 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -122,10 +122,13 @@ static int load_module(struct data *d, const char *key, const char *args, const if (errno == ENOENT && flags && strstr(flags, "ifexists") != NULL) { pw_log_debug(NAME" %p: skipping unavailable module %s", d, key); - } else { + } else if (flags == NULL || strstr(flags, "nofail") == NULL) { pw_log_error(NAME" %p: could not load module \"%s\": %m", d, key); return -errno; + } else { + pw_log_info(NAME" %p: could not load module \"%s\": %m", + d, key); } } return 0; diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in index e052fa374..5f00d0793 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in @@ -40,12 +40,16 @@ spa-libs = { modules = { ## = { [args = "= ..."] - # [flags = ifexists] } + # [flags = [ifexists]|[nofail]} # - # Loads a module with the given parameters. Normally failure is - # fatal if the module is not found, unless -ifexists is given. + # Loads a module with the given parameters. + # If ifexists is given, the module is ignoed when it is not found. + # If nofail is given, module initialization failures are ignored. # - libpipewire-module-rtkit = { "#args" = "rt.prio=20 rt.time.soft=200000 rt.time.hard=200000" flags=ifexists } + libpipewire-module-rtkit = { + "#args" = "rt.prio=20 rt.time.soft=200000 rt.time.hard=200000" + flags = ifexists|nofail + } libpipewire-module-protocol-native = null libpipewire-module-profiler = null libpipewire-module-metadata = null