gnome-bluetooth-battery-indicator icon indicating copy to clipboard operation
gnome-bluetooth-battery-indicator copied to clipboard

[Info] Making the extension work with using bluetoothctl

Open darcamo opened this issue 3 years ago • 3 comments

I have installed the extension and faced similar problems to other issues created here (only the icon shown, showing "busy", showing "refused" when I tried different ports, etc). I was able to make it work using the "Get Battery levels using bluetoothctl" option, but only after I enabled the --experimental argument of the Bluetooth service.

This can be done as described in this reddit post, which is reproduced below.


  • Activate experimental mode for bluetooth service:

    sudo nano /lib/systemd/system/bluetooth.service
    
  • Add --experimental at the end of the following line:

    ExecStart=/usr/local/libexec/bluetooth/bluetoothd --experimental
    
  • Restart bluetooth service:

    sudo systemctl start bluetooth
    

After that, the extension worked correctly

Disclaimer: I'm currently using pipewire, but I'm not sure it it is important for this.

Disclaimer 2: Enabling the experimental feature might have other impacts that I haven't noticed yet.

darcamo avatar Jan 20 '22 23:01 darcamo

I have reade something about some bluetooth mice not connecting correctly with this flag enabled. The Bluez script was returning device busy, bluetoothctl with this flag worked for me, I don't use other BT devices so it is a good enough fix for now, seems like the issue isn't on the extension, but this is good info for someone looking to troubleshoot this.

Msouza91 avatar Feb 02 '22 19:02 Msouza91

You should use a drop-in file. Never edit any files in /lib (or /usr/local/lib or /usr/lib)!

And only enable the relevant experimental feature (Bluetooth Quality Report).

Run:

$ sudo systemctl edit bluetooth.service

which would open the editor to create an override.conf, e.g. /etc/systemd/system/bluetooth.service.d/override.conf:

[Service]
ExecStart=
ExecStart=/usr/libexec/bluetooth/bluetoothd -E 330859bc-7506-492d-9370-9a6f0614037f

The ExecStart= (blank) line is important. That line clears the value of ExecStart, and only then we're able to set it again.

teohhanhui avatar Apr 19 '22 07:04 teohhanhui

Unfortunately this is not working for me :disappointed: If i execute bluetoothctl info I get the following output shown below with battery level, but the indicator in the top-bar only shows the icon without battery level. Source for battery level is set to Bluetoothctlin the configuration.

Any further hints? Thanks :smiley:

evice E8:7F:6B:54:7F:41 (public)
	Name: Galaxy Buds Pro (7F41)
	Alias: Galaxy Buds Pro (7F41)
	Class: 0x00240404
	Icon: audio-headset
	Paired: yes
	Bonded: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: Vendor specific           (a23d00bc-217c-123b-9c00-fc44577136ee)
	UUID: Vendor specific           (b4a9d6a0-b2e3-4e40-976d-a69f167ea895)
	UUID: Vendor specific           (e7ab2241-ca64-4a69-ac02-05f5c6fe2d62)
	UUID: Vendor specific           (f8620674-a1ed-41ab-a8b9-de9ad655729d)
	Modalias: bluetooth:v0075pA013d0001
	Battery Percentage: 0x51 (81)

linesquarecube avatar Nov 09 '22 13:11 linesquarecube