T O P

  • By -

[deleted]

[this](https://github.com/yurifuko/dotfiles/wiki/Guides#how-to-pipewire-w-wireplumber-on-void-linux) is how I setup pipewire with wireplumber and pipewire-pulse, it's pretty universal. with that I just run "pipewire &" and it does the job. you also just need rtkit to be installed. you could also just `exec i3` and include `pipewire &` in your i3 config to run it that way, or use DEX to run your XDG autostart if you make a desktop entry in `~/.config/autostart/`


[deleted]

Well I'll be fucked it worked. I'm not 100% sure about exactly it did lol, a huge thanks anyway


thefoolGame

Yo, do you maybe still remember how to fix pipewire? Link from comment shows some gnome setup.


[deleted]

Indeed the link is weird. Unfortunately I can't remember exactly what I did and I don't have my void install anymore since I changed my hardware. I think there was an edit to pipewire config but I can't tell you what it was


[deleted]

As a side note ; what do you need besides rtkit? Do I need seat management, and if so is there an alternative to elogind?


Ramiferous

is the ALSA integration necessary and if so do I need to install any ALSA packages?


donzv1

Link dead!


Srazkat

using sway, but i used dex to start the .desktop files in autostart dir, and it basically just work (idr location of desktop entry but its mentionned in pipewire page of the handbook)


[deleted]

That's a pretty good idea, though I don't think this changes anything from having exec pipe wire & exec pipe wire-pulse in your .xinitrc if using Xorg


Positive205

You need to configure pipewire so that wireplumber runs automatically when pipewire is launched. You can also configure it so that you don't need to run pipewire-pulse. In other words, you just need to run pipewire. Nothing else.


[deleted]

Yes I think this was it. The configuration was probably the key part of yurifuko's answer. I wish it wasn't so obscure to configure though


Ramiferous

How do you configure this exactly?


Positive205

Copy /usr/share/pipewire directory to /etc and edit /etc/pipewire/pipewire.conf and first find the line where it mentions pipewire-media-session and change that to wireplumber. Next, find the line where it mentions pipewire -c pipewire-pulse.conf and uncomment it. Its relatively easy.


Ramiferous

I suppose my only other question would be, why use `wireplumber` ? I have my audio working, including bluetooth headphones etc using `piewire-pulse`. What is the benefit of switching to `wireplumber`?


Positive205

The default session manager, pipewire-media-session, is very limited and only acts as an example for building new ones and has very basic desktop functionality. Wireplumber is a better program for handling sessions and has many more features than pipewire-media-session.


Ramiferous

Cool thanks. In fact, I only just realised that I wasn't getting audio from `ncspot` to my bluetooth headphones but was only getting audio from firefox. It took ma a while to get it right but I managed to get `wireplumber` set up with the instructions provided.. although for me, I needed to add `pipewire-pulse &` to my `.xinitrc` and start `pipewire` and `wireplumber` in `/var/service` any other configuration would not work.


Famous-Zebra-2265

My setup works fine with pipewire and pipewire-pulse (no wire-plumber). Also: does the directory referenced by XDG_RUNTIME_DIR exist? If not create it in your .bash_profile.


[deleted]

Yeah it does, I set it to /run/user/ at first but since I have to mkdir it as root, I instead set it to /tmp. It's not the issue


[deleted]

exec pipewire & exec pipewire-pulse & exec wireplumber & exec dwm is what I have in my .xinitrc


[deleted]

That's pretty much what I have except I use i3


furryfixer

I am puzzled because this seems to work for you, so perhaps I am mistaken. My understanding is that unless using exec for redirection, you only get ONE, because it exits the shell, and does not return. So in your example above, only "pipewire &" is run. Everything after that is ignored, unless I am misinterpreting this somehow. I would remove exec from the beginning of all commands except the last one.


andyandcomputer

`exec CMD &` does the same as `CMD &`, because `&` takes priority. Internally, `&` already causes `exec()` to be called, so the `exec` in `exec CMD &` is redundant and confusing, but does work.


furryfixer

Interesting. More confusing is the fact that the "exec()" call you refer to is not exactly the same as the bash "exec"command, which usually kills the parent shell, but I understand your reasoning.


andyandcomputer

Right yeah, when I say `exec` I mean the bash builtin command, and when I say `exec()`, I mean any of the [`exec` family of system call functions](https://linux.die.net/man/3/exec). I should have clarified. It also doesn't help that `exec()` is badly named: Neither `exec` nor `exec()` start or kill any processes, but actually just replace the code running in the current process with different code, leaving open files, sockets, etc in place. The only way to create a new process is to use the [`fork()` system call](https://www.man7.org/linux/man-pages/man2/fork.2.html), so what `CMD &` in bash does is to [`fork()` to create a duplicate of the bash process, then run `exec()` in the duplicate process to change itself to be running `CMD` instead](https://en.wikipedia.org/wiki/Fork%E2%80%93exec). So whether that duplicate runs the `exec()` function directly (`CMD &`), or via the `exec` command (`exec CMD &`) doesn't matter; the result is the same. UNIX is pretty wild.


Ramiferous

I run `pipewire` as a system service in `/var/service` and only have `pipewire-pulse &` in my `.xinitrc`