Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 143 additions & 36 deletions content/bluetooth.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,105 @@ section: network-troubleshooting
tableOfContents: true
---

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sections on how to PAIR, how to REMOVE devices step by step with screenshots should be first part of the article in case a new user visits. Where are bluetooth settings? How can I tell when bluetooth is on/off or note working?

## Important Notes About Bluetooth
### Basic Troubleshooting

Bluetooth is a bit odd.
There are a lot of factors that go into whether Bluetooth devices work together as expected.
Bluetooth issues can be troubleshooted in several ways. The first thing to check is toggling airplane mode which will sometimes get Bluetooth functioning again. Next, make sure Bluetooth is enabled in the top bar, or in the <u>Bluetooth</u> system settings.

Navigate to the upper-right corner of the screen and click on the Settings icon. A window will appear. In the Wi-Fi tab, you'll find the Airplane Mode toggle. Switch it on and off to enable and disable Airplane Mode.

![navigate to settings tab](/images/bluetooth/bluetooth_10.png)

![airplane mode toggle](/images/bluetooth/bluetooth_11.png)

Turn on Bluetooth and confirm it is enabled in the top bar, or in the Bluetooth system settings.

![bluetooth top bar](/images/bluetooth/bluetooth_13.png)

![bluetooth system settings](/images/bluetooth/bluetooth_12.png)

Using systemd:

```bash
sudo systemctl start bluetooth
```

```bash
sudo systemctl enable bluetooth
```

Check the status of the bluetooth

```bash
sudo systemctl status bluetooth
```

Sample output:

![bluetooth status systemd](/images/bluetooth/bluetooth_5.png)

There is a program called <u>Bluetooth Manager</u>. It can sometimes pair and trust Bluetooth devices better than the default <u>Bluetooth</u> settings. Install it with:

Install Bluetooth related software with this command:

```bash
sudo apt install blueman
```

> After reinstalling the above packages, fully shut down the machine and then power it back on, rather than rebooting. This ensures the hardware completely resets.

Open Bluetooth Manager by pressing Super + Space and search:

![bluetooth manager](/images/bluetooth/bluetooth_2.png)

Remove the device, allowing for a fresh, new connection.

![Remove device](/images/bluetooth/bluetooth_3.png)

Click search and pair the device again:

![Pair device](/images/bluetooth/bluetooth_4.png)

If `tlp` is installed, then there may be settings interfering with Bluetooth functionality. Edit this file and disable Wifi and Bluetooth power saving features:

```bash
sudo nano /etc/tlp.conf
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this About Bluetooth section is necessary. We don't want to describe things as flexible or effortless or smooth or seamless because we can't guarantee compatibility with 3rd party products.

### Bluetooth version

Bluetooth 5.0 is backwards compatible with older Bluetooth versions, but older bluetooth versioned devices are not always compatible with newer versions or devices.

### Confirm the bluetooth version of your device and make sure it is 5.0 or higher

Use bluetoothctl, on your terminal type:

```bash
bluetoothctl
```

If you have multiple Bluetooth controllers, choose the one you wish to connect to the device.

Check list of controllers:
```
List
```

Select the controller you want to use:

```
select <mac address>
```

Check the version:
```
version
```

![bluetoothctl version](/images/bluetooth/bluetooth_1.png)

### Signal Interference

Bluetooth uses the same bandwidth as the 2.4Ghz Wi-Fi band, and in most of our machines it is on the same chip as the Wi-Fi module. They usually have two antennae, one for Bluetooth, and one for Wi-Fi, but it is possible for other Wi-Fi or Bluetooth devices signals to cross and to cause connection issues. If users are in an area crowded with other Wi-Fi networks or devices, the interference from these outside sources can impact performance and range.
Bluetooth uses the same bandwidth as the 2.4Ghz Wi-Fi band, and in some machines it is on the same chip as the Wi-Fi module. The Wi-Fi module usually has two antennae, one for Bluetooth, and one for Wi-Fi, but it is possible for other Wi-Fi or Bluetooth devices signals to cross and to cause connection issues. If users are in an area crowded with other Wi-Fi networks or devices, the interference from these outside sources can impact performance and range.

### Device Specific Differences

Expand All @@ -44,8 +131,6 @@ As the Linux kernel develops, support for more devices are added. Sometimes Blue

Similar to the kernel versions. Improvements are often made in newer versions of Ubuntu and Pop!\_OS. Running software updates is always a good idea, followed by a reboot.

<!--## Bluez Versions-->

### Configuration Issues

Sometimes Bluetooth devices are working correctly, but something in settings needs to be reset.
Expand All @@ -68,48 +153,79 @@ Bluetooth audio devices, such as headphones and speakers, usually default to the
Bluetooth devices with microphones built in, can be used if the device supports HFP/HSP. However, without the technology that companies like Sony have patented, the solution is to divide up the audio stream so that some of it is used for audio out and some for audio in.
This process lowers the sound quality of the stream when in HSP/HFP mode, so audio may be "tinny," compressed (lower-fidelity), or at a lower volume. That is expected behavior.

## Bluetooth Troubleshooting

Bluetooth issues can be troubleshooted in several ways. The first thing to check is toggling airplane mode which will sometimes get Bluetooth functioning again. Next, make sure Bluetooth is enabled in the top bar, or in the <u>Bluetooth</u> system settings.
### Using bluetoothctl

Then, try reinstalling Bluetooth related software with this command, depending on the verison of Pop!\_OS you're using.
Using bluetoothctl over a UI offers more control, flexibility, and efficiency, especially for advanced users. It allows precise management of Bluetooth devices via the terminal, which is faster than navigating through graphical menus. For troubleshooting, bluetoothctl provides direct feedback and logs, which can help identify connection issues, detect devices, or configure settings in real time. It’s also useful for headless or remote setups where a UI might not be available.

*For Pop!\_OS 22.04 or higher:*
To get started, ensure Bluetooth is unblocked by running rfkill to check and enable it if necessary. Use the command:

```bash
sudo apt reinstall --purge bluez gnome-bluetooth
rfkill unblock bluetooth
```
to ensure that Bluetooth is not disabled at the system level.

*For Pop!\_OS 21.10 or 20.04:*
Type:
```
bluetoothctl
```
![bluetoothctl](/images/bluetooth/bluetooth_6.png)

```bash
sudo apt install --reinstall bluez gnome-bluetooth indicator-bluetooth pulseaudio-module-bluetooth
If you have multiple Bluetooth controllers, choose the one you wish to connect to the device:

Check list of controllers:
```
list
```

After reinstalling the above packages, fully shut down the machine and then power it back on, rather than rebooting. This ensures the hardware completely resets.
Check controller information:
```
info <controller_address>
```

If `tlp` is installed, then there may be settings interfering with Bluetooth functionality. Edit this file and disable Wifi and Bluetooth power saving features:
Select the controller you want to use:
```
select <mac address>
```

```bash
sudo gedit /etc/default/tlp
Make sure to power it on
```
power on
```
![bluetoothctl power on](/images/bluetooth/bluetooth_7.png)

### Useful Programs
Look for the device you want to connect:
```
scan on
```
Add trusted device
```
trust <mac address>
```
See list of paired devices:

There is a program called <u>Bluetooth Manager</u> which is included with <u>XFCE</u>. It can sometimes pair and trust Bluetooth devices better than the default <u>Bluetooth</u> settings. Install it with:
```
devices
```

```bash
sudo apt install blueman
To connect the device:
```
connect <mac address>
```
![bluetootctl list scan trust connect](/images/bluetooth/bluetooth_8.png)

Then, run <u>Bluetooth Manager</u>. Check for the device being trusted, and also try re-pairing in that program.
Successful device connection:

![bluetooothctl device connected](/images/bluetooth/bluetooth_9.png)

### Useful Commands
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can 'useful commands' section go to the beginning of the article after the how to remove and pair instructions?


To show if the Bluetooth module (driver) is loaded, and see what system messages have been logged:

```bash
lsmod | grep bluetooth
```

```bash
dmesg | grep Bluetooth
```

Expand Down Expand Up @@ -141,6 +257,9 @@ To manually reload the Bluetooth USB kernel module:

```bash
sudo rmmod btusb
```

```bash
sudo modprobe btusb
```

Expand All @@ -156,18 +275,6 @@ To reset the Bluetooth device profiles and require re-pairing all devices (this
sudo rm -r /var/lib/bluetooth/
```

*For Pop!\_OS 21.10 or 20.04:*

Older Pop!\_OS versions used a PulseAudio module for Bluetooth audio. It's typically loaded by default, but sometimes a manual load can get Bluetooth headsets working again:

```bash
pactl load-module module-bluetooth-discover
```

## Additional Info

Here are a few additional tidbits about the Bluetooth system that may help with troubleshooting.

### Controlling audio

Once you are connected to a Bluetooth speaker, you may need to change where your current audio is "routed". You can get a more advanced interface to settings on audio with the program called PulseAudio Volume Control. To install, run this command:
Expand Down
Binary file added static/images/bluetooth/bluetooth_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/bluetooth/bluetooth_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.