Bluetooth
Bluez provides Bluetooth support for openSUSE. Both GNOME and KDE have full featured Bluetooth manager GUI. (Xfce and other DEs may not fully support.) It supports most smart phones, headsets, speakers and mouses.
Pairing
PCs and smart phones can be paired in host or guest mode. Host mode is mostly used for computer.
- Power on your Bluetooth devices, enable Bluetooth module and make it discoverable. For smart phones and other computers, you can do it in Settings app. For other accessories, you should find a Bluetooth button/switch on the device. Please read device's manual.
- In your computer, click Bluetooth icon on your desktop panel.
- Enable Bluetooth if it is disabled.
- You should find a "Add new device" button, click it to open discover dialog.
- Waiting for several seconds, your devices will be listed.
- Choose your device to pair.
- If you are connecting to smart phones or other computers, you need to confirm on the device's pop up window. Pass code might be needed. Other devices may require you to click a button to confirm. Please read device's manual.
Next time, you can quickly connect to the device by clicking its name on the Bluetooth device list. You can even set it to be auto connected.
Change device name
To change the default device name update the config file as root:
- vim /etc/bluetooth/main.conf
- Add a new line with the format "Name = {desired_name}" and replace {desired_name} with preferred device name
- Save the main.conf file
- Restart the bluetooth service "systemctl restart bluetooth"
Known issues
File transfer not working
Description
openSUSE Tumbleweed and Leap 15.5 may have this issue. BUG#1198626
If you transfer files through Bluetooth, you get error about "obex service is not available".
Solution
Run the following commands:
sudo zypper in bluez-obexd systemctl --user start obex systemctl --user enable obex
Bluetooth headsets have poor sound quality
Description
Bluetooth headsets usually have two data transfer mode:
- A2DP - with high quality
- HSP/HFP - support microphone input, but sound quality is bad
By default, KDE will choose HSP/HFP mode if your headset has a microphone. See KDE Bug 410574.
Solution
Go to "System Settings → Multimedia → Audio Volume → Advanced". Change the profile of Bluetooth headset to A2DP.
Bluetooth headset is auto connected but not recognized
Description
In KDE, paired Bluetooth headset can be auto connected. But it is not recognized as audio output devices. See KDE Bug 368883.
Solution
Disconnect the headset in Bluetooth device list. Then manually connect it again by clicking the Connect button.
Troubleshooting
Bluetooth Connection
Cannot connect to paired Bluetooth devices
Description
If you have a Bluetooth device paired with your openSUSE but cannot connect it anymore, try the following solutions.
Solution 1
- Power off your Bluetooth device.
- Restart your computer.
- Power on your Bluetooth device.
- Try to connect again.
If this solution doesn't work for you, try next...
Solution 2
- Go to Bluetooth devices list.
- KDE: System Settings -> Network -> Bluetooth -> Devices, or right-click Bluetooth icon in system tray and select "Configure Bluetooth" in context menu.
- GNOME: right-click Bluetooth icon in panel and select "Preferences".
- Remove the paired Bluetooth device.
- If the Bluetooth device is a smartphone or another computer, unpair in their OS, too.
- Pair the device and your computer again.
Bluetooth Audio (Headset, Speaker, Microphone, etc.)
Bluetooth headsets have different data transfer modes. And you should know the main differences:
- A2DP - high quality audio output, but doesn't support microphone audio input. Use it for listening music and watch movies.
- HSP/HFP - low quality audio output, and supports microphone audio input. Use it for voice call and online meeting.
- LE Audio - low-energy audio standard announced in 2020. The standard codec is LC3 (Low Complexity Communication Codec).
The above profiles are supported by the BlueZ 5 stack. PipeWire supports LE Audio’s Basic Audio Profile (BAP) from version 0.3.59 onwards.
More info: http://www.bluez.org/
Bluetooth headset/speaker/microphone is not shown in audio device list
Most audio devices are managed by pulseaudio. However, if you installed flatpak application, you will also install pipewire, which makes it possible to provide audio access for sandboxed applications. Sadly, here are conflicts between pulseaudio and pipewire. The solution is to install pipewire-pulseaudio to replace pulseaudio.
sudo zypper install pipewire-pulseaudio
You will be asked to uninstall pulseaudio. Choose Yes and reboot your system.
More info: openSUSE:Pipewire
Microphone is not working on Bluetooth headset
After pairing a Bluetooth headset, my setup defaulted to the A2DP audio profile which offers high-quality sound listening but no microphone capabilities. For both listening and speaking experience, you need to switch to the HSP/HFP profile. Note that HSP/HFP audio profile has lower audio quality when compared to the A2DP profile due to bi-directional capability.
Switching to HSP/HFP profile does not work properly in Linux, you need to take the following steps to make it work.
1. Install the ofono
package. It includes files needed for software mobile communication:
# sudo zypper install ofono
2. Manually configure PulseAudio to use the ofono backend. Edit the file etc/pulse/default.pa
and modify the line that contains module-bluetooth-discover
in the following way:
.ifexists module-bluetooth-discover.so load-module module-bluetooth-discover headset=ofono .endif
3. Grant permission for PulseAudio to use ofono. Edit the file /etc/dbus-1/system.d/ofono.conf
and add the following block as the last policy in that file:
<policy user="pulse"> <allow send_destination="org.ofono"/> </policy>
4. Ofono requires a modem to work properly. A virtual modem is part of the phonesim
package
which is found in 3rd party repositories, for example:
$ sudo zypper ar https://download.opensuse.org/repositories/home:/tdoerges/openSUSE_Leap_15.1/home:tdoerges.repo $ sudo zypper ref $ sudo zypper in phonesim
5. To create a virtual modem, create a new file /etc/ofono/phonesim.conf
with the following content:
[phonesim] Driver=phonesim Address=127.0.0.1 Port=12345
Feel free to pick a different port, if you cannot use the port 12345.
6. Get tools to test and enable the virtual modem:
$ git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git cd ofono/test
7. Start new instance of virtual phonesim modem:
$ phonesim -p 12345 /usr/share/phonesim/default.xml &
8. Restart the ofono
service:
$ sudo systemctl restart ofono.service
9. Enable the virtual modem and put it online
$ ./enable-modem /phonesim $ ./online-modem /phonesim
10. Restart the bluetooth service:
$ sudo systemctl restart bluetooth.service
11. Pair and connect your bluetooth headset. Now you will be able to switch to the HSP/HFP profile properly.