Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: odd problem with pipewire  (Read 554 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

odd problem with pipewire

i use artix linux with openrc, dwm and pipewire, if i run apps by using dmenu (alt + p), it works perfectly. but if i try to run something by using terminal, it cannot connect to pipewire. if i run ncpamixer, it gives me "Assertion 'c' failed at ../pulseaudio/src/pulse/context.c:1076, function pa\_context\_disconnect(). Aborting." error, if i run pavucontrol it gives "Connection to PulseAudio failed", but when i run pavucontrol from dmenu it just works. same thing with steam and other apps. for things like "java -jar <filename>" i could create script in /usr/bin, but i won't see terminal output then.  


my ~/.local/share/dwm/autostart.sh is:

Code: [Select]
twmnd &
/usr/bin/pipewire &
/usr/bin/pipewire-pulse &
/usr/bin/wireplumber &
/home/archi/.config/myscripts/wall.sh &
/home/archi/.config/myscripts/bar.sh &
setxkbmap -layout us,ru -option grp:win_space_toggle
i tried to use pulseaudio, but there were other problems, so i use pipewire 

and if i start pipewire from terminal, then ncpamixer works fine, but only in that terminal instance

i'd be very thankful if someone could help me figuring this out

 

Re: odd problem with pipewire

Reply #1
What do you mean by "using terminal", switching to another TTY or on a terminal multiplexer? Some user env. variables would have to be exported in that case.

Pavucontrol IIRC exports some variables manually to prevent issues like that (from the early pulse days), it could be that pw-pulse lacks some of those hooks, and they would work by backgrounding the process with nohup.

DWM/Awesome are tough things to work with though, they have very friendly people on irc/discord, you should ask there

Re: odd problem with pipewire

Reply #2
What do you mean by "using terminal", switching to another TTY or on a terminal multiplexer? Some user env. variables would have to be exported in that case.

i mean terminal multiplexer, in my case it's sakura. which variables have to be exported? i couldn't find any information about them, though i tried.

i will try to ask in dwm discord then, thanks for your time

Re: odd problem with pipewire

Reply #3
people on dwm irc told that switching to s6 may be a good option, but s6 feels different after openrc which i am used to, so i am still trying to find another way to make it work, and i don't think that this could be init problem.

at first, i decided to start pipewire services not from dwm autostart but from .xinitrc, and then i tried this:
Quote
    pacman -S pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber

    mkdir /etc/pipewire

    cp /usr/share/pipewire/pipewire* /etc/pipewire

    edit the /etc/pipewire/pipewire.conf file

    go to the final option, context.exec = [...]

    add the following lines inside the ...

{ path = "/usr/bin/wireplumber" args = "" }

{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }

now simply do the one pipewire & in whatever init script you were using before and it should run pipewire, the pulse layer, and wireplumber to manage the session, all together at once.

and now my .xinitrc is:
Code: [Select]
pipewire &
exec dbus-launch --exit-with-session dwm

and i still have the same problem. i tried to start sakura by dmenu, but any sound things still don't start this way. i can't even start mpv.

upd.: i just realized that sakura isn't a multiplexer, but just a terminal emulator, i hope it doesn't matter too much

Re: odd problem with pipewire

Reply #4
i tried alacritty, same problem, i have no idea what it could be

Re: odd problem with pipewire

Reply #5
turned out it was about $XDG_RUNTIME_DIR, which would be exported as new tmp directory trough .zsession, i think i made it a long time ago even without understanding what i was doing, but now it finally works!