Apps not always connecting to default device

Problem: When I open an app that outputs sound, sometimes things work perfectly. Watching qpwgraph, I see the app pop up, connect to my motherboard audio and play sound. Sometimes those same apps pop up in qpwgraph, but don’t connect to anything. They will stay there for hours, complete with buffered sound ready to play. When I connect the output of the app to the playback/input of my motherboard device in qpwgraph, the sound will play, for example a notification chime, and the app and connection will disappear as they would have if it had connected properly in the first place. If the app is still running and sending audio, then it will stay connected and work as normal from that time on (Skype for example). It happens much more often for web browser audio, probably because browsers are connecting and disconnecting a lot with every pause/ff/rew? But it can also happen with games, discord, audacity and pretty much any other audio app.

This started about 6-7 weeks ago after a major round of patches that included kde and pipewire updates.

I’m wondering if I have an old config file somewhere from a couple of years ago, left over from tweaking I did to alsa to get my USB Creative Labs BlasterX G6 running, before we got more usb sound cards supported in the kernel?

I’ve created a separate username and logged in with that; the same issues occur, so I don’t believe it’s related to user level configs. I also have a dual boot to another linux distribution and that does not see the problem or the errors in the system log.

If nothing else, I am open to blowing away config files and allowing things to reset to defaults, but I’m not sure where they all are.

Here’s the packages installed on my system:
alsa-card-profiles 1:1.0.0-2 alsa-firmware 1.2.4-3 alsa-lib 1.2.10-2 alsa-oss 1.1.8-5 alsa-plugins 1:1.2.7.1-2 alsa-topology-conf 1.2.5.1-3 alsa-ucm-c onf 1.2.10-2 alsa-utils 1.2.10-1 faudio 23.11-1 gst-plugin-pipewire 1:1.0.0-2 kpipewire 5.27.10-1 lib32-alsa-lib 1.2.10-2 lib32-alsa-plugins 1.2.7.1-2 lib32-faudio 23.10-1 libpipeline 1.5.7-1 libpipewire 1:1.0.0-2 manjaro-alsa 20221002-1 manjaro-pipewire 20231009-1 pcaudiolib 1.2-2 pipewire 1:1.0.0- 2 pipewire-alsa 1:1.0.0-2 pipewire-audio 1:1.0.0-2 pipewire-jack 1:1.0.0-2 pipewire-media-session 1:0.4.2-2 pipewire-pulse 1:1.0.0-2 pipewire-zeroconf 1:1.0.0-2 portaudio 1:19.7.0-2 pulseaudio-ctl 1.70-1 pulseaudio-qt 1.3-1 qemu-audio-alsa 8.1.3-1 qemu-audio-dbus 8.1.3-1 qemu-audio-jack 8.1.3-1 qemu -audio-oss 8.1.3-1 qemu-audio-pa 8.1.3-1 qemu-audio-pipewire 8.1.3-1 qemu-audio-sdl 8.1.3-1 qemu-audio-spice 8.1.3-1 waypipe 0.8.6-1 webrtc-audio-proc essing 0.3.1-4 webrtc-audio-processing-1 1.3-2

inxi -Azy and related system logs:

  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel
  Device-2: AMD Starship/Matisse HD Audio driver: snd_hda_intel
  Device-3: Creative Sound BlasterX G6
    driver: hid-generic,snd-usb-audio,usbhid type: USB
  Device-4: Logitech HD Pro Webcam C920 driver: snd-usb-audio,uvcvideo
    type: USB
  Device-5: Kingston HyperX QuadCast driver: hid-generic,snd-usb-audio,usbhid
    type: USB
  API: ALSA v: k6.6.7-4-MANJARO status: kernel-api`

Dec 22 02:54:01 onyx systemd[1]: Manage Sound Card State (restore and store) was skipped because of an unmet condition check (ConditionPathExists=/etc/alsa/state-daemon.conf).
Dec 22 02:54:01 onyx alsactl[808]: Found hardware: "USB-Audio" "USB Mixer" "USB041e:3256" "" ""
Dec 22 02:54:01 onyx alsactl[808]: Hardware is initialized using a generic method
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #3 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #4 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #7 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #8 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #11 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #12 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #15 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #16 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #19 (No such file or directory)
Dec 22 02:54:01 onyx alsactl[808]: /usr/bin/alsactl: set_control:1339: failed to obtain info for control #24 (No such file or directory)
Dec 22 02:54:19 onyx pipewire-media-session[2047]: spa.alsa: The decibel volume range for element 'Speaker' (-4000 dB - -900 dB) has negative maximum. Disabling the decibel range.
Dec 22 09:30:00 onyx pipewire[2041]: spa.alsa: front:3p: snd_pcm_status error: No such device
Dec 22 09:30:00 onyx pipewire[2041]: spa.alsa: front:3p: snd_pcm_drop: No such device
Dec 22 09:30:00 onyx pipewire[2041]: spa.alsa: sw_params: No such device
Dec 22 09:30:00 onyx pipewire[2041]: spa.alsa: swparams: No such device
Dec 22 09:30:00 onyx pipewire[2041]: spa.alsa: front:3p: (0 suppressed) snd_pcm_avail after recover: No such device
Dec 22 09:30:00 onyx pipewire-media-session[2047]: ms.mod.default-profile: device 'alsa_card.pci-0000_0c_00.1': can't restore profile: No such device
Dec 22 09:30:01 onyx pipewire-media-session[2047]: spa.alsa: Your kernel driver is broken for element 'PCM': it reports a volume range from 0 to 0 which makes no sense.
Dec 22 09:30:19 onyx pipewire-media-session[2047]: spa.bluez5.native: RFCOMM receive command but modem not available: AT+NREC=0
Dec 22 09:30:28 onyx pipewire[2041]: spa.alsa: front:3p: follower avail:1 delay:1 target:1536 thr:1024, resync (0 suppressed)
Dec 22 11:02:11 onyx pipewire[18298]: mod.protocol-native: server 0x560e7205f790: name pipewire-0 is not an absolute path and no runtime dir found. Set one of PIPEWIRE_RUNTIME_DIR, XDG_RUNTIME_DIR or USERPROFILE in the environment
Dec 22 11:02:11 onyx pipewire[18298]: pw.conf: 0x560e720239b0: could not load mandatory module "libpipewire-module-protocol-native": No such file or directory
Dec 22 11:02:11 onyx pipewire[18298]: default: failed to create context: No such file or directory```

The server does not seem to be running.

Example:

Audio:
  Device-1: NVIDIA GA102 High Definition Audio driver: snd_hda_intel
  Device-2: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
  Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel
  API: ALSA v: k6.6.7-5-MANJARO status: kernel-api
  Server-1: PipeWire v: 1.0.0 status: active

9 out of 10 times all you have to do is install (re-install in your case) the manjaro-pipewire that will remove conficts (you have a bunch of pulse stuff according to your list of installed apps) and configure pipewire for manjaro.

Yesterday I re-installled manjaro-pipewire. inxi reports PipeWire 1.0.0 is running. The system still behaved the same, though.

I’m still wondering if I need to do some sort of reset of the configuration files. It feels like the system is confused about sending sound to the default audio sink or that it’s missing that step when an app tries to open a sound stream.