Any Fedora Silverblue users? Pipewire audio

Hey all I have just migrated my workstation from Fedora 33 to Fedora 34 silverblue.

I got my GPU successfully passed through and my XML migrated. Everything seems good. Two/three blockers I have left are

  • Audio

  • Looking-glass

  • /dev/shm reservation

The last two seem easily obtainable but what I’m struggling with is audio. This is mostly because I’m not entrierly familiar with Pipewire just yet

  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ich9-intel-hda,bus=pcie.0,addr=0x1b'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='hda-micro,audiodev=hda'/>
    <qemu:arg value='-audiodev'/>
    <qemu:arg value='pa,id=hda,server=unix:/tmp/pulse-socket'/>
  </qemu:commandline>

My old configuration needs some tweaking in order to work with pipewire-pulse. I have tried…

    <qemu:arg value="-device"/>
    <qemu:arg value="usb-audio,audiodev=usb,multi=on"/>
    <qemu:arg value="-audiodev"/>
    <qemu:arg value="pa,id=usb,server=/run/user/1000/pulse/native,out.mixing-engine=off"/>
    <qemu:env name="PIPEWIRE_RUNTIME_DIR" value="/run/user/1000"/>

To no avail. I get

error: Failed to start domain 'win10-lg'
error: internal error: qemu unexpectedly closed the monitor: pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver

Does anyone have a working pipewire/any audio passthrough configuration on silverblue?

I would like to try Jack but that change hasn’t yet made it to 34 (Tree - rpms/qemu - src.fedoraproject.org)

Interested to hear anyone’s thoughts. Once this block is finished im going to see if I can get looking-glass-client pushed to flathub since /dev/shm support was recently added

EDIT:

In-case anyone is interested here’s my current os-tree config

[[email protected] qemu]# rpm-ostree status -v
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
  ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210512.0 (2021-05-12T05:19:28Z)
                BaseCommit: 12f85a0d59d262b5d128305de5634215e71c17c2dc2464f5669aa877085b5b43
                            ├─ repo-0 (2021-04-23T10:47:57Z)
                            ├─ repo-1 (2021-05-12T04:51:18Z)
                            └─ repo-2 (2021-05-12T04:53:26Z)
                    Commit: 34aeeaf353c795d798bfaf5cd8d355f06e0c4c4cc7e6f8200be3ed4b8ffb739f
                            ├─ fedora-cisco-openh264 (2021-02-23T00:49:00Z)
                            ├─ fedora (2021-04-24T09:52:40Z)
                            ├─ updates (2021-05-12T05:27:39Z)
                            └─ updates-archive (2021-05-12T06:21:00Z)
                    Staged: yes
                 StateRoot: fedora
              GPGSignature: 1 signature
                            Signature made Wed 12 May 2021 01:19:33 AM EDT using RSA key ID 1161AE6945719A39
                            Good signature from "Fedora <[email protected]>"
             SecAdvisories: FEDORA-2021-0d26f8a9f3  Critical   firefox-88.0.1-1.fc34.x86_64
                  Upgraded: xen-libs 4.14.1-7.fc34 -> 4.14.2-1.fc34
                            xen-licenses 4.14.1-7.fc34 -> 4.14.2-1.fc34
                Downgraded: firefox 88.0-8.fc34 -> 88.0.1-1.fc34
           LayeredPackages: fedora-workstation-repositories libvirt-daemon-config-network libvirt-daemon-kvm qemu-kvm virt-install
                            virt-manager
                 Initramfs: --add-drivers 'vfio vfio-pci vfio_iommu_type1 vfio_virqfd'
3 Likes

I almost want to pin this because I’d started down this path too and got stuck on a few things but I’m not going to get back to it for a couple of weeks probably.

1 Like

I’m seeing the light at the end of the tunnel! Once everything is set and going I think I’m going to really enjoy this experience. On Fed33 I built a “devops-toolbox” container image that I plugged into VS-Code. I just have a real burning hate of admining long lived machines even if they were admined well :slight_smile: .

Hopefully sometime this week I can pickup on Flatpak · Issue #168 · gnif/LookingGlass · GitHub

This audio thing though will end up being a tough hurdle though. Especially given all the new pipewire stuffs in Fed34. I’m surprised to make it this far though :wave: from flatpak’d google-chrome. What was really fun was continuing mining on my Linux host since I have a Radeon VII hooked up… I’m now uhhh doing that in a arch container with teamredminer.

Once you do enter the rabbit hole make sure to jot your thoughts.

1 Like

So it turns out… my earlier troubles was due to good ole’ SELinux :slight_smile: . I have pulse-pipewire going. I’m going to do some testing this weekend and update the post with a TL;DR of the steps I took to get here.

2 Likes

…Bit of a lurker (and not running fedora)…

A couple months ago I switched my setup from PulseAudio to PipeWire (shortly after this article was published on LWN). While the sound on my host worked immediately, I did notice some weirdness (popping, etc) when running my gaming vm.

I ended up setting up a Scream (github), which is similar to Looking Glass, but for sound. It’s been rock solid - though the new Qemu 6 version seems to have broken all thing IVSHMEM for me, so I’m still rocking v5.2…

@anthr76 - I’m interested what your issue ended up being (especially those not necessarily SE Linux related)? I’m not sure I’d switch away from my current scream setup, but call me curious!

Update

If anyone ends up stumbling across this post - I’m not using scream via IVSHMEM anymore, but over virtual network bridge (see the looking glass wiki). Still works great - and should be simpler to setup.

1 Like