关于Lubuntu 22.04LTS系统同时连接多套蓝牙耳机的技术咨询
Hey there, totally get the audio headache struggles—been there too with Linux audio setups! Let's break down how to get multiple Bluetooth headsets running at the same time on your Lubuntu 22.04 LTS, without breaking your existing audio setup.
First, let's clear up the confusion about the audio server: Lubuntu 22.04 does use PipeWire by default (not PulseAudio), but the good news is PipeWire has full compatibility with most PulseAudio tools, including paprefs. You won't need to replace PipeWire with PulseAudio to make this work—so no risk of losing audio unexpectedly.
Here's the step-by-step solution:
Install the necessary tools
Open up your terminal and run this command to installpaprefsand the PipeWire-Pulse compatibility layer (this lets PipeWire mimic PulseAudio so tools like paprefs work):sudo apt install paprefs pipewire-pulseThis won't overwrite your default PipeWire setup—it just adds the compatibility bits we need.
Configure paprefs for simultaneous output
Once installed, launch PulseAudio Preferences (either search for it in your app menu or runpaprefsin the terminal). Then:- Go to the Network Server tab and check "Enable network access to local sound devices" (and optionally "Allow other machines on the network to discover local sound devices"—not strictly necessary for local use, but harmless).
- Switch to the Simultaneous Output tab and check "Add virtual output device for simultaneous output to all local sound cards".
- Close the preferences window.
Restart the audio service
To apply the changes, restart your PipeWire services with this terminal command:systemctl --user restart pipewire pipewire-pulseIf you're unsure, a full system restart will also work just fine.
Connect your headsets and switch to the combined output
Pair and connect both Bluetooth headsets via your system's Bluetooth settings. Then:- Open your system's audio settings, or install
pavucontrol(withsudo apt install pavucontrol) for more detailed control. - In the Output Devices section, select the "Simultaneous Output to..." device as your default output. Now audio will play through all connected Bluetooth headsets at the same time!
- Open your system's audio settings, or install
Backup plan if you run into issues
If for some reason you don't like the setup or run into glitches, you can easily revert back to your default audio state:
sudo apt remove paprefs pipewire-pulse systemctl --user restart pipewire
Your audio should go back to normal right away.
Alternative method (no paprefs needed)
If you prefer terminal-only setup, you can skip installing paprefs and directly load a PipeWire module to create a combined sink:
pactl load-module module-combine-sink
Then select the new "Combine" output device in your audio settings. This is a quicker way but less intuitive if you prefer GUI tools.
备注:内容来源于stack exchange,提问作者user1149499

