Requirements
Enable Experimental Bluez
If bluetooth device is not reporting battery level, it could be that it needs Bluez Experimental. Note: Some bluetooth devices may also require to enable Bluez kernel experimental feature.
Check if experimental feature
To check if experimental feature is enabled or not by try the following command. It will echo if experimental flag is enabled or disabled.
bluetoothctl show | grep -q 'PowerState' && echo 'Experimental flag enabled' || echo 'Experimental flag disabled'
Enable experimental feature
There are several ways to enable experimental feature, the easiest way to enable is to edit system file
/etc/bluetooth/main.conf
Search for the line #Experimental = false
and remove the #
and change from false
to true
Experimental = true
Restart the bluetooth service using
systemctl restart bluetooth
Once done check if device displays battery level under Power
in Gnome Control Center (Settings)
Enable kernel experimental feature
Users have reported that some devices will not report battery level until the kernel experimatal flag is enabled. If the battery level is still not reported. Try to enable bluez kernel experimental feaures Edit system file
/etc/bluetooth/main.conf
Search for the line #KernelExperimental = false
and remove the #
and change from false
to true
KernelExperimental = true
Restart the system.
Installation
This extension may conflict with other Bluetooth related Gnome Extensions. It’s better to disable or remove them before using this extension.
If you enable Enhanced Mode, make sure to disable other apps, extensions, or scripts accessing the same device (e.g., AirPods) to avoid conflicts when communicating over the socket.
Gnome Extension Website
- The extension is available on the Gnome Extension Website https://extensions.gnome.org/, where it undergoes a review process upon submission.
- Therefore, it’s recommended to install this extension from the website.
Using Apps
- This will require installing an Extensions or Extension Manager app to manage the Gnome extension.
- Either search for the extension by its name, “Bluetooth Battery Meter” or use the website link below
https://extensions.gnome.org/extension/6670/bluetooth-battery-meter/
Using dbus command
busctl --user call org.gnome.Shell.Extensions /org/gnome/Shell/Extensions org.gnome.Shell.Extensions InstallRemoteExtension s Bluetooth-Battery-Meter@maniacx.github.com
- Running this in console/terminal will download and install extension from Gnome Extension Website.
From Github
- Installation from sources is not recommended but can be done for debugging or testing new updates not yet submitted to Gnome Extension.
- A prerequisite is that gettext needs to be installed.
- Execute
./install.sh
in the terminal to proceed with the installation. - Restart GNOME Shell by logging out and logging back in. Alternatively, on Xorg, you can restart GNOME Shell using
Alt + F2
, then typingr
, and pressing Enter.
Uninstallation
To uninstall this extension, use the Extensions
or Extension Manager
app.
Or
Using commandline to uninstall
gnome-extensions uninstall Bluetooth-Battery-Meter@maniacx.github.com
Although not neccesary, to take a step further and remove all gsettings saved by this extension, you can use the following terminal command:
gsettings --schemadir /home/$USER/.local/share/gnome-shell/extensions/Bluetooth-Battery-Meter@maniacx.github.com/schemas reset-recursively org.gnome.shell.extensions.Bluetooth-Battery-Meter