You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module, and consequently the battery-life module, do not work on all Linux-based systems due to a hard-coded expectation of the location of the battery in the filesystem (ie. /org/freedesktop/UPower/devices/). For instance, my Arch Linux machine uses /sys/class/power_supply/BAT0/, although some systems may still use the now deprecated (as of kernel 2.6.24) /proc for such information.
The text was updated successfully, but these errors were encountered:
As always, it's hard to account for all the differences in all Linux distros. One alternative would be to check if the path exists before and then use that. Do you know of any other paths used?
So, I think we should remove the battery_ prefix from the results outputted in https://github.com/kevva/linux-batteries (since that's already implicit), and then change the location to check in here to /sys/class/power_supply/${battery} and fall back to the /proc path. It seems to be the best solution to maintain cross platform compatibility.
I have no Linux system available so any help with this would be greatly appreciated.
This module, and consequently the battery-life module, do not work on all Linux-based systems due to a hard-coded expectation of the location of the battery in the filesystem (ie.
/org/freedesktop/UPower/devices/
). For instance, my Arch Linux machine uses/sys/class/power_supply/BAT0/
, although some systems may still use the now deprecated (as of kernel 2.6.24)/proc
for such information.The text was updated successfully, but these errors were encountered: