Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipewire does not run properly and there is no input source created. #173

Open
Pragmer opened this issue Jul 20, 2023 · 6 comments
Open

Comments

@Pragmer
Copy link

Pragmer commented Jul 20, 2023

I am using Linux Mint 21.2, Kernel version is 5.19.0-46-generic, Desktop Environment is Cinnamon. I will try to provide more info upon request.

Going to describe what I did to install it in case I was being dumb and misunderstood the instructions, causing the issue.
I downloaded the .zip, extracted the folder to my Home folder, created /home/leaderofthe00fkins/.config/pipewire/pipewire.conf.d/99-input-denoising.conf and pasted the configuration. I altered the path in the config to /home/leaderofthe00fkins/linux-rnnoise/ladspa/librnnoise_ladspa.so and left the VAD settings as default. I continued with "systemctl restart --user pipewire.service" as instructed. From the text in the guide it seems like, essentially, a new audio input device should have been created with the name "Noise Canceling source".

My issue is that no Input device was created after following the instructions. There was no output in the terminal when using the pipewire restart command. I tried looking at certain things I had seen other users check, like using the command "journalctl -b | grep pipewire" and trying to run the config directly with "pipewire -c ~/.config/pipewire/pipewire.conf.d/99-input-denoising.conf". The outputs of these are the following:

journalctl -b | grep pipewire
Jul 19 19:19:04 pejassupercomputer dbus-daemon[1327]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.33' (uid=112 pid=1830 comm="/usr/bin/pipewire " label="unconfined")
Jul 19 19:58:52 pejassupercomputer sudo[16172]: leaderofthe00fkins : TTY=pts/0 ; PWD=/home/leaderofthe00fkins ; USER=root ; COMMAND=/usr/local/bin/apt search pipewire
Jul 19 20:35:32 pejassupercomputer sudo[18349]: leaderofthe00fkins : TTY=pts/0 ; PWD=/home/leaderofthe00fkins ; USER=root ; COMMAND=/usr/local/bin/apt install pipewire
Jul 19 20:41:57 pejassupercomputer pipewire[21995]: mod.protocol-native: server 0x55ba80c129f0: unable to lock lockfile '/run/user/1000/pipewire-0.lock': Resource temporarily unavailable (maybe another daemon is running)
Jul 19 20:41:57 pejassupercomputer pipewire[21995]: pw.conf: 0x55ba80bf7130: could not load mandatory module "libpipewire-module-protocol-native": Resource temporarily unavailable
Jul 19 20:41:57 pejassupercomputer pipewire[21995]: default: failed to create context: Resource temporarily unavailable
Jul 19 20:42:02 pejassupercomputer pipewire[22008]: mod.protocol-native: server 0x55a321a839f0: unable to lock lockfile '/run/user/1000/pipewire-0.lock': Resource temporarily unavailable (maybe another daemon is running)
Jul 19 20:42:02 pejassupercomputer pipewire[22008]: pw.conf: 0x55a321a68130: could not load mandatory module "libpipewire-module-protocol-native": Resource temporarily unavailable
Jul 19 20:42:02 pejassupercomputer pipewire[22008]: default: failed to create context: Resource temporarily unavailable
Jul 19 20:43:00 pejassupercomputer pipewire[22042]: mod.protocol-native: server 0x556699f469f0: unable to lock lockfile '/run/user/1000/pipewire-0.lock': Resource temporarily unavailable (maybe another daemon is running)
Jul 19 20:43:00 pejassupercomputer pipewire[22042]: pw.conf: 0x556699f2b130: could not load mandatory module "libpipewire-module-protocol-native": Resource temporarily unavailable
Jul 19 20:43:00 pejassupercomputer pipewire[22042]: default: failed to create context: Resource temporarily unavailable
Jul 19 20:48:19 pejassupercomputer pipewire[22231]: mod.protocol-native: server 0x557a6b1a8a20: unable to lock lockfile '/run/user/1000/pipewire-0.lock': Resource temporarily unavailable (maybe another daemon is running)
Jul 19 20:48:19 pejassupercomputer pipewire[22231]: pw.conf: 0x557a6b18d160: could not load mandatory module "libpipewire-module-protocol-native": Resource temporarily unavailable
Jul 19 20:48:19 pejassupercomputer pipewire[22231]: default: failed to create context: Resource temporarily unavailable
pipewire -c ~/.config/pipewire/pipewire.conf.d/99-input-denoising.conf
[E][09231.036044] pw.core      | [          core.c:  382 core_new()] 0x565116967350: can't find protocol 'PipeWire:Protocol:Native': Operation not supported
[E][09231.036067] mod.filter-chain | [module-filter-ch: 1782 pipewire__module_init()] can't connect: Operation not supported
[E][09231.036103] pw.conf      | [          conf.c:  560 load_module()] 0x565116938190: could not load mandatory module "libpipewire-module-filter-chain": Operation not supported
[E][09231.036124] default      | [      pipewire.c:  123 main()] failed to create context: Operation not supported

Another command I saw, which was to check the running instances of pipewire I think, "ps ax | grep pipewire". This command returned the following before the config execution.

  24068 ?        S<sl   0:00 /usr/bin/pipewire
  24204 pts/0    S+     0:00 grep --color=auto pipewire

The same command returned this after manually running pipewire with -c and the config path.

  24068 ?        S<sl   0:00 /usr/bin/pipewire
  26562 ?        Sl     0:00 xed /home/leaderofthe00fkins/.config/pipewire/pipewire.conf.d/99-input-denoising.conf
  27052 pts/0    S+     0:00 grep --color=auto pipewire

As far as I can tell they are at least running, just not doing what is supposed to be done.
Not sure what else to say, I don't really know where to go from here.

@pallaswept
Copy link
Contributor

I altered the path in the config to /home/leaderofthe00fkins/linux-rnnoise/ladspa/librnnoise_ladspa.so

This is not the correct procedure. Refer to the documentation at https://docs.pipewire.org/page_module_filter_chain.html, note that you should not specify the .so extension of the file, as it is automatically appended. Also, you should place the .so file in your existing LADSPA plugin path. To quote the relevant portion of the doc:

plugin is the type specific plugin name.

    For LADSPA plugins it will append .so to find the shared object with that name in the LADSPA plugin path.

The correct LADSPA plugin path will vary depending on your distro, by default on linux it will be /usr/local/lib/ladspa or /usr/lib/ladspa or /usr/local/lib64/ladspa or /usr/lib64/ladspa... you can get a strong hint if you have installed any by using your package manager, by running listplugins, as it will list all installed plugins and the paths to their files. You could set the path manually by altering your pipewire systemd unit file and setting the environment variable LADSPA_PATH but that would be a pretty intrusive way to go about it. Better to just put the plugin in the right spot.

Perhaps if you could include the conf file you have created it would help to find whatever other errors might be preventing it from working. The path you have specified ( ~/.config/pipewire/pipewire.conf.d/99-input-denoising.conf) should be functional, so something in that file is wrong. At the very least, it's that you've added that ".so" to the plugin path and the file is not in the correct location.

Also, these errors you're seeing are not normal:

Jul 19 20:41:57 pejassupercomputer pipewire[21995]: mod.protocol-native: server 0x55ba80c129f0: unable to lock lockfile '/run/user/1000/pipewire-0.lock': Resource temporarily unavailable (maybe another daemon is running)
Jul 19 20:41:57 pejassupercomputer pipewire[21995]: pw.conf: 0x55ba80bf7130: could not load mandatory module "libpipewire-module-protocol-native": Resource temporarily unavailable
Jul 19 20:41:57 pejassupercomputer pipewire[21995]: default: failed to create context: Resource temporarily unavailable

It seems like you've tried to start pipewire while it's already running. It may be a result of your attempts to load the config file manually (with pipewire -c)which you should do as an alternative to, not in addition to, placing the config file as you have and creating a split-file configuration which should already have loaded the conf file with pipewire's daemon.

The same command returned this after manually running pipewire with -c and the config path.

  24068 ?        S<sl   0:00 /usr/bin/pipewire
  26562 ?        Sl     0:00 xed /home/leaderofthe00fkins/.config/pipewire/pipewire.conf.d/99-input-denoising.conf
  27052 pts/0    S+     0:00 grep --color=auto pipewire

This just shows that pipewire is running (as before) and also you're presently editing the config file in xed. You can use the command pw-config to ensure that your split-file configuration is effective and the conf file has been loaded with pipewire, and pw-dump to dump the current status of the entire daemon, which should include the modules and nodes you've created with the conf file. pw-dump | grep rnnnoise will give you a quick check if you don't want to read the entire dump.

Hope this helps.

@Danie10
Copy link

Danie10 commented Sep 1, 2023

For LADSPA plugins it will append .so to find the shared object with that name in the LADSPA plugin path

The readme for this project does include the .so, so this got me too.

@pallaswept
Copy link
Contributor

For LADSPA plugins it will append .so to find the shared object with that name in the LADSPA plugin path

The readme for this project does include the .so, so this got me too.

I hadn't noticed that - I used the example from the pipewire source as my starting point and it 'just worked' so I never even got so far as reading the readme here, but the readme here is ... well... it's not right.

@werman I could go ahead and create a PR with an updated readme for you, if you like, but I reckon it's probably easy fixed for you. Please let me know if you'd like me to take care of it. I appreciate the plugin very much.

@Danie10
Copy link

Danie10 commented Sep 3, 2023

I still had trouble with the default instructions getting the AUR package to work on Manjaro, but the instructions at https://medium.com/@gamunu/linux-noise-cancellation-b9f997f6764d worked 100% for me. It included some additional steps that can maybe be considered for the README.

@pallaswept
Copy link
Contributor

I still had trouble with the default instructions getting the AUR package to work on Manjaro, but the instructions at https://medium.com/@gamunu/linux-noise-cancellation-b9f997f6764d worked 100% for me. It included some additional steps that can maybe be considered for the README.

There are a lot of unnecessary/just wrong steps in those instructions. You don't need to create a systemd service to execute it, you just use split file configuration and it loads with pipewire - and when you put the conf file where pipewire's example says to do it, instead of where that page says to do it which is wrong, that's exactly what happens, so the whole of section 3 is redundant because of step 1. As for step 2, that config file contains instructions to disable logging (not a great idea) and then load, for this feature to function, modules that are unrelated and unneeded since they are already loaded by the default configuration file which is still in place. And then it says to use the plugin path including the path to the file which is unneeded because the package manager used in step 1 should have installed the plugin to one of the standard plugin locations (and the path they show is one of them) that are searched without specifying a path, and then it says to use the .so extension which is wrong (see the documentation quote/link above for the authoritative source of this)

Ironically, if you remove the unnecessary and erroneous parts of the file in step 2, you are left with exactly the file that pipewire provide as an example (the one I linked above).

Most of that page is telling you how to do it wrong and definitely shouldn't be going into the readme here. I'm glad you got it working though :)

@pallaswept
Copy link
Contributor

@Pragmer probably time to resolve this issue mate. The answers are right there and known to work, and this repo seems abandoned so nobody else is gonna clean up this thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants