-
Notifications
You must be signed in to change notification settings - Fork 34
Conversation
Related: #14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, thanks!
The battery widget only displays percentage, so no reason to update it every time some property of the battery device changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am testing it right now.
It works fine expect updating battery level.
Steps to reproduce:
- Connect device
- I see battery level 100%
- Using it for some time
- Battery level is still 100%
- Disconnect and connect again
- Battery level is 50%
I don't see this log: this._logger.info(`${_dev.native_path} notified ${pspec.name}, percentage is ${_dev.percentage}`);
so I guess event never arrived, but I don't know why.
That's weird. Here it updates as expected -- the event is triggered, the percentage is updated. I'm testing on ubuntu 21.04 with the pipewire-upstream PPA enabled (libupower-glib==0.99.11-2, upower==0.99.11-2, bluez==5.56-0ubuntu4.2, pipewire==0.3.38-2~ubuntu21.04) What's the output of I've been using it with my devices and it usually works fine with headset devices (whose battery reporting is still an experimental feature). For keyboard and mice, though, the reported values are not that trustworthy -- my mouse's reported battery level has been alternating between 0% and 20% for the past month (I did not charge it in the meanwhile). My keyboard, after the last charge, insisted in reporting 10%, and now it has started reporting 30-ish% (which seems more precise, given the last time I've charged it). |
On my machine, upower is generating the events as expected:
I'll try to observe on my fedora 34 box to see if the events are being triggered as expected. If on other versions of upower/bluez we observe the percentage values are changing, but no events arriving at the extension, we can swap the notify signal for a timer |
Also:
For my JBL headset, though it has a value for Percentage in dbus, |
Ok, I will merge it and try to find out why on my headphones it doesn't work |
I had an issue after upgrading to ubuntu hirsute (bluez 5.61) on my work computer -- running bluez with experimental features would stop my logitech mouse from reconnecting after reboots or hibernation. The same happens with Fedora on the same machine. The problem seems to be somewhere in the LL Privacy experimental feature. I worked around the it by running bluetoothd with One other option is to pass all experimental UUIDs except for
The supported uuids are present in the upstream
|
I've checked my headphones (Ticpods 2 pro) with So I guess it's issue with my headphones. |
@kassick Thank you very much for this change!
How about using
This should be |
Show battery percentage when a battery is present in upower
fixes #14
Should work out-of-the-box for mice and keyboards.
Headset battery (currently) requires enabling experimental features in bluez:
/etc/systemd/system/bluetooth.service.d/10-experimental.conf
with contents(see #42 (comment) for an explanation of the
none
argument)systemctl daemon-reload
systemctl restart bluetoothd