Switched to Pipewire but can't find how to control audio

Hello,
I recently switched to pipewire from pulseaudio. I did it by installing manjaro-pipewire meta package.
I chose wireplumber as session manager.

I think installation uninstalled lot of pulseaudio stuff and now pavucontrol and pactl doesn’t work
pavucontrol says no pulseaudio server which is expected because pulseaudio is just get uninstalled in process. Also pactl info gives error pa_context_connect() failed: Connection refused

I have also installed pipewire-pulse and pipewire-alsa packages. and rebooted multiple times and checked that pipewire services are running in user mode.

What is correct way now to switch between different audio target, control volume etctetc?
Also keyboard soundcontrol buttons stopped working.

I DO have sound from spotify app and from brave/chrome browsers I just cannot control too much it.
I started whole process because suddently sounds stopped working and I get them back after this switch.

I have bluetooth headset and external speakers plugged in to stereo output of my laptop.

$ systemctl --user status pipewire.*
● pipewire.socket - PipeWire Multimedia System Socket
     Loaded: loaded (/usr/lib/systemd/user/pipewire.socket; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-01-27 14:08:04 EET; 40min left
      Until: Thu 2022-01-27 14:08:04 EET; 40min left
   Triggers: ● pipewire.service
     Listen: /run/user/1000/pipewire-0 (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pipewire.socket

tammi 27 14:08:04 kertzi-laptoppi systemd[1172]: Listening on PipeWire Multimedia System Socket.

● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-01-27 14:08:04 EET; 40min left
TriggeredBy: ● pipewire.socket
   Main PID: 1180 (pipewire)
      Tasks: 2 (limit: 38092)
     Memory: 7.8M
        CPU: 54ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─1180 /usr/bin/pipewire

tammi 27 14:08:04 kertzi-laptoppi systemd[1172]: Started PipeWire Multimedia Service.
$ systemctl --user status pipewire-pulse.*
● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-01-27 14:08:04 EET; 39min left
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 1182 (pipewire-pulse)
      Tasks: 2 (limit: 38092)
     Memory: 1.6M
        CPU: 12ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─1182 /usr/bin/pipewire-pulse

tammi 27 14:08:04 kertzi-laptoppi systemd[1172]: Started PipeWire PulseAudio.

● pipewire-pulse.socket - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.socket; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-01-27 14:08:04 EET; 39min left
      Until: Thu 2022-01-27 14:08:04 EET; 39min left
   Triggers: ● pipewire-pulse.service
     Listen: /run/user/1000/pulse/native (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pipewire-pulse.socket

tammi 27 14:08:04 kertzi-laptoppi systemd[1172]: Listening on PipeWire PulseAudio.
$ systemctl --user status wireplumber.*
● wireplumber.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-01-27 14:08:04 EET; 39min left
   Main PID: 1181 (wireplumber)
      Tasks: 4 (limit: 38092)
     Memory: 23.8M
        CPU: 278ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/wireplumber.service
             └─1181 /usr/bin/wireplumber

tammi 27 14:08:04 kertzi-laptoppi systemd[1172]: Started Multimedia Service Session Manager.
tammi 27 14:08:04 kertzi-laptoppi wireplumber[1181]: Failed to set scheduler settings: Operation not permitted
tammi 27 13:14:14 kertzi-laptoppi wireplumber[1181]: unknown AT+IPHONEACCEV key:2 value:0
tammi 27 13:14:14 kertzi-laptoppi wireplumber[1181]: Failed to register battery provider. Error: org.freedesktop.DBus.Error.UnknownMethod
tammi 27 13:14:14 kertzi-laptoppi wireplumber[1181]: BlueZ Battery Provider is not available, won't retry to register it. Make sure you are

Output of inxi -Fxxxx

System:
  Host: kertzi-laptoppi Kernel: 5.16.2-1-MANJARO x86_64 bits: 64
    compiler: gcc v: 11.1.0 Desktop: N/A wm: xfwm 4.16.1 vt: 7
    dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20NR001MMX v: ThinkPad L390
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20NR001MMX v: SDK0J40697 WIN
    serial: <superuser required> UEFI: LENOVO v: R10ET43W (1.28 )
    date: 12/27/2019
Battery:
  ID-1: BAT0 charge: 41.6 Wh (100.0%) condition: 41.6/45.7 Wh (90.9%)
    volts: 12.3 min: 11.1 model: Celxpert 01AV483 type: Li-poly serial: 3615
    status: Full cycles: 120
CPU:
  Info: quad core model: Intel Core i7-8565U bits: 64 type: MT MCP
    smt: enabled arch: Whiskey Lake rev: B cache: L1: 256 KiB L2: 1024 KiB
    L3: 8 MiB
  Speed (MHz): avg: 800 min/max: 400/4600 cores: 1: 800 2: 800 3: 800
    4: 800 5: 800 6: 800 7: 800 8: 800 bogomips: 32012
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620] vendor: Lenovo
    driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3ea0 class-ID: 0300
  Device-2: Sonix QHD Webcam type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 1-2.2:6 chip-ID: 3c45:6366 class-ID: 0102 serial: SN0001
  Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-5:3 chip-ID: 04ca:7070 class-ID: 0e02
  Display: x11 server: X.Org 1.21.1.3 compositor: xfwm4 v: 4.16.1 driver:
    loaded: intel resolution: 1: 1920x1080~60Hz 2: 3840x1080~60Hz s-dpi: 96
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Cannon Point-LP High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9dc8
    class-ID: 0403
  Device-2: Sonix QHD Webcam type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 1-2.2:6 chip-ID: 3c45:6366 class-ID: 0102 serial: SN0001
  Sound Server-1: ALSA v: k5.16.2-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.43 running: yes
Network:
  Device-1: Intel Cannon Point-LP CNVi [Wireless-AC] driver: iwlwifi
    v: kernel bus-ID: 00:14.3 chip-ID: 8086:9df0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: 48:89:e7:88:71:9c
  Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15be class-ID: 0200
  IF: enp0s31f6 state: down mac: 48:2a:e3:42:e9:59
  IF-ID-1: docker0 state: down mac: 02:42:67:ff:5c:6d
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 1-10:7 chip-ID: 8087:0aaa class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Drives:
  Local Storage: total: 476.94 GiB used: 295.33 GiB (61.9%)
  ID-1: /dev/nvme0n1 vendor: Western Digital
    model: PC SN720 SDAQNTW-512G-1001 size: 476.94 GiB speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: 184257801024 rev: 10190101 temp: 44.9 C
    scheme: GPT
Partition:
  ID-1: / size: 345.75 GiB used: 295.3 GiB (85.4%) fs: ext4
    dev: /dev/nvme0n1p5
  ID-2: /boot/efi size: 256 MiB used: 29 MiB (11.3%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 38 GiB used: 0 KiB (0.0%) priority: -2
    file: /var/swap/swapfile
Sensors:
  System Temperatures: cpu: 17.0 C pch: 47.0 C mobo: N/A
  Fan Speeds (RPM): fan-1: 0
Info:
  Processes: 281 Uptime: 14m wakeups: 7 Memory: 31.02 GiB
  used: 3.72 GiB (12.0%) Init: systemd v: 250 Compilers: gcc: 11.1.0
  clang: 13.0.0 Packages: 1573 pacman: 1565 snap: 8 Shell: Bash v: 5.1.16
  running-in: xfce4-terminal inxi: 3.3.12

Thanks for your help and time in advice!

The panel control for audio may not work in Xfce with Pipewire, but Pipewire can allegedly use pavucontrol for setting audio levels. Share the output:

systemctl --user list-unit-files | grep pipewire

Here is output of list-unit-files:

$ systemctl --user list-unit-files|grep pipewire
pipewire-pulse.service                                                        enabled   enabled
pipewire-session-manager.service                                              alias     -
pipewire.service                                                              enabled   enabled
pipewire-pulse.socket                                                         enabled   enabled
pipewire.socket                                                               enabled   enabled

This conflicts with wireplumber so disable it:

systemctl --user --now disable pipewire-media-session
systemctl --user --now enable wireplumber

Reboot and see if that works.

I ran disable for pipewire-session-manager.service (which is only alias btw) and enabled wireplumber and rebooted.
No change. Still pavucontrol not working and pactl gives connection refused.

Any other ideas what is wrong in my setup?

Have you installed bluez and bluez-libs bluez-qt ?

Yes, I have those installed. My headphones connects correctly. So I believe bluetooth stack is working.
I just can’t find a way how to switch sound to them because pavucontrol and pactl doesn’t work.

dont if this will prove useful but my working pipewire setup reads

$ systemctl --user list-unit-files|grep pipewire
pipewire-media-session.service                                   enabled   enabled
pipewire-pulse.service                                           disabled  enabled
pipewire-session-manager.service                                 alias     -
pipewire.service                                                 disabled  enabled
pipewire-pulse.socket                                            enabled   enabled
pipewire.socket                                                  enabled   enabled

both pipewire.service & pipewire-pulse.service seem disabled and triggered only by their respective sockets.

$ systemctl --user status pipewire-pulse.service
● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; disabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-01-28 13:09:04 +0530; 7min ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 1363 (pipewire-pulse)
      Tasks: 2 (limit: 9357)
     Memory: 9.3M
        CPU: 2.870s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─1363 /usr/bin/pipewire-pulse

Jan 28 13:09:04 koshika systemd[1025]: Started PipeWire PulseAudio.

note: maybe not relevant here, i dont use wireplumber, though sophisticated, from the bit of reading and issues reported here, seem to be still work-in-progress

Hello, thanks for input.
Do you have any pulseAudio services running?

I don’t clearly understand how pipewire should work with pavucontrol etc. which originally are created for pulseaudio.

EDIT: I switched to pipewire-media-session but no change

No, it does not. Both wireplumber and pipewire-media-session provide pipewire-session-manager. They cannot be installed at the same time.

Okay, thanks. But what could be wrong when pactl can’t find it then? I’m totally lost here.

https://bbs.archlinux.org/viewtopic.php?id=264400

Now I got i working.
I did have in /etc/pulse/client.conf custom configuration:

default-server = unix:/tmp/pulse-server

I comment that line and pactl and pavucontrol now finds pulseaudio.

Still sounds doesn’t switch to headphones even when I have default sink set to bluetooth sink:

$ pactl info |grep 'Default Sink'
Default Sink: bluez_output.C4_6E_7B_16_FC_F9.a2dp-sink

EDIT:
Spotify now plays on headphones but my brave browser don’t.

i think a review of your custom configs on PA is warranted. remove all and see.

Yes, I have to do that. I also noticed that I’m missing default configs from /etc/pipewire
I have now copied default templates of media-session and pipewire-pulse related from /usr/share/pipewire to /etc/pipewire/*