0.4.17-1ubuntu1 removes all output and input sinks in gnome settings

Bug #2051504 reported by Vidar Braut Haarr
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pipewire (Ubuntu)
Fix Released
High
Sergio Costas
wireplumber (Ubuntu)
Confirmed
High
Sergio Costas

Bug Description

After the changes committed as part of https://bugs.launchpad.net/ubuntu/+source/pipewire/+bug/1995707 (wireplumber 0.4.17-1ubuntu1), all input and output sinks are removed from gnome settings on reboot.

Playing audio through celluloid (mpv) still works with the default sink, while Firefox Nightly refuses to play anything.

I've tested this on two machines now;
- One running on nvidia+X11, without snapd installed.
- Another running on intel+wayland, also without snapd.

Reverting to 0.4.17-1 works fine, and gnome settings lists all output and input sinks again.

Tags: patch
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Thanks. I'll check this.

Changed in wireplumber (Ubuntu):
importance: Undecided → High
assignee: nobody → Sergio Costas (rastersoft-gmail)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wireplumber (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

@vhaarr I installed an ubuntu noble in a VirtualBox machine, updated it to the latest versions, uninstalled snapd, and rebooter, but everything still seems to work fine. Is there something else that you uninstalled? If you removed snapd, which Firefox did you install? The official .deb from Mozilla?

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

I installed firefox from the mozilla PPA, and it also works fine...

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Also logged in with a Xorg session, and the same, it works fine... Can you check the system log to see if there is any kind of error when trying to play something from Firefox, or when opening the gnome control center? (sudo journalctl -o cat -f in a terminal, and then do the test)

Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

Can you try removing gir1.2-snapd-2 as well?

Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

There's also these lines from the journal that might be relevant:
jan. 29 07:07:08 dm6 pipewire-pulse[1404]: default: snap_get_audio_permissions: failed to get the AppArmor info.
jan. 29 07:12:58 dm6 pipewire-pulse[1404]: default: snap_get_audio_permissions: failed to get the AppArmor info.
jan. 29 07:12:58 dm6 wireplumber[1402]: <WpSiStandardLink:0x642863636080> 2 of 2 PipeWire links failed to activate
jan. 29 07:12:58 dm6 wireplumber[1402]: <WpSiStandardLink:0x6428635b8220> 2 of 2 PipeWire links failed to activate
jan. 29 07:12:58 dm6 wireplumber[1402]: <WpSiStandardLink:0x6428635b87f0> 2 of 2 PipeWire links failed to activate
jan. 29 07:12:58 dm6 wireplumber[1402]: <WpSiStandardLink:0x642863635a80> 2 of 2 PipeWire links failed to activate
jan. 29 07:12:58 dm6 wireplumber[1402]: <WpSiStandardLink:0x6428635b87f0> 2 of 2 PipeWire links failed to activate
jan. 29 07:12:58 dm6 wireplumber[1402]: <WpSiStandardLink:0x6428635b9470> 2 of 2 PipeWire links failed to activate
jan. 29 07:12:58 dm6 wireplumber[1402]: <WpSiAudioAdapter:0x6428636fec90> tried to link on last rescan, not retrying

But I'm sure the problem is the gir, because the lua code probably uses those bindings.

Revision history for this message
scottfk (scottfk) wrote :
Download full text (5.8 KiB)

Here's some of what I see:

When I log in fresh after a reboot (Budgie), this pops up in the logs:

Jan 29 13:08:17 hydra pipewire-pulse[2736]: default: snap_get_audio_permissions: failed to get the AppArmor info.

Firing up 'sudo journalctl -o cat -f in a terminal' as requested, then launching Firefox Nightly (ubuntu-mozilla-daily PPA) and trying to play a video from YouTube shows the following:

budgie_app_sound_control_construct: assertion 'c_primary != NULL' failed
g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed
<WpSiStandardLink:0x63609a0081a0> 2 of 2 PipeWire links failed to activate
<WpSiStandardLink:0x636099fe8200> 2 of 2 PipeWire links failed to activate
<WpSiStandardLink:0x636099f3cd10> 2 of 2 PipeWire links failed to activate
<WpSiStandardLink:0x636099fe8200> 2 of 2 PipeWire links failed to activate
<WpSiStandardLink:0x636099f3cd10> 2 of 2 PipeWire links failed to activate
<WpSiStandardLink:0x636099fe8200> 2 of 2 PipeWire links failed to activate
<WpSiAudioAdapter:0x63609a0e3990> tried to link on last rescan, not retrying
pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
(root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
pam_unix(cron:session): session closed for user root
[Child 4640, MediaDecoderStateMachine #1] WARNING: 72e9be90b3a0 OpenCubeb() failed to init cubeb: file /build/firefox-trunk-4PTotk/firefox-trunk-124.0~a1~hg20240124r693212/dom/media/AudioStream.cpp:279
budgie_app_sound_control_construct: assertion 'c_primary != NULL' failed
g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed
<WpSiStandardLink:0x636099f3d340> 2 of 2 PipeWire links failed to activate
<WpSiAudioAdapter:0x63609a0e3990> tried to link on last rescan, not retrying
<WpSiStandardLink:0x63609a0e7d40> 2 of 2 PipeWire links failed to activate
<WpSiAudioAdapter:0x63609a0e3990> tried to link on last rescan, not retrying
<WpSiStandardLink:0x636099f7dfc0> 2 of 2 PipeWire links failed to activate
<WpSiAudioAdapter:0x63609a0e3990> tried to link on last rescan, not retrying
<WpSiStandardLink:0x63609a0e78c0> 2 of 2 PipeWire links failed to activate
<WpSiAudioAdapter:0x63609a0e3990> tried to link on last rescan, not retrying
<WpSiStandardLink:0x636099f7dfc0> 2 of 2 PipeWire links failed to activate
<WpSiAudioAdapter:0x63609a0e3990> tried to link on last rescan, not retrying
<WpSiStandardLink:0x63609a1814e0> 2 of 2 PipeWire links failed to activate
<WpSiAudioAdapter:0x63609a0e3990> tried to link on last rescan, not retrying
<WpSiAudioAdapter:0x636099f3c7f0> tried to link on last rescan, not retrying
[Child 4640, MediaDecoderStateMachine #1] WARNING: 72e9bd4dd160 OpenCubeb() failed to init cubeb: file /build/firefox-trunk-4PTotk/firefox-trunk-124.0~a1~hg20240124r693212/dom/media/AudioStream.cpp:279
[Child 4640, MediaDecoderStateMachine #1] WARNING: Decoder=72e9b97d9b00 [OnMediaSinkAudioError]: file /build/firefox-trunk-4PTotk/firefox-trunk-124.0~a1~hg20240124r693212/dom/media/MediaDecoderStateMachine.cpp:4650
Started vte-spawn-3a00ea87-4f9b-41e5-a97b-f74305f293d5.scope - VTE child process 5227 launched by gnome-terminal-server process 4098.
Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x5b96c243bf10]...

Read more...

Revision history for this message
scottfk (scottfk) wrote :

Removing gir1.2-snapd-2 and relaunching Firefox Nightly made no difference.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote (last edit ):

Ok, I removed gir1.2-snapd-2, but still can't reproduce the bug. Also, lua doesn't use snapd-2, it only checks permissions set by pipewire-pulse.

Did you remove apparmor? Because that's needed for snap support...

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Ok, I see that scottfk is using budgie. Which distro are you using, vhaarr?

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Also, how can I download that budgie version, scottfk? I presume that you are using some nightly build, and not the current 23.10 ISO...

Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

I have apparmor, libapparmor1, and libapparmor1:i386 installed.

I will try to upgrade the packages again, reboot, and attach a log.

Revision history for this message
scottfk (scottfk) wrote :

I didn't touch apparmor.

Here are some version infos, if they help:

apparmor:
  Installed: 4.0.0~alpha2-0ubuntu8

wireplumber:
  Installed: 0.4.17-1ubuntu1

pavucontrol:
  Installed: 5.0-2

$ dpkg -l | grep pipe
ii gstreamer1.0-pipewire:amd64 1.0.1-1ubuntu2 amd64 GStreamer 1.0 plugin for the PipeWire multimedia server
ii libpipeline1:amd64 1.5.7-1 amd64 Unix process pipeline manipulation library
ii libpipewire-0.3-0:amd64 1.0.1-1ubuntu2 amd64 libraries for the PipeWire multimedia server
ii libpipewire-0.3-common 1.0.1-1ubuntu2 all libraries for the PipeWire multimedia server - common files
ii libpipewire-0.3-dev:amd64 1.0.1-1ubuntu2 amd64 libraries for the PipeWire multimedia server - development
ii libpipewire-0.3-modules:amd64 1.0.1-1ubuntu2 amd64 libraries for the PipeWire multimedia server - modules
ii pipewire:amd64 1.0.1-1ubuntu2 amd64 audio and video processing engine multimedia server
ii pipewire-alsa:amd64 1.0.1-1ubuntu2 amd64 PipeWire ALSA plugin
ii pipewire-audio 1.0.1-1ubuntu2 all recommended set of PipeWire packages for a standard audio desktop use
ii pipewire-bin 1.0.1-1ubuntu2 amd64 PipeWire multimedia server - programs
ii pipewire-pulse 1.0.1-1ubuntu2 amd64 PipeWire PulseAudio daemon
ii vlc-plugin-pipewire:amd64 3-2 amd64 PipeWire audio plugins for VLC

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

The problem seems to be that it fails to get the apparmor data for the socket. I need to be able to reproduce the bug to check why it is failing.

Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

I'm using ubuntu 24.04 noble.

Attached is the output of `journalctl -b-0 -o cat`

Revision history for this message
scottfk (scottfk) wrote :
Download full text (7.5 KiB)

I'm not using anything too weird for core Budgie (some of the applets are nightly-ish versions, however):

$ dpkg -l | grep budgie
ii budgie-applications-menu-applet 1.7.1+202401241432~ubuntu24.04.1 amd64 Stylish Applications Menu for Budgie-Desktop
ii budgie-appmenu-applet 0.7.6+dfsg1-4 amd64 Application Menu plugin for budgie-panel
ii budgie-arm-environment 0.20.4 all ARM based desktop environment customisation for Ubuntu Budgie
ii budgie-backgrounds 1.0-2 all Default set of background images for the Budgie Desktop
ii budgie-control-center 1.3.0-1 amd64 utilities to configure the Budgie desktop
ii budgie-control-center-data 1.3.0-1 all configuration applets for Budgie - data files
ii budgie-core 10.8.2-2ubuntu1 amd64 Core package for Budgie-Desktop
ii budgie-desktop 10.8.2-2ubuntu1 all Desktop package for budgie-desktop
ii budgie-desktop-environment 0.20.4 all Desktop environment customisation for Ubuntu Budgie
ii budgie-desktop-view 1.3-1 amd64 Desktop Icons for the Budgie-Desktop
ii budgie-dropby-applet 1.7.1+202401241432~ubuntu24.04.1 all Applet to popup when a USB device is connected
ii budgie-extras-common 1.7.1+202401241432~ubuntu24.04.1 amd64 Shared component of budgie-extras applets
ii budgie-extras-daemon 1.7.1+202401241432~ubuntu24.04.1 amd64 Extras daemon for budgie-extras capabilities
ii budgie-hotcorners-applet 1.7.1+202401241432~ubuntu24.04.1 amd64 Applet providing hotcorners capabilities for the Budgie Desktop
ii budgie-indicator-applet 0.7.2-3 amd64 Application Indicator for the budgie-desktop
ii budgie-keyboard-autoswitch-applet 1.7.1+202401241432~ubuntu24.04.1 all Applet adding the ability to set a different keyboard layout per application
ii budgie-lightdm-theme 0.17.0 all LightDM Greeter theme for Ubuntu Budgie
ii budgie-lightdm-theme-base 0.17.0 all LightDM Session for Ubuntu Budgie
ii budgie-ne...

Read more...

Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

Indeed same here as scottfk; `wpctl status` shows the devices and sinks, with the correct output sink marked as default and audio works through some apps, but the GNOME Settings Sound tab is empty.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote (last edit ):

@scottfk Which Budgie version are you using (I presume it's not 23.10)? Where/how can I get it?

@vhaarr Which distro are you using? Budgie too?

Revision history for this message
scottfk (scottfk) wrote :

I'm using Ubuntu Budgie.

apt install ubuntu-budgie-desktop

_might_ be enough to pull down the whole kit and caboodle.

Revision history for this message
scottfk (scottfk) wrote :

pw-play of an mp3 from a terminal successfully plays.

pactl list sinks shows nothing.

Maybe it's something funky with pipewire-pulse?

I'll keep digging...

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

@scottfk But are you using 23.10 with some kind of PPA, for having the last pipewire-pulse? Or are you using some Budgie nightly version based on the upcoming Ubuntu 24.04?

Also, vhaarr has an specific error from pipewire-pulse, but you seem to not have it, so... I'm not sure that it is the same error...

Revision history for this message
scottfk (scottfk) wrote :

I am running DEV branch for 24.04:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Noble Numbat (development branch)
Release: 24.04
Codename: noble

Revision history for this message
scottfk (scottfk) wrote :

pacat of the same mp3 (that succeeded in pw-play) fails:

$ journalctl --user-unit=pipewire --user-unit=wireplumber --user-unit=pipewire-pulse -f
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiAudioAdapter:0x636099fe3490> tried to link on last rescan, not retrying
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiStandardLink:0x636099f3ca30> 2 of 2 PipeWire links failed to activate
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiAudioAdapter:0x63609a0240b0> tried to link on last rescan, not retrying
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiAudioAdapter:0x636099fe3490> tried to link on last rescan, not retrying
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiStandardLink:0x63609a137160> 2 of 2 PipeWire links failed to activate
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiAudioAdapter:0x63609a0240b0> tried to link on last rescan, not retrying
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiAudioAdapter:0x636099fe3490> tried to link on last rescan, not retrying
Jan 29 14:31:33 hydra wireplumber[2733]: <WpSiAudioAdapter:0x636099f04680> tried to link on last rescan, not retrying
Jan 29 14:31:41 hydra wireplumber[2733]: <WpSiAudioAdapter:0x63609a0240b0> tried to link on last rescan, not retrying
Jan 29 14:31:41 hydra wireplumber[2733]: <WpSiAudioAdapter:0x636099fe3490> tried to link on last rescan, not retrying

Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

Sergio in comment #19 you asked me which distro I use but I already said so in comment 16 :-)

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Yes, sorry. I was writing and reading in parallel, and clearly had a race condition :-D

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

I'm installing noble directly in a laptop, to try to reproduce the bug.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

@vhaarr Mmm... I found this in your log...

Couldn't write '1' to 'kernel/apparmor_restrict_unprivileged_userns', ignoring: No such file or directory
Couldn't write '1' to 'kernel/unprivileged_userns_clone', ignoring: No such file or directory

I can't find it in my logs...

I suspect that your problem has to do with this:

https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2051454

Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

Indeed, that looks highly plausible. Thank you.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Ok, the apparmor mailing list gurus answered this:

"To use aa_getpeercon() your kernel will need the fine grained unix mediation which hasn't land in upstream kernels yet. So current upstream kernels will return -ENOPROTOOPT because SO_PEERLABEL is not a supported protocol option.

Additionally note that with LSM stacking, with apparmor stacked with another LSM, even if you have the fine grained af_unix mediation, that aa_getpeercon() will either return an error or the wrong LSM info (it will depend on the version aa_getpeercon() that is in use."

So it seems that it will be needed a patch for the patch.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Added pipewire to the affected packages because the patch is for it.

Changed in pipewire (Ubuntu):
assignee: nobody → Sergio Costas (rastersoft-gmail)
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

@scottfk Are you using a different kernel too?

Revision history for this message
scottfk (scottfk) wrote :

Yup. Ubuntu Mainline (https://kernel.ubuntu.com/mainline/).

$ uname -a
Linux hydra 6.7.1-060701-generic #202401201133 SMP PREEMPT_DYNAMIC Sat Jan 20 11:43:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

I am happy to try again with any other kernel. 6.6.0-14-generic seems to be the latest and greatest for noble. 6.7.2 seems to have dropped for Mainline. There's also 6.8.0-rc2 in Mainline, but I don't think my nvidia modules are ready for all that. That said... if the necessary kernel bits are there, I am happy to test -- just won't be able to run it as my daily driver.

Revision history for this message
scottfk (scottfk) wrote :

This might be relevant:

https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/796588

I am trying to find any mention of this feature hitting the mainline kernel (or even trying).

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

@scottfk @vhaarr I prepared a PPA with a patched pipewire, which should fix this. Can you test it, please?

https://launchpad.net/~rastersoft-gmail/+archive/ubuntu/pipewire/+packages

Revision history for this message
scottfk (scottfk) wrote :

Sure thing. Happy to give it a try. apt is moaning a bit about the PPA:

E: The repository 'https://ppa.launchpadcontent.net/rastersoft-gmail/pipewire/ubuntu noble Release' does not have a Release file.

I also don't see anything newer than ~29 weeks old.

I suspect both are related to some sort of propagation of your new builds that has not happened yet. I will try again in a bit.

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Ops... Yes, sorry, it's still publish pending. Just wait a couple of hours and check the "status" column for the Noble series at https://launchpad.net/~rastersoft-gmail/+archive/ubuntu/pipewire/+packages

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

It's published!

Jeremy Bícha (jbicha)
Changed in pipewire (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "If the kernel doesn't have "fine grained unix mediation" support, the call aa_getpeercon() fails with ENOPROTOOPT errno" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pipewire - 1.0.1-1ubuntu3

---------------
pipewire (1.0.1-1ubuntu3) noble; urgency=medium

  * Fix broken audio when using a kernel without
    "fine grained unix mediation" patch (LP: #2051504, LP: #2051454)

 -- Sergio Costas Rodriguez <email address hidden> Mon, 29 Jan 2024 19:03:45 +0200

Changed in pipewire (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

Works for me :-)

Revision history for this message
scottfk (scottfk) wrote :

Works for me too.

Thanks, @rastersoft-gmail!

Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.