Bug 1907806

Summary: Lost audio after a logout when using pipewire-pulseaudio
Product: [Fedora] Fedora Reporter: Qiyu Yan <yanqiyu01>
Component: pipewireAssignee: Wim Taymans <wtaymans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: brunovern.a, james, mads, roshan.shariff, wtaymans
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pipewire-0.3.27-1.fc34 pipewire-0.3.28-1.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-20 01:12:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1906086    
Attachments:
Description Flags
journal outputs none

Description Qiyu Yan 2020-12-15 09:46:40 UTC
Description of problem:
with using pipewire-pulseaudio to take over system audio, I will lost audio after re-login, until I restart pipewire.service manually.

Version-Release number of selected component (if applicable):
0.3.17-3.fc33

How reproducible:
Always.

Steps to Reproduce:
1. sudo swap pulseaudio pipewire-pulseaudio --allowerasing --enablerepo=updates-testing
2. sudo systemctl enable --global pipewire-pulse.socket
3. reboot, check if audio output is working
4. logout and relogin(quick enough), check if audio output is working
5. systemctl restart --user pipewire-pulse pipewire

Actual results:
In step 3, sound is working normally.
In step 4, I lost sound output.
After step 5, sound comes back.

Expected results:
Audio output will work after re-login with manual restart pipewire.

Additional info:
FYI, I am on 3.38.2, and whatever you see in Fedora 33.

And I did some small test to try to figure its reason, I would like to take a guess that if you login quickly enough that the old pipewire.service isn't killed by systemd, the old service remains (verified by checking active time). The old pipewire daemon seem to be have some trouble in this way.

Comment 1 Qiyu Yan 2020-12-15 10:08:56 UTC
Created attachment 1739289 [details]
journal outputs

Comment 2 Mads Kiilerich 2021-01-13 16:56:22 UTC
FWIW, when using pipewire-pulseaudio-0.3.19-2.fc33.x86_64 out of the box and without explicit enabling of pipewire-pulse.socket, everything works for me at your step 4, testing with paplay.
I also see pipewire-pulse (and pipewire and pipewire-media-session) running as my local user after logout, and the same processes are used when logging in again. And working.

It seems like pipewire-pulse.socket should be enabled globally by pipewire-pulseaudio install scripts as specified in /usr/lib/systemd/user-preset/90-default-user.preset . Your step 2 should thus not be necessary?

Perhaps try to verify if the problem still can be reproduced in your setup.

Comment 3 Wim Taymans 2021-01-22 11:12:46 UTC
I think this is fixed now in latest versions.

Comment 4 Qiyu Yan 2021-04-29 14:15:57 UTC
The problem is present, again.

Logs: 
-- Journal begins at Wed 2020-12-23 15:30:25 CST, ends at Thu 2021-04-29 22:12:46 CST. --
4月 29 22:08:24 yan-desktop systemd[1751]: Started Multimedia Service.
4月 29 22:08:24 yan-desktop systemd[1751]: Starting PipeWire PulseAudio...
4月 29 22:08:24 yan-desktop systemd[1751]: Started PipeWire PulseAudio.
4月 29 22:08:29 yan-desktop pipewire-media-session[2139]: device 'alsa_card.pci-0000_08_00.1': can't restore profile: 没有那个设备  //no such device in English
4月 29 22:09:01 yan-desktop pipewire-media-session[2139]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply
4月 29 22:10:02 yan-desktop systemd[1751]: Stopping Multimedia Service...
4月 29 22:10:02 yan-desktop systemd[1751]: Stopping PipeWire PulseAudio...
4月 29 22:10:02 yan-desktop systemd[1751]: pipewire.service: Deactivated successfully.
4月 29 22:10:02 yan-desktop systemd[1751]: Stopped Multimedia Service.
4月 29 22:10:02 yan-desktop systemd[1751]: pipewire-pulse.service: Deactivated successfully.
4月 29 22:10:02 yan-desktop systemd[1751]: Stopped PipeWire PulseAudio.
4月 29 22:10:22 yan-desktop systemd[1751]: Started Multimedia Service.
4月 29 22:10:22 yan-desktop systemd[1751]: Starting PipeWire PulseAudio...
4月 29 22:10:22 yan-desktop systemd[1751]: Started PipeWire PulseAudio.
4月 29 22:10:47 yan-desktop pipewire-media-session[7672]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply

Reopening this.

Comment 5 Qiyu Yan 2021-04-29 14:17:10 UTC
Version:

pipewire-libs-0.3.26-3.fc34.x86_64
pipewire-0.3.26-3.fc34.x86_64
pipewire-gstreamer-0.3.26-3.fc34.x86_64
pipewire-alsa-0.3.26-3.fc34.x86_64
pipewire-jack-audio-connection-kit-0.3.26-3.fc34.x86_64
pipewire-pulseaudio-0.3.26-3.fc34.x86_64
pipewire-utils-0.3.26-3.fc34.x86_64

Comment 6 Fedora Update System 2021-05-06 09:37:27 UTC
FEDORA-2021-41bc11dd99 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-41bc11dd99

Comment 7 Fedora Update System 2021-05-07 01:03:20 UTC
FEDORA-2021-41bc11dd99 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Qiyu Yan 2021-05-17 11:41:38 UTC
Still present:
pipewire-0.3.27-2.fc34.x86_64
pipewire-alsa-0.3.27-2.fc34.x86_64
pipewire-gstreamer-0.3.27-2.fc34.x86_64
pipewire-jack-audio-connection-kit-0.3.27-2.fc34.x86_64
pipewire-pulseaudio-0.3.27-2.fc34.x86_64
pipewire-utils-0.3.27-2.fc34.x86_64

Comment 9 Fedora Update System 2021-05-19 08:48:10 UTC
FEDORA-2021-28d7b1f215 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-28d7b1f215

Comment 10 Fedora Update System 2021-05-20 01:12:16 UTC
FEDORA-2021-28d7b1f215 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.