Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: Axel on 09 February 2022, 16:31:12

Title: PipeWire doesn't run automatically / PipeWire errors
Post by: Axel on 09 February 2022, 16:31:12
Hello Artix comrades,

First of all I would like to thank all Artix developers for this amazing linux-distro.

I have a problem with the PipeWire: it doesn't run automatically and it gives errors when I tried to start it in the terminal.

I have an Artix Linux with OpenRC system. KDE 5.24.

I installed Artix linux about 3 weeks ago (base installer). During installation I installed plasma-pa package with pulseaudio.
After installation everything worked fine. But I decided to be "progressive"  :D and install PipeWire instead of PulseAudio.

What I've done:
    - pacman -S pipewire pipewire-pulse pipewire-media-session
    - it deleted automatically pulseaudio
    - rebooted my system
    - find out that there were no sound...

I googled the problem and I thought that I've find a solution : create .xinitrc with autostart rules.
I created ~/.xinitrc with:

Code: [Select]
#!bin/sh
#
#~/.xinitrc

/usr/bin/pipewire &
/usr/bin/pipewire-pulse &
/usr/bin/pipewire-media-session &

exec startplasma-x11

But nothing worked. I also tried to add pipewire pipewire-pulse pipewire-media-session .desktop with some rules to /etc/xdg/autostart but it didn't helped.

I added to my config /etc/pipewire/pipewire.conf

Code: [Select]
context.exec = [
    #{ path = <program-name> [ args = "<arguments>" ] }
    #
    # Execute the given program with arguments.
    #
    # You can optionally start the session manager here,
    # but it is better to start it as a systemd service.
    # Run the session manager with -h for options.
    #
    #{ path = "/usr/bin/pipewire-media-session" args = "" }
    #
    # You can optionally start the pulseaudio-server here as well
    # but it is better to start it as a systemd service.
    # It can be interesting to start another daemon here that listens
    # on another address with the -a option (eg. -a tcp:4713).
    #
    #{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }
    "/usr/bin/pipewire-pulse" = { "#args" = "-a tcp:4713" }
]

I tried to replace pipewire-media-session with wireplumber 0.4.8, but it didn't work at all. So I swithed back to pipewire-media-session.

So I can have sound when I excecute pipewire, pipewire-pulse and pipewire-media-session from /usr/bin manually, but I want to atoumatise it.
Also I have found a strange bug: when I execute manually pipewire and pipewire-pulse i have sound and I have devices in plasma-pa. But when I execute pipewire-media-session it doubles all my devices in plasma-pa...

When I start pipewire, pipewire-pulse and pipewire-media-session in terminal I have sound utill I close the terminal...

So where I am right now... with out sound.

Could you help me please?

P.S. excuse me for my bad English, it isn't my native language. :)
Title: Re: PipeWire doesn't run automatically / PipeWire errors
Post by: strajder on 09 February 2022, 16:55:25
Code: [Select]
#!bin/sh
#
#~/.xinitrc

/usr/bin/pipewire &
/usr/bin/pipewire-pulse &
/usr/bin/pipewire-media-session &

exex startplasma-x11
that's exec, not "exex".
Title: Re: PipeWire doesn't run automatically / PipeWire errors
Post by: Axel on 09 February 2022, 17:04:04
My bad.
You are right. It is what I have in my .xinitrc file.
I did a mistake when I write this code in the post.
I've changed it in the post.
Title: Re: PipeWire doesn't run automatically / PipeWire errors
Post by: Axel on 11 February 2022, 14:58:11
I fixed it!

For me the .xinitrc file didn't worked.
So I created a .xprofile file in home directory (~/.xprofile).

And put into it:
Code: [Select]
pipewire &
pipewire-pulse &
pipewire-media-session &

After reboot, I had sound in my system!

I hope it will help someone.

Worked for KDE (v.5.24), Artix with OpenRC.

Good luck! :)
Title: Re: PipeWire doesn't run automatically / PipeWire errors
Post by: strajder on 11 February 2022, 15:10:48
For me the .xinitrc file didn't worked.
So I created a .xprofile file in home directory (~/.xprofile).
That's because xinitrc is sourced by xinit (https://wiki.archlinux.org/title/Xinit) (without a DM, ie when running startx), while xprofile (https://wiki.archlinux.org/title/Xprofile) is sourced by DMs.
Quote
xinit is typically used to start window managers or desktop environments. While you can also use xinit to run GUI applications without a window manager, many graphical applications expect an EWMH compliant window manager. Display managers start Xorg for you and generally source xprofile.