Re: Fedora 34 Change: Route all Audio to PipeWire (System-Wide Change)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020-12-21 3:31 a.m., Tom Hughes via devel wrote:
On 20/11/2020 16:26, Ben Cotton wrote:

== Summary ==
This change proposal is to route all audio from PulseAudio and JACK to
the PipeWire Audio
daemon by default.

So I tried this in F33 with the packages from updates-testing
and I'm afraid to say it didn't end well...

Audio functionality should be like it was before with the Pulseaudio
daemon. Some things to verify:

  - patcl info should now list: Server Name: PulseAudio (on PipeWire 0.3.x)

As pactl was removed by the switch I couldn't test this.

pactl command is still present after replacing pulseaudio by pipewire-pulseaudio.


pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 34
Server Protocol Version: 34
Is Local: yes
Client Index: 78
Tile Size: 65472
Server Name: PulseAudio (on PipeWire 0.3.18)
Server Version: 14.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000:03:00.6.analog-stereo
Default Source: alsa_input.pci-0000:03:00.6.analog-stereo
Cookie: 5667:4fbd


  - gnome-control-center: check the audio tab, check the volume sliders
and do the audio channel test. Change the card profile, plug/unplug
headphones and observe correct
                          switch.

This worked initially, but see later.

  - pavucontrol: check volumes in the input devices tabs and check the
microphone volumes

Didn't test this.

Worked fine.



  - firefox: check out a website with audio/video such as youtube and
verify that audio works as
             usual. Check out a website with a video chat test page
(bluejeans.com/111).

Didn't test this.
Works.

  - rhythmbox: check if playback works as expected

This worked initially, but see later.

Works here.



  - bluetooth devices, connect as usual and verify working behaviour
with PipeWire. Check volume changes etc.

I was unable to get this to work.

Works with Galaxy Buds+ as highlighted below:

pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 34
Server Protocol Version: 34
Is Local: yes
Client Index: 97
Tile Size: 65472
Server Name: PulseAudio (on PipeWire 0.3.18)
Server Version: 14.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: api.bluez5.a2dp.sink.Galaxy Buds+ (11C1)
Default Source: alsa_input.pci-0000:03:00.6.analog-stereo
Cookie: 4766:6514


The first problem is that bluetooth is not actually enabled
by default so you have to edit /etc/pipewire/pipewire.conf and
tell it to add "-e bluez5" when starting the session manager.

Which version of pipewire was used on your system? Pipewire 0.3.18 enabled a bluetooth headphone i.e. Galaxy Buds+ with issue related to resuming for the reopened lid of a laptop. Workaround is with the command for terminal "systemctl --user restart pipewire.service pipewire-pulse.service". See attached pipewire.conf with include bleuz5 enabled by default.



After that my headphones who show up as a device in pw-cli
but not as a target I could send sound to.

An example with Galaxy Buds+:

    id 84, type PipeWire:Interface:Node/3
         factory.id = "7"
         client.id = "31"
         device.id = "83"
         node.description = "Galaxy Buds+ (11C1)"
         node.name = "api.bluez5.a2dp.sink.Galaxy Buds+ (11C1)"
         media.class = "Audio/Sink"
    id 85, type PipeWire:Interface:Port/3
         object.path = "Galaxy Buds+ (11C1):playback_0"
         format.dsp = "32 bit float mono audio"
         node.id = "84"
         audio.channel = "FL"
         port.name = "playback_FL"
         port.direction = "in"
         port.physical = "true"
         port.terminal = "true"
         port.alias = "Galaxy Buds+ (11C1):playback_FL"
    id 86, type PipeWire:Interface:Port/3
         object.path = "Galaxy Buds+ (11C1):monitor_0"
         format.dsp = "32 bit float mono audio"
         node.id = "84"
         audio.channel = "FL"
         port.name = "monitor_FL"
         port.direction = "out"
         port.alias = "Galaxy Buds+ (11C1):monitor_FL"
    id 87, type PipeWire:Interface:Port/3
         object.path = "Galaxy Buds+ (11C1):playback_1"
         format.dsp = "32 bit float mono audio"
         node.id = "84"
         audio.channel = "FR"
         port.name = "playback_FR"
         port.direction = "in"
         port.physical = "true"
         port.terminal = "true"
         port.alias = "Galaxy Buds+ (11C1):playback_FR"
    id 88, type PipeWire:Interface:Port/3
         object.path = "Galaxy Buds+ (11C1):monitor_1"
         format.dsp = "32 bit float mono audio"
         node.id = "84"
         audio.channel = "FR"
         port.name = "monitor_FR"
         port.direction = "out"
         port.alias = "Galaxy Buds+ (11C1):monitor_FR"


The final straw though was that fast user switching seems to
completely break it. I assume that the daemon doesn't release
the audio device when you switch to a different desktop to
something because once I started a second session things got
horribly confused and I wound up with one desktop where audio
worked and one where it didn't work at all.


No issue on my desktop running Rawhide. Maybe some issues are user error like using old version of pipewire. Update your system and make sure pipewire version is 0.3.18 whose pipewire-pulseaudio properly handle dependencies. Should you see Steam from RPM Fusion being removed, grab the latest version from their Koji page which fixes the problem.

--
Luya Tshimbalanga
Fedora Design Team
Fedora Design Suite maintainer

#daemon config file for PipeWire version "0.3.18"

## set-prop is used to configure properties in the system
#
#set-prop library.name.system			support/libspa-support
#set-prop context.data-loop.library.name.system	support/libspa-support
#set-prop link.max-buffers		64
set-prop link.max-buffers		16		# version < 3 clients can't handle more
#set-prop mem.allow-mlock		true
#set-prop log.level			2

## Properties for the DSP configuration
#
#set-prop default.clock.rate		48000
#set-prop default.clock.quantum		1024
#set-prop default.clock.min-quantum	32
#set-prop default.clock.max-quantum	8192
#set-prop default.video.width		640
#set-prop default.video.height		480
#set-prop default.video.rate.num	25
#set-prop default.video.rate.denom	1

## add-spa-lib <factory-name regex> <library-name>
#
# used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
add-spa-lib audio.convert* audioconvert/libspa-audioconvert
add-spa-lib api.alsa.* alsa/libspa-alsa
add-spa-lib api.v4l2.* v4l2/libspa-v4l2
add-spa-lib api.libcamera.* libcamera/libspa-libcamera
add-spa-lib api.bluez5.* bluez5/libspa-bluez5
add-spa-lib api.vulkan.* vulkan/libspa-vulkan
add-spa-lib api.jack.* jack/libspa-jack
add-spa-lib support.* support/libspa-support
#add-spa-lib videotestsrc videotestsrc/libspa-videotestsrc
#add-spa-lib audiotestsrc audiotestsrc/libspa-audiotestsrc

## load-module [-ifexists] <module-name> [<key>=<value> ...]
#
# Loads a module with the given parameters. Normally failure is
# fatal if the module is not found, unless -ifexists is given.
#
load-module libpipewire-module-rtkit # rt.prio=20 rt.time.soft=200000 rt.time.hard=200000
load-module libpipewire-module-protocol-native
load-module libpipewire-module-profiler
load-module libpipewire-module-metadata
load-module libpipewire-module-spa-device-factory
load-module libpipewire-module-spa-node-factory
load-module libpipewire-module-client-node
load-module libpipewire-module-client-device
load-module libpipewire-module-portal
load-module libpipewire-module-access # access.allowed=/usr/bin/pipewire-media-session access.force=flatpak
load-module libpipewire-module-adapter
load-module libpipewire-module-link-factory
load-module libpipewire-module-session-manager

## create-object [-nofail] <factory-name> [<key>=<value> ...]
#
# Creates an object from a PipeWire factory with the given parameters.
# If -nofail is given, errors are ignored (and no object is created)
#
#create-object spa-node-factory factory.name=videotestsrc node.name=videotestsrc Spa:Pod:Object:Param:Props:patternType=1
#create-object -nofail spa-device-factory factory.name=api.jack.device foo=bar
#create-object spa-device-factory factory.name=api.alsa.enum.udev
#create-object spa-device-factory factory.name=api.alsa.seq.bridge node.name=Internal-MIDI-Bridge
#create-object adapter factory.name=audiotestsrc node.name=my-test
#create-object spa-node-factory factory.name=api.vulkan.compute.source node.name=my-compute-source
create-object spa-node-factory factory.name=support.node.driver node.name=Dummy priority.driver=8000

## exec <program-name>
#
# Execute the given program.
#
# Start the session manager. Run the session manager with -h for
# options.
#
# The bluetooth module is disabled by default because it causes
# conflicts with PulseAudio. If you disable PulseAudio or don't
# load its bluetooth module, you can enable it here with -e bluez5
#
exec /usr/bin/pipewire-media-session
#
# You can optionally start the pulseaudio-server here as well
# but it better to start it as a systemd service.
# It can be interesting to start another daemon here that listens
# on another address with the -a option (eg. -a tcp:4713)
#
#exec /usr/bin/pipewire-pulse
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux