Summary: | Battery status not shown for Nintendo switch Pro controller | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | gudvinr+kde |
Component: | Bluetooth widget | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | kde, nate |
Priority: | NOR | ||
Version First Reported In: | 6.1.3 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=505394 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
gudvinr+kde
2024-07-31 09:37:56 UTC
Well, the upstream upower project has something to say about this: https://gitlab.freedesktop.org/upower/upower/-/blob/669a1c2a27a7a590524d7c45ad427ce9ba9afa8c/libupower-glib/up-device.c?page=2#L1185-1191 > The percentage charge of the device. Note that if the battery level property > is something other than %UP_DEVICE_LEVEL_NONE, then this percentage is an > approximation, and should not be used a number to display to the user. then is proceeds to have conditions like: if (battery_level != UP_DEVICE_LEVEL_NONE) g_string_append_printf (string, " battery-level: %s\n", up_device_level_to_string (battery_level)); (else don't print anything) and if (battery_level == UP_DEVICE_LEVEL_NONE) g_string_append_printf (string, " percentage: %g%%\n", up_exported_device_get_percentage (priv->proxy_device)); else g_string_append_printf (string, " percentage: %g%% (should be ignored)\n", up_exported_device_get_percentage (priv->proxy_device)); so we might be not totally wrong on the KDE side. But surely we'd better display at least *something*. I don't have Nintendo Switch Pro Controller with me to test, but I trust your logs, so I'm marking this bug report as CONFIRMED. (In reply to ratijas from comment #1) > Well, the upstream upower project has something to say about this: > so we might be not totally wrong on the KDE side. But surely we'd better > display at least *something*. Tbh, I don't think anyone needs exact battery percentage when they look at bluetooth device list. It is bluetooth device list, for battery values there is power and battery widget. IMO, battery icon with full/not so full/low/need to charge asap indication should be good enough even for devices that do provide exact values (like xbox controller or wireless headphones). Detailed percentage can be shown in dropdown in that case. Also I am not 100% sure but power and battery widget doesn't have indication that device provides "approximate values". Since Bluetooth devices are part of the real world, and as we know the real world is all messed up beyond recognition, things may get weird with some devices. For example, I happened to have a Sony WH-1000XM4 headset, and it reports its battery percentage kinda fine but only in increments of 10%. I never knew before that there is such a flag UP_DEVICE_LEVEL_NONE in Bluetooth, so now I went to check it in the headphones. And nope, it's not there, even though they only report their approximate value: Device: /org/freedesktop/UPower/devices/headset_dev_[[REDACTED]] native-path: /org/bluez/hci0/dev_[[REDACTED]] model: WH-1000XM4 serial: [[REDACTED]] power supply: no updated: Fri 02 Aug 2024 10:51:31 PM CEST (21 seconds ago) has history: yes has statistics: no headset warning-level: none percentage: 50% icon-name: 'battery-missing-symbolic' History (charge): 1722631891 0.000 unknown History (rate): 1722631891 0.000 unknown |