Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context (Read 2145 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

[SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Hello.

Recently I installed Artix with OpenRC and I seemingly can't get screensharing through pipewire to work. The error I get is that pipewire failed to start screencasting and failed to connect pipewire context, i get this error on both plasma 6 (running wayland) and sway.

I followed the wiki for using Pipewire instead of Pulseaudio and the audio itself works, but screencasting through obs does not. Running pactl info returns this
Code: [Select]
$ pactl info
Server Name: PulseAudio (on PipeWire 1.0.5)
Server Version: 15.0.0

And the xdg_current_desktop is listed as KDE, both xdg-desktop-portal and xdg-desktop-portal-kde are installed
Code: [Select]
$ echo $XDG_CURRENT_DESKTOP
KDE

Any help would be much appreciated!

Re: Pipewire: Failed to start screencasting, failed to connect pipewire context

Reply #1
Hi, that is upstream issue
you have to start pipewire before plasma session starts (Note even plasma autostart does not help here)
One option is to make user service for pipewire

For more info https://wiki.gentoo.org/wiki/OpenRC/User_services
Create problems which don't have solution

 

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #3
To start a service at openrc startup:
Code: [Select]
sudo rc-update add pipewire
Hello, I am trying to do this but I keep getting
Code: [Select]
rc-update: service `pipewire' does not exist
I have installed pipewire, xdg-desktop-portal, xdg-desktop-portal-kde, and wireplumber

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #4
@SalamiMommy It's a non standard experimental setup which requires manual intervention, the two users above should have been more clear.
The only user services that are packaged right now are for Dinit.

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #5
@SalamiMommy  I ended up adding the following code into /etc/profile and that solved it for me
Code: [Select]
/usr/bin/pipewire &
/usr/bin/pipewire-pulse &
/usr/bin/wireplumber &

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #6
@SalamiMommy  I ended up adding the following code into /etc/profile and that solved it for me
Code: [Select]
/usr/bin/pipewire &
/usr/bin/pipewire-pulse &
/usr/bin/wireplumber &
I don't have a file named profile in /etc/
I have a directory called /profile.d/ would it be one of the files in there I add those lines to?

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #7
Hello, I am trying to do this but I keep getting
Code: [Select]
rc-update: service `pipewire' does not exist
I don't know about pipewire.
Have you installed all the required packages?
https://wiki.artixlinux.org/Site/PipewireInsteadPulseaudio

--

I have been using alsa only for several years.
I removed all pulse packets except libpulse and libcanberra.

I use alsa and the nice and very practical qastools mixer on different pc:
https://forum.artixlinux.org/index.php/topic,4318.msg27848.html#msg27848

Note: I don't play games and don't use wine or steam.
But I have sound in all my apps.

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #8
Hello, I am trying to do this but I keep getting
Code: [Select]
rc-update: service `pipewire' does not exist
I don't know about pipewire.
Have you installed all the required packages?
https://wiki.artixlinux.org/Site/PipewireInsteadPulseaudio

--

I have been using alsa only for several years.
I removed all pulse packets except libpulse and libcanberra.

I use alsa and the nice and very practical qastools mixer on different pc:
https://forum.artixlinux.org/index.php/topic,4318.msg27848.html#msg27848

Note: I don't play games and don't use wine or steam.
But I have sound in all my apps.
I have followed the guide you linked, I have all the packages except pipewire-pulse and pipewire-JACK because desktop audio is being captured just fine.

Regarding the startup commands, from my researching the topic it looks like pipewire needs to be loaded before the DE or it runs into issues so I am not sure how to go about that. Starting pipewire and wireplumber manually still lead to the "Failed to start screencasting/connect pipewire context" in OP.

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #9
I have followed the guide you linked, I have all the packages except pipewire-pulse and pipewire-JACK because desktop audio is being captured just fine.
[/quote]
I don't know PipeWire, but it seems to me that you risk nothing by following this indication from the wiki:
"Install pipewire-pulse. It will replace pulseaudio and pulseaudio-bluetooth.
 sudo pacman -S pipewire-pulse"


You can always uninstall this package if that doesn't solve your problem.

I give way to those who know pipewire.

Re: [SOLVED] Pipewire: Failed to start screencasting/connect pipewire context

Reply #10
Quote
I don't know PipeWire, but it seems to me that you risk nothing by following this indication from the wiki:
"Install pipewire-pulse. It will replace pulseaudio and pulseaudio-bluetooth.
 sudo pacman -S pipewire-pulse"


You can always uninstall this package if that doesn't solve your problem.

I give way to those who know pipewire.

I tried installing pipewire-pulse and pipewire-jack and I get "no audio devices found" in the audio panel. I also reinstalled plasma-pa to make sure. There's something about my system thats not playing nice with pipewire and I'm not sure what