So, I am using Fedora KDE 41. I have 2 users on my laptop, one of which I use all the time, the other one is pretty much unmodified from the default settings. Up until a few days ago, I could share my screen on video calls just fine. Now, for some reason, every time I try to share my screen, it says “KDE Portal integration: Failed to start screencasting: Failed to connect PipeWire context”. I have reinstalled, purged their configuration so many times. It works on the other user. I tried to figure out which files I am supposed to copy from the other user to make it work on this one as well. Apparently, no one actually knows where its configuration files are stored.
I tried:
rm -rf ~/.config/pipewire ~/.config/wireplumber ~/.local/state/pipewire
sudo dnf reinstall pipewire wireplumber pipewire-pulseaudio pipewire-jack pipewire-alsa
systemctl --user restart pipewire pipewire-pulse wireplumber
systemctl --user status pipewire pipewire-pulse wireplumber
sudo dnf reinstall pipewire wireplumber --refresh
Can someone please tell me how I should reset it back to defaults, as if I just created a new account?
KSystemLog keeps giving these warnings:
kpipewire_logging: error: "Failed to connect to PipeWire" 0
kwin_screencast: Failed to connect PipeWire context
Your help is highly appreciated.
from my notes (just today as a matter of fact)
#brute force troubleshooting...
mv ~/.config ~/.configBORKED
#logout and log back in again to force plasma to recreate the folder with default settings
dolphin --split ~/.config ~/.configBORKED
#copy back half of the BORKED folder contents at a time and relog to see if issue returns
#if it does, then delete the folder again, relog, and only copy half of that previous half
#repeat until the culprit is found, then finally, copy back everything BUT that culprit bit
Is this the best method? Can I not force reset all pipewire settings and configs back to default? The fact that it works on the other user suggests that it is not global but the user-level settings that are broken. I just need a way to reset them back to default…
you could uninstall with the purge option, then do an autoremove of any unneeded dependencies, and then reinstall the package with fresh defaults
but like the article says, purge works “in theory” but may not get everything.
so if you want build back your user from a blank new user that doesn’t have the issue, then the a triage above would be more likely to ensure it’s cleaned out.
the other thing i will warn about is read what apt says it is going to uninstall very carefully and make sure it’s not going to take your desktop with it somehow.
1 Like
A few just-in-case questions, in case one of them sparks an idea:
What applications are you trying to screen share from?
Are you restarting after those steps like reinstalling, wiping config folders, etc.?
I don’t know if it would impact this, but do you have xdg-desktop-portal packages installed for any other desktop environments?
Does everything seem OK with the systemd service files for Pipewire? For reference, here’s my pipewire.service
file on my Fedora 41 installation:
$ systemctl --user cat pipewire
# /usr/lib/systemd/user/pipewire.service
[Unit]
Description=PipeWire Multimedia Service
# We require pipewire.socket to be active before starting the daemon, because
# while it is possible to use the service without the socket, it is not clear
# why it would be desirable.
#
# A user installing pipewire and doing `systemctl --user start pipewire`
# will not get the socket started, which might be confusing and problematic if
# the server is to be restarted later on, as the client autospawn feature
# might kick in. Also, a start of the socket unit will fail, adding to the
# confusion.
#
# After=pipewire.socket is not needed, as it is already implicit in the
# socket-service relationship, see systemd.socket(5).
Requires=pipewire.socket
[Service]
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
RestrictNamespaces=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=simple
ExecStart=/usr/bin/pipewire
Restart=on-failure
Slice=session.slice
[Install]
Also=pipewire.socket
WantedBy=default.target
# /usr/lib/systemd/user/pipewire.service.d/00-uresourced.conf
[Service]
Slice=session.slice
# /usr/lib/systemd/user/service.d/10-timeout-abort.conf
# This file is part of the systemd package.
# See https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer.
#
# To facilitate debugging when a service fails to stop cleanly,
# TimeoutStopFailureMode=abort is set to "crash" services that fail to stop in
# the time allotted. This will cause the service to be terminated with SIGABRT
# and a coredump to be generated.
#
# To undo this configuration change, create a mask file:
# sudo mkdir -p /etc/systemd/user/service.d
# sudo ln -sv /dev/null /etc/systemd/user/service.d/10-timeout-abort.conf
[Service]
TimeoutStopFailureMode=abort
I have found the solution. The problem was that I had an unnecessary line on .bashrc file. Removing it fixed the problem. The culprit was export PIPEWIRE_RUNTIME_DIR=/run/user/1000/pipewire
2 Likes
If you’re able, posting what that line was that was throwing things off might help others in the future who end up in the same situation 
1 Like
Oh, it was an environment variable:
export PIPEWIRE_RUNTIME_DIR=/run/user/1000/pipewire