Closed Chr1s70ph closed 2 years ago
Please share the output of upower -d
. It's probably showing (should be ignored)
for the percentage level, in that case, the applet uses the wrong indicator. Xbox controllers don't support percentage levels but only discrete capacity levels:
Current BLE controllers seem to support battery reporting directly through the Bluetooth protocol - which probably applies to your controller. In that case, the driver should never ever report battery support by itself - so, no, in that case, it's not reported by xpadneo. But I haven't looked into that in detail, only noticed it a few weeks ago.
xpadneo is designed to only create a power supply device after it received the first battery report. If it didn't, it won't create a power supply. You can check if dmesg
reports "battery detected" for xpadneo. If it does, upower -d
should report a power supply device via xpadneo. If it doesn't, the battery info comes from bluez and xpadneo is not involved.
It is showing the correct percentage, that is why I am confused:
Device: /org/freedesktop/UPower/devices/gaming_input_dev_F4_6A_D7_E6_73_BF
native-path: /org/bluez/hci0/dev_F4_6A_D7_E6_73_BF
model: Xbox Wireless Controller
serial: F4:6A:D7:E6:73:BF
power supply: no
updated: Di 29 Mär 2022 13:54:11 CEST (1 seconds ago)
has history: yes
has statistics: no
gaming-input
rechargeable: no
warning-level: none
percentage: 34%
icon-name: 'battery-missing-symbolic'
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: no
updated: Di 29 Mär 2022 09:26:54 CEST (16038 seconds ago)
has history: no
has statistics: no
unknown
warning-level: none
percentage: 0%
icon-name: ''
Daemon:
daemon-version: 0.99.17
on-battery: no
lid-is-closed: no
lid-is-present: no
critical-action: PowerOff
Device: /org/freedesktop/UPower/devices/gaming_input_dev_F4_6A_D7_E6_73_BF native-path: /org/bluez/hci0/dev_F4_6A_D7_E6_73_BF
This native path is not coming from xpadneo, so the bug is somewhere else. xpadneo does not provide this battery level.
I suggest the bug is in the applet. We've seen some awkward interactions from TLP in the past. Do you have TLP installed? (https://linrunner.de/tlp/)
We've seen some awkward interactions from TLP in the past. Do you have TLP installed?
Indeed I did. After uninstalling it (since I don't need it) and rebooting, it works as expected.
It worked for the first time connection. But the 2nd time connecting, still shows 50%.
Does this change if you modprobe hid-xpadneo
before connecting the controller?
Does this change if you
modprobe hid-xpadneo
before connecting the controller?
Yes. modprobe hid_xpadneo
results in 50% again.
Rebooting, and connecting without modprobe
displays the correct value again.
There's no indication in your dmesg
that xpadneo is reporting battery events - otherwise there would be a line about that event. Thus, it is a third-party bug and should be reported to either the bluez or dunst-notification project. Since it depends on the order of loading modules, I'd say dunst-notification is to consider first, it may change behavior of what modules are loaded and what devices match.
It might be that some higher level (HID, proprietary, whatever) setup finishes and causes the device to provide a different value
That is the closest I got to an answer why and where this issue comes from. I am still wondering, if I really am the only one with that problem, if so, then something on my end is not configured/set up correctly (and I don't know what).
I was able to test the new firmware and can confirm that battery is now reported directly through the Bluetooth protocol. It works correctly for me with KDE, so I suspect dunst-notification to have an issue on your side. But I didn't investigate that in regard to this issue report yet, it's just a first idea. I can also confirm that the battery reporting is not coming from HID because xpadneo doesn't get battery reports from the device with the new firmware. It's somehow handled in bluez.
@kakra I am closing this issue, since it has been resolved in https://github.com/blueman-project/blueman/commit/1bd1a4af81879b4e6f604d8a536bd2bc18d984db and now works as expected.
Version of xpadneo
Using the latest git-version (March 29th, 2022)
Controller Model
Connection mode
Installed Software
Severity / Impact
Describe the Bug
When connecting the controller, the battery level is displayed in the Dunst-Notification. It always displays 50% tho, no matter the actual charge state. Using blueman-manager, the correct battery level is displayed there. So the driver correctly reports the battery level, but the notification is sent, before xpadneo is fully loaded. (So I'm not even sure, if it is possible to fix).
Steps to Reproduce
Connect the Controller via bluetooth.
Expected Behavior
The correct battery value is displayed in the notification.
Screenshots / GIFs / Videos
System Information
Controller and Bluetooth Information
xpadneo-btmon.txt xpadneo-dmesg.txt xpadneo-lsusb.txt