Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sujaldev opened this issue Apr 1, 2023 · 1 comment · May be fixed by #2220

Comments

@sujaldev
Copy link

sujaldev commented Apr 1, 2023

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 sujaldev added the bug label Apr 1, 2023
@github-actions github-actions bot added the linux label Apr 1, 2023
@sujaldev sujaldev changed the title [Linux] psutil.sensors_battery() not working on a HP 520 laptop [Linux] battery detection in psutil.sensors_battery() relies on an assumption which is not true of all systems. Apr 2, 2023
@sujaldev sujaldev linked a pull request Apr 2, 2023 that will close this issue
2 tasks
@Seraphli
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants