Step-by-Step Guide to Enabling Experimental Features of Bluez in Ubuntu

Bugged by a Bluetooth device you use not showing battery levels in Ubuntu?

There is a something you can try that may get it to appear.

Ubuntu, like most desktop Linux distributions Ubuntu, use Bluez as its Bluetooth stack. This powerful, open-source tech works with a wide range of bluetooth devices including mice, keyboards, gamepads, bluetooth headphones, sound bars, speakers, and so on.

In most cases, Bluetooth devices “just work” in Ubuntu once you’ve paired them. Most Bluetooth devices with a battery show their battery level in Settings > Power panel (if the device is connected, obviously).

Useful Extension

Show Battery Levels in Bluetooth Menu

But you might use a Bluetooth device that should show a battery level there, but doesn’t — and you might be confused as to why.

Some items need Bluez experimental features enabled for their battery levels to appear.

From personal experience, modern Bluetooth headphones, speakers, sound bars, and other audio devices often fall in to this category.

Generally speaking (there are exceptions, e.g., Apple devices) if a Bluetooth device shows battery levels when paired with Windows, macOS, Android, or iOS it should be able to show it in Ubuntu with Bluez experimental features.

If it doesn’t, you can try this to see if it works (side note: Fedora Workstation ships with Bluez experimental features turned on by default but Ubuntu doesn’t).

To enable Bluez experimental features in Ubuntu:

  • Open /etc/bluetooth/main.conf as root
  • Find the section titled ‘General’ (near the top)
  • On a new line add Experimental = true
  • Save the file (and hit save again to make sure)
  • Reboot or run systemctl restart bluetooth

Do not ignore the final phase, by the way — if you omit it, there will be no changes.

After activating the experimental elements of Bluez in Ubuntu and restarting your PC or pairing/connecting your bluetooth stack, access Settings > Power (or check the result of bluetoothctl info and search for a ‘battery percentage’ line’).

I hope that the previously undetectable battery level is now visible — if not, at least you gave it a shot!

Even though I cannot absolutely ensure that this adjustment will display battery levels for all objects (let alone make a gadget function) it’s a comparatively straightforward modification to test (and crucially simple to remove, just eliminate the lines you placed).

Let me know how you get on!


Posted

in

, ,

by

Tags: