psutil icon indicating copy to clipboard operation
psutil copied to clipboard

[Linux] battery detection in `psutil.sensors_battery()` relies on an assumption which is not true of all systems.

Open sujaldev opened this issue 2 years ago • 1 comments

Summary

  • OS: Linux debian 5.10.0-21-686-pae
  • Architecture: i686
  • Psutil version: 5.8.0
  • Python version: 3.9.2
  • Type: core? (not sure)

Description

Running psutil.sensors_battery() on a HP 520 laptop returns None. The /sys/class/power_supply directory contains C1AB C1AC but no directory that begins in BAT, out of these I think the C1AC is the right directory.

sujaldev avatar Apr 01 '23 05:04 sujaldev

Having this issue on Steamdeck. The PR will fix it I think.

Seraphli avatar Jul 17 '23 20:07 Seraphli