Skip to main content
Topic: Making pipewire run at startup (Read 2765 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Making pipewire run at startup

Alright, I've put off getting this settled long enough. After digging, a few months ago, I figured out how to get pipewire to function properly. However, it's tedious. Upon every login, I have to run "pipewire" "pipewire-pulse" "pipewire-media-session" and "sudo modprobe snd-hda-intel" in separate terminal tabs and just leave the pipewire commands running.

How can I just make this just werk on startup? I've tried various scripts to no avail.

Re: Making pipewire run at startup

Reply #1
I have plasma starting mine in settings, some possibly add it to their .zshrc or .bashrc but ofc if you add it to your shell settings, you'd need to do something like pipewire && pipewire-pulse && pipewire-media-session && or so..

Re: Making pipewire run at startup

Reply #2
The script you need is pretty simple:
Code: [Select]
pipewire &
pipewire-pulse &
pipewire-media-session &
I've just added these lines to my openbox starting script, but you can make a separate script and start it via xdg-init, xinitrc or whatever.

Moreover, some Artix init systems provide you with an option of making user services, namely s6 and runit, you can use this feature to start pipewire.

Re: Making pipewire run at startup

Reply #3
So that script worked fine, gets pipewire up and running no problem. However, I can't get a script to work with "sudo modprobe snd-hda-intel", likely because of something to do with root permissions. I can add the command separately as a startup application in Plasma settings, but then I have to enter my password in a terminal after every login. I'm sure there's a way to get root commands to run on login without user input, I'm just a total noob with scripts.
I use s6, so yeah there's gotta be something handy there.

Re: Making pipewire run at startup

Reply #4
So that script worked fine, gets pipewire up and running no problem. However, I can't get a script to work with "sudo modprobe snd-hda-intel", likely because of something to do with root permissions.

You don't have to resort to calling sudo.

https://wiki.archlinux.org/title/Kernel_module

Add a .conf file like
Code: [Select]
snd-hda-intel
to /etc/modules-load.d and the corresponding module should be loaded on startup.

By the way, https://wiki.artixlinux.org/Site/PipewireInsteadPulseaudio

Re: Making pipewire run at startup

Reply #5
You don't have to resort to calling sudo.

https://wiki.archlinux.org/title/Kernel_module

Add a .conf file like
Code: [Select]
snd-hda-intel
to /etc/modules-load.d and the corresponding module should be loaded on startup.

By the way, https://wiki.artixlinux.org/Site/PipewireInsteadPulseaudio
I've tried
Code: [Select]
sudo nano /etc/modules-load.d/intel.conf
and putting
Code: [Select]
snd-hda-intel
in the conf file. I've tried renaming intel.conf to just .conf. Didn't work either way. Am I missing something? It should be noted that I didn't have to manually modprobe snd-hda-intel until around mid summer, before pipewire. Maybe something obscure is still too broken to allow snd-hda-intel to be loaded on startup.

Re: Making pipewire run at startup

Reply #6
I've tried
Code: [Select]
sudo nano /etc/modules-load.d/intel.conf
and putting
Code: [Select]
snd-hda-intel
in the conf file. I've tried renaming intel.conf to just .conf. Didn't work either way.
You should just end the name of your file with .conf, not name it .conf.

What init system are you using? Have you migrated from another system?