Closed meybonomme closed 2 months ago
Ditto
tree /sys/class/power_supply/hidpp_battery_3
.
├── capacity_level
├── device -> ../../../0003:046D:405E.0016
├── hwmon8
│ ├── device -> ../../hidpp_battery_3
│ ├── name
│ ├── power
│ │ ├── async
│ │ ├── autosuspend_delay_ms
│ │ ├── control
│ │ ├── runtime_active_kids
│ │ ├── runtime_active_time
│ │ ├── runtime_enabled
│ │ ├── runtime_status
│ │ ├── runtime_suspended_time
│ │ └── runtime_usage
│ ├── subsystem -> ../../../../../../../../../../../class/hwmon
│ └── uevent
├── manufacturer
├── model_name
├── online
├── power
│ ├── async
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_kids
│ ├── runtime_active_time
│ ├── runtime_enabled
│ ├── runtime_status
│ ├── runtime_suspended_time
│ ├── runtime_usage
│ ├── wakeup
│ ├── wakeup_abort_count
│ ├── wakeup_active
│ ├── wakeup_active_count
│ ├── wakeup_count
│ ├── wakeup_expire_count
│ ├── wakeup_last_time_ms
│ ├── wakeup_max_time_ms
│ └── wakeup_total_time_ms
├── powers -> ../../../0003:046D:405E.0016
├── scope
├── serial_number
├── status
├── subsystem -> ../../../../../../../../../../class/power_supply
├── type
├── uevent
└── wakeup37
├── active_count
├── active_time_ms
├── device -> ../../hidpp_battery_3
├── event_count
├── expire_count
├── last_change_ms
├── max_time_ms
├── name
├── prevent_suspend_time_ms
├── subsystem -> ../../../../../../../../../../../class/wakeup
├── total_time_ms
├── uevent
└── wakeup_count
Hi, thanks for the issue and for the tree
output.
Some Logitech mice apparently do at least offer the current battery charge as info. I'll implement a fix, which will make Resources ignore batteries that don't at least have the current battery charge in SysFS. :)
In my opinion, it should be limited to just showing the laptop battery information. However, Recources is more of a system monitoring and management tool than for managing external devices. Too many options make an app bloated, especially if they don't add significant value.
Most of the batteries of external devices do not give any other information than the charge level anyway (even that only roughly), especially if it is a non-rechargeable battery. Moreover, GNOME Setting shows the battery level of external devices well enough, and GNOME shell also sends a notification when the battery level is too low:
In my opinion, it should be limited to just showing the laptop battery information. However, Recources is more of a system monitoring and management tool than for managing external devices. Too many options make an app bloated, especially if they don't add significant value.
Most of the batteries of external devices do not give any other information than the charge level anyway (even that only roughly), especially if it is a non-rechargeable battery. Moreover, GNOME Setting shows the battery level of external devices well enough, and GNOME shell also sends a notification when the battery level is too low:
Yeah, that's a good point as well. I'll think about it, maybe others can voice their opinion here too
I've pushed a change to battery-fixes
: non-notebook batteries will be ignored. I'd appreciate if you could test it :)
How can I test it? I'm currently using the Flathub version.
How can I test it? I'm currently using the Flathub version.
You'd have to build Resources yourself. It should work like this:
git clone https://github.com/nokyan/resources.git
cd resources
git checkout battery-fixes
flatpak install org.gnome.Sdk//46 org.freedesktop.Sdk.Extension.rust-stable//23.08 org.gnome.Platform//46 org.freedesktop.Sdk.Extension.llvm18//23.08
flatpak-builder --user flatpak_app build-aux/net.nokyan.Resources.Devel.json
flatpak-builder --run flatpak_app build-aux/net.nokyan.Resources.Devel.json resources
You'd need Rust and flatpak-builder installed. Alternatively, if you don't want to do that, I'd also appreciate if you could tell me what Resources says in the "Device" entry of your normal laptop battery. :)
If I have a bit more time, I can test. My laptop battery info:
If I have a bit more time, I can test. My laptop battery info:
Thanks! I'd like to release 1.5.1 with this fix tomorrow, so I'll merge the branch since your battery should be detected as a laptop battery with the new fix.
I can confirm that Resources now only shows the laptop battery.
Is there an existing issue for this?
Current Behavior
There is no useful information about Logitech mouse and keyboard batteries
Expected Behavior
If the batteries are visible in the selection, they should provide useful information.
Steps To Reproduce
No response
Environment