MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
madmax25
Posts: 321
Joined: Fri Apr 10, 2020 12:40 pm

MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#1 Post by madmax25 »

In the lower right corner of my screen, I can see the battery level of my laptop, but if I connect my BT headphones I don't know the according battery level until they stop working.

Is there any way to add that information right to where the ordinary battery level is being displayed or perhaps even add it to Conky, please?

User avatar
Stevo
Developer
Posts: 14547
Joined: Fri Dec 15, 2006 7:07 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#2 Post by Stevo »

Apparently we need to edit the configuration file /etc/bluetooth/main.conf and change the line

Code: Select all

# Experimental = false
to

Code: Select all

Experimental = true
save the file.

I'm running systemd with MX KDE, so I restarted bluetooth with

Code: Select all

systemctl restart bluetooth
(try rebooting if this does not work), reconnected my device, and now its charge level shows in the little Bluetooth taskbar widget when I hover over it.

Let me know if this works on XFCE! You can see it also in the terminal now with the command:

Code: Select all

bluetoothctl info
Mine has the battery % on the last line:

Code: Select all

Device 41:42:05:8A:82:B3 (public)
        Name: F6
        Alias: F6
        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)
        Battery Percentage: 0x28 (40)
So Conky should be able to use that value with the right magic code to scrape the value.
st
MXPI = MX Package Installer
QSI = Quick System Info from menu
The MX Test repository is mostly backports; not the same as Debian testing

madmax25
Posts: 321
Joined: Fri Apr 10, 2020 12:40 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#3 Post by madmax25 »

Sorry, it doesn't seem to work.
I already tried that guide, which led me to my question here.

In the bluetoothctl info, I didn't find any line referring to the wanted battery percentage value,
but I will try it once more, to be sure I didn't miss anything on my first attempt (now, after your post, I actually know what to look for).

I will report back afterwards, asap ...

User avatar
Stevo
Developer
Posts: 14547
Joined: Fri Dec 15, 2006 7:07 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#4 Post by Stevo »

I have heard that some headphones use a nonstandard method to communicate, but I'm using some cheapo BT earbuds. I also have some other cheapos, like several sets of headbands/sleep masks with headphones built in, that one can pick up for a few bucks on AliExpress...yeah, this one works too:

Code: Select all

Device 41:42:53:0E:DE:4F (public)
        Name: BT-Music
        Alias: BT-Music
        Class: 0x00240404
        Icon: audio-headset
        Paired: yes
        Bonded: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        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)
        Battery Percentage: 0x64 (100)
MXPI = MX Package Installer
QSI = Quick System Info from menu
The MX Test repository is mostly backports; not the same as Debian testing

User avatar
dolphin_oracle
Developer
Posts: 22216
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#5 Post by dolphin_oracle »

edit* worked OK after a reboot/reconnect

Code: Select all


┌─[dolphin@mx23kde]─[10:53:47 pm]────────────────────────────────────────────────────────────────────────────────[/]
└─> bluetoothctl info
Device AC:12:2F:DB:15:EC (public)
        Name: Soundcore Life Q30
        Alias: Soundcore Life Q30
        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: Vendor specific           (66666666-6666-6666-6666-666666666666)
        Battery Percentage: 0x5a (90)

**edit***

ah, the usually battery monitor in KDE picks it up right off, if you left click to bring out the expanded battery info. Haven't tried Xfce yet, but even if it doesn't, you could probably make a genmon plugin with a custom bluetoothctl info command work to display a percentage.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
Stevo
Developer
Posts: 14547
Joined: Fri Dec 15, 2006 7:07 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#6 Post by Stevo »

dolphin_oracle wrote: Sun Sep 29, 2024 10:52 pm edit* worked OK after a reboot/reconnect


CLI stuff

[/code]
Does it show up on the xfce taskbar BT widget like the Plasma one if you hover the cursor over it?
MXPI = MX Package Installer
QSI = Quick System Info from menu
The MX Test repository is mostly backports; not the same as Debian testing

User avatar
dolphin_oracle
Developer
Posts: 22216
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#7 Post by dolphin_oracle »

it shows in the Xfce power manager when you left click to get the expanded battery info, just like in KDE.

so easy peasy really.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
timkb4cq
Developer
Posts: 3575
Joined: Wed Jul 12, 2006 4:05 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#8 Post by timkb4cq »

Not hovering on the panel widget. If you open Bluetooth Devices and hover over the symbols to the right of a connected device it does show up.
I'm not convinced it's always a real reading since it doesn't seem to change. It was 90 just after removing from the charger, and is still at 90 after listening for half an hour. Of course this is an $8 set of headphones from Ollie's Outlet.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
dolphin_oracle
Developer
Posts: 22216
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#9 Post by dolphin_oracle »

Image

view from the Xfce4 power manager panel plugin
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
m_pav
Developer
Posts: 1777
Joined: Sun Aug 06, 2006 3:02 pm

Re: MX 23.4 xfce - battery lavel indicator for Bt headphones wanted

#10 Post by m_pav »

Works perfectly on Xfce, no restart needed, just stopped and restarted BT service. This is with my lower mid range Sennheiser HD540 BT Headset (all I could afford) which I use to fix up bad voice recordings.

Blueman Battery icon now shows when connected
Image

Right click and select info in blueman does not show battery info.
Image

Xfce Tray Power Icon shows it
Image
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD Ryzen 5 5600G, 32G, 8TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

Post Reply

Return to “MX Help”