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

Olimex: no battery found #96

Open
markus2330 opened this issue Feb 19, 2023 · 0 comments
Open

Olimex: no battery found #96

markus2330 opened this issue Feb 19, 2023 · 0 comments

Comments

@markus2330
Copy link

markus2330 commented Feb 19, 2023

When running battop v0.2.4 with battery v0.7.4 on ARM Linux A20-OLinuXino-LIME2 I get following error:

2023-02-19T14:43:20+01:00 - ERROR - Unable to find any batteries in system, exiting
Error: NoBatteries

but there is a battery:

$ ls /sys/class/power_supply/axp20x-battery/
capacity  constant_charge_current  constant_charge_current_max  current_now  device  health  online  power  present  status  subsystem  type  uevent  voltage_max_design  voltage_min_design  voltage_now  wakeup5
$ cat /sys/class/power_supply/axp20x-battery/status
Not charging
$ cat /sys/class/power_supply/axp20x-battery/health 
Good
$ cat /sys/class/power_supply/axp20x-battery/capacity
99
$ cat /sys/class/power_supply/axp20x-battery/online 
1
$ cat /sys/class/power_supply/axp20x-battery/present
1
$ cat /sys/class/power_supply/axp20x-battery/type
Battery

the strace (shortened):

openat(AT_FDCWD, "/sys/class/power_supply", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents64(3, 0xa109cd8 /* 4 entries */, 32768) = 120
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-ac/type", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Ungültige Adresse)
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", 4097)                = 6
read(4, "", 4091)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/type", O_RDONLY|O_LARGEFILE|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", 4097)              = 8
read(4, "", 4089)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/scope", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/manufacturer", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/model_name", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/serial_number", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/technology", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/capacity", O_RDONLY|O_LARGEFILE|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, "99\n", 4097)                  = 4
read(4, "", 4093)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/energy_full", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/charge_full", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/energy_full_design", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/sys/class/power_supply/axp20x-battery/charge_full_design", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
getdents64(3, 0xa109cd8 /* 0 entries */, 32768) = 0
close(3)                                = 0
write(2, "\33[0m", 4)                   = 4
write(2, "\33[31m", 5)                  = 5
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2228, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2228, ...}) = 0
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 2228
_llseek(3, -1410, [818], SEEK_CUR)      = 0
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 4096) = 1410
close(3)                                = 0
write(2, "2023-02-19T14:56:03+01:00 - ERRO"..., 842023-02-19T14:56:03+01:00 - ERROR - Unable to find any batteries in system, exiting
) = 84
write(2, "\33[0m", 4)                   = 4
write(2, "Error: ", 7Error: )                  = 7
write(2, "NoBatteries", 11NoBatteries)             = 11
write(2, "\n", 1
)                       = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant