I am an archlinux user using Sony WH-1000XM3 bluetooth noise-cancellation headphones. I am also using pulseaudio and it took me a while to switch the bluetooth headphones to HSP/HFP profile so the microphone can work too. Switching the bluetooth profile of your headphones to HeadSet Audio works but it is only monophonic audio and without noise-cancellation and I had to switch to piperwire also. But at least now the microphone works!
I was wondering how distros that by default have already switched to pipewire deal with this situation. So I started a fedora 34 (beta) edition and attached both my bluetooth adapter TP-LINK UB400 v1 and my web camera Logitech HD Webcam C270.
The test should be to open a jitsi meet and a zoom test meeting and verify that my headphones can work without me doing any stranger CLI magic.
tldr; works out of the box !
[root@fedora ~]# lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 046d:0825 Logitech, Inc. Webcam C270 Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
as you can see both usb devices have properly attached to fedora34
we need Linux kernel > 5.10.x to have a proper support
[root@fedora ~]# uname -a Linux fedora 5.11.10-300.fc34.x86_64 #1 SMP Thu Mar 25 14:03:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
and of-course piperwire installed
[root@fedora ~]# rpm -qa | grep -Ei 'blue|pipe|pulse' libpipeline-1.5.3-2.fc34.x86_64 pulseaudio-libs-14.2-3.fc34.x86_64 pulseaudio-libs-glib2-14.2-3.fc34.x86_64 pipewire0.2-libs-0.2.7-5.fc34.x86_64 bluez-libs-5.56-4.fc34.x86_64 pipewire-libs-0.3.24-4.fc34.x86_64 pipewire-0.3.24-4.fc34.x86_64 bluez-5.56-4.fc34.x86_64 bluez-obexd-5.56-4.fc34.x86_64 pipewire-gstreamer-0.3.24-4.fc34.x86_64 pipewire-pulseaudio-0.3.24-4.fc34.x86_64 gnome-bluetooth-libs-3.34.5-1.fc34.x86_64 gnome-bluetooth-3.34.5-1.fc34.x86_64 bluez-cups-5.56-4.fc34.x86_64 NetworkManager-bluetooth-1.30.2-1.fc34.x86_64 pipewire-alsa-0.3.24-4.fc34.x86_64 pipewire-jack-audio-connection-kit-0.3.24-4.fc34.x86_64 pipewire-utils-0.3.24-4.fc34.x86_64
In WSLv2 there is a way to limit the resources of your linux distro (cpu/memory) to have a better performance on you win10.
To give you an example, this is how it starts on my HP-G5
~$ free -m total used free shared buffcache available Mem: 12659 68 12555 0 34 12425 Swap: 4096 0 4096 ~$ grep -Ec proc /proc/cpuinfo 8
8 CPU threads, 12G
To define your specs, open cmd and change to your user profile directory
~> cd %UserProfile%
Verify that your WSL distros are stopped:
~> wsl.exe -l -v NAME STATE VERSION * Archlinux Running 2 Ubuntu-20.04 Stopped 1 ~> wsl.exe -t Archlinux -v ~> wsl.exe -l -v NAME STATE VERSION * Archlinux Stopped 2 Ubuntu-20.04 Stopped 1
and terminate wsl
~> wsl.exe --shutdown
Create a new (or edit your previous) wsl config file
~> notepad.exe .wslconfig
My current setup is
~> type .wslconfig [wsl2] memory=4GB # Limits VM memory in WSL 2 to 4 GB processors=2 # Makes the WSL 2 VM use two virtual processors swap=2GB # How much swap space to add to the WSL2 VM. 0 for no swap file. swapFile=C:\wsl2-swap.vhdx
as you can see, I want 4GB of RAM and 2 CPU , but also I want a 2GB swap file.
Edit this file according to your needs. The full settings can be found here wsl/wsl-config.
Reminder: you have to shutdown WSL
Now start your fav linux distro and verify
~$ grep -Ec proc /proc/cpuinfo 2 ~$ grep -Ei MemTotal /proc/meminfo MemTotal: 4028776 kB ~$ free total used free shared buffcache available Mem: 4028776 46348 3947056 64 35372 3848616 Swap: 2097152 0 2097152
that’s it !