Comments (2)
Same here on a Thinkpad P16s AMD.
strace shows it can find a battery and does open some files:
...
openat(AT_FDCWD, "/sys/class/power_supply", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_EMPTY_PATH) = 0
getdents64(3, 0x562a63321ad0 /* 4 entries */, 32768) = 96
openat(AT_FDCWD, "/sys/class/power_supply/BAT0/type", O_RDONLY|O_CLOEXEC) = 4
statx(4, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=4096, ...}) = 0
read(4, "Battery\n", 4096) = 8
read(4, "", 4088) = 0
close(4) = 0
openat(AT_FDCWD, "/sys/class/power_supply/BAT0/scope", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/power_supply/BAT0/manufacturer", O_RDONLY|O_CLOEXEC) = 4
statx(4, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=4096, ...}) = 0
read(4, "SMP\n", 4096) = 4
read(4, "", 4092) = 0
close(4) = 0
openat(AT_FDCWD, "/sys/class/power_supply/BAT0/model_name", O_RDONLY|O_CLOEXEC) = 4
statx(4, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=4096, ...}) = 0
read(4, "LNV-5B10W51869@\320\n", 4096) = 17
read(4, "", 4079) = 0
close(4) = 0
openat(AT_FDCWD, "/sys/class/power_supply/AC/type", O_RDONLY|O_CLOEXEC) = 4
statx(4, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=4096, ...}) = 0
read(4, "Mains\n", 4096) = 6
read(4, "", 4090) = 0
close(4) = 0
...
But then still bails out.
from rust-battop.
I got the same issue
from rust-battop.
Related Issues (20)
- Add --version, -v parameter for battery-cli HOT 2
- Build fails with battery crate version < 0.7.5
- RUSTSEC-2021-0119: Out-of-bounds write in nix::unistd::getgrouplist
- RUSTSEC-2020-0071: Potential segfault in the time crate
- RUSTSEC-2020-0159: Potential segfault in `localtime_r` invocations
- RUSTSEC-2022-0006: Data race in `Iter` and `IterMut`
- Showing info from the currently not discharging battery HOT 2
- arm and arm64 binaries HOT 1
- Make colored labels more contrast HOT 2
- Build failing on Fedora 36 HOT 2
- RUSTSEC-2020-0168: mach is unmaintained
- [feature request] allow fractional "delay" time
- Battery temperature not displayed
- RUSTSEC-2023-0049: `tui` is unmaintained; use `ratatui` instead
- does not compile, `cargo update` fixes it tho HOT 1
- Windows support HOT 8
- Problems on Linux HOT 6
- battop exits when plugging AC back in HOT 5
- Stack overflow on battery removal HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-battop.