You are not logged in.

#1 2024-03-20 15:02:49

dlk
Member
Registered: 2021-02-26
Posts: 25

[Solved?... I guess]Strange behaviour of acpi

Hello everybody,
I have a problem with acpi (most likely the problem isn't acpi itself but something else realated to batteries) in the sense that sometimes when i use acpi to check the battery status (i use it for a custom widget) it shows an unknown battery of which it cant display no information. With sometimes i mean that usualy when i boot the system everything works well but after some time the widget start displaying 0 battery level, so i check acpi and the unknown battery is appeared

acpi -i output:

Battery 0: Unknown, 0%, rate information unavailable
Battery 1: Charging, 55%, 00:49:06 until charged
Battery 1: design capacity 6577 mAh, last full capacity 3544 mAh = 53% 

acpi -i output when it works:

Battery 0: Charging, 55%, 00:49:06 until charged
Battery 0: design capacity 6577 mAh, last full capacity 3544 mAh = 53%

Thx in advance for the help
(btw yes i know, my battery is dead)

Last edited by dlk (2024-03-26 18:19:56)

Offline

#2 2024-03-20 17:39:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,013

Re: [Solved?... I guess]Strange behaviour of acpi

tail /sys/class/power_supply/BAT*/*

and check the dmesg/your journal after the zombie battery appears.
Some notebooks actually have 2 batteries (the replaceable one and a built-in one that takes over and allows you to swap the battery while the system is running) - check your model itr.

Online

#3 2024-03-22 14:16:05

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: [Solved?... I guess]Strange behaviour of acpi

There is only one battery saved as BAT* which is BAT0 as shown by the tail command

output of

tail /sys/class/power_supply/BAT*/*
==> /sys/class/power_supply/BAT0/alarm <==
0

==> /sys/class/power_supply/BAT0/capacity <==
91

==> /sys/class/power_supply/BAT0/capacity_level <==
Normal

==> /sys/class/power_supply/BAT0/charge_full <==
3544000

==> /sys/class/power_supply/BAT0/charge_full_design <==
6577000

==> /sys/class/power_supply/BAT0/charge_now <==
3255000

==> /sys/class/power_supply/BAT0/current_now <==
951000

==> /sys/class/power_supply/BAT0/cycle_count <==
0

==> /sys/class/power_supply/BAT0/device <==
tail: error reading '/sys/class/power_supply/BAT0/device': Is a directory

==> /sys/class/power_supply/BAT0/hwmon1 <==
tail: error reading '/sys/class/power_supply/BAT0/hwmon1': Is a directory

==> /sys/class/power_supply/BAT0/manufacturer <==
BYD

==> /sys/class/power_supply/BAT0/model_name <==
DELL XX3T798

==> /sys/class/power_supply/BAT0/power <==
tail: error reading '/sys/class/power_supply/BAT0/power': Is a directory

==> /sys/class/power_supply/BAT0/present <==
1

==> /sys/class/power_supply/BAT0/serial_number <==
9581

==> /sys/class/power_supply/BAT0/status <==
Charging

==> /sys/class/power_supply/BAT0/subsystem <==
tail: error reading '/sys/class/power_supply/BAT0/subsystem': Is a directory

==> /sys/class/power_supply/BAT0/technology <==
Li-poly

==> /sys/class/power_supply/BAT0/type <==
Battery

==> /sys/class/power_supply/BAT0/uevent <==
POWER_SUPPLY_VOLTAGE_NOW=8759000
POWER_SUPPLY_CURRENT_NOW=951000
POWER_SUPPLY_CHARGE_FULL_DESIGN=6577000
POWER_SUPPLY_CHARGE_FULL=3544000
POWER_SUPPLY_CHARGE_NOW=3255000
POWER_SUPPLY_CAPACITY=91
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=DELL XX3T798
POWER_SUPPLY_MANUFACTURER=BYD
POWER_SUPPLY_SERIAL_NUMBER=9581

==> /sys/class/power_supply/BAT0/voltage_min_design <==
7600000

==> /sys/class/power_supply/BAT0/voltage_now <==
8759000

but if i ls the contents of the directory /sys/class/power_supply/ i get

 > ls /sys/class/power_supply/
AC  BAT0  ucsi-source-psy-USBC000:001  ucsi-source-psy-USBC000:002  wacom_battery_1

of which  AC is the information about the charging state but i don't understand what the other 2 directories are referring to (my laptop has an integrated wacom pen input layer on the screen to which the last directory can be linked to but i see it as strange having informations here)

PS: my laptop doesn't  have any integrated redundant battery to enable battery swaps of sort

Last edited by dlk (2024-03-22 14:18:15)

Offline

#4 2024-03-22 15:58:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,013

Re: [Solved?... I guess]Strange behaviour of acpi

When you drew those outputs you also had the ghost battery in the acpi output??
wacom_battery_1 sure sounds suspicious, if you're not actively using it you could try to blacklist the wacom modules (wacom,wacom_serial4,wacom_i2c,wacom_w8001) and see whether
1. wacom_battery_1 disappears
2. the ghost battery still shows up

Online

#5 2024-03-23 08:28:41

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: [Solved?... I guess]Strange behaviour of acpi

Yes, the ghost battery was present when i tailed the directory and no, since i am actively using the pen input to take notes at uni i cant blacklist those modules

Edit: I have just noticed that the ghost battery appears after i use the pen input on the screen, and the same for the wacom_battery_* in the /sys/class/power_supply directory

output of

 ls /sys/class/power_supply 

· before using the pen

AC  BAT0  ucsi-source-psy-USBC000:001  ucsi-source-psy-USBC000:002

· after using the pen

AC    ucsi-source-psy-USBC000:001  wacom_battery_0 BAT0  ucsi-source-psy-USBC000:002

(now present as wacom_battery_0)

Last edited by dlk (2024-03-23 08:39:06)

Offline

#6 2024-03-23 08:34:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,013

Re: [Solved?... I guess]Strange behaviour of acpi

How frequently does the ghost battery show up?
If frequent enough you could probably check this over the weekend.
Otherwise you could strace acpi and see whether it's trying to do more stuff w/ wacom_battery_1 and in doubt just ignore it.

Online

#7 2024-03-23 08:41:38

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: [Solved?... I guess]Strange behaviour of acpi

As I wrote in the edit of the previous message the ghost battery appears each time after using the pen input
very strange behaviour imo

Offline

#8 2024-03-23 08:47:58

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: [Solved?... I guess]Strange behaviour of acpi

this is the output of strace acpi
i am struggling to understand it so i will post it here

execve("/usr/bin/acpi", ["acpi"], 0x7ffc3a8ce620 /* 52 vars */) = 0
brk(NULL)                               = 0x64917e01e000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=199347, ...}) = 0
mmap(NULL, 199347, PROT_READ, MAP_PRIVATE, 3, 0) = 0x79e772f99000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220^\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
fstat(3, {st_mode=S_IFREG|0755, st_size=1948952, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x79e772f97000
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 1973104, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x79e772db5000
mmap(0x79e772dd9000, 1421312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x79e772dd9000
mmap(0x79e772f34000, 348160, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17f000) = 0x79e772f34000
mmap(0x79e772f89000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d3000) = 0x79e772f89000
mmap(0x79e772f8f000, 31600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x79e772f8f000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x79e772db2000
arch_prctl(ARCH_SET_FS, 0x79e772db2740) = 0
set_tid_address(0x79e772db2a10)         = 21471
set_robust_list(0x79e772db2a20, 24)     = 0
rseq(0x79e772db3060, 0x20, 0, 0x53053053) = 0
mprotect(0x79e772f89000, 16384, PROT_READ) = 0
mprotect(0x64917c40f000, 4096, PROT_READ) = 0
mprotect(0x79e772ffd000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x79e772f99000, 199347)          = 0
getrandom("\xac\x74\xb2\xc9\x0e\xfc\xcc\x58", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x64917e01e000
brk(0x64917e03f000)                     = 0x64917e03f000
chdir("/sys/class")                     = 0
chdir("power_supply")                   = 0
openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents64(3, 0x64917e01e2f0 /* 7 entries */, 32768) = 232
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/current_now", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "0\n", 4096)                    = 2
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/power_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/energy_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/voltage_now", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "5000000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/voltage_min_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/charge_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/energy_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/charge_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/energy_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/online", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "0\n", 4096)                    = 2
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/status", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/type", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "USB\n", 4096)                  = 4
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_0_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_0_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_1_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_1_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_2_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_2_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_3_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_3_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_4_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/trip_point_4_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/cur_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/max_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/power_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/energy_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/voltage_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/voltage_min_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/charge_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/energy_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/charge_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/energy_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/online", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/status", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "Unknown\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "wacom_battery_0/type", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "Battery\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "wacom_battery_0/temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_0_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_0_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_1_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_1_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_2_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_2_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_3_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_3_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_4_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/trip_point_4_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/cur_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "wacom_battery_0/max_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/current_now", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "3250000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/power_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/energy_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/voltage_now", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "20000000\n", 4096)             = 9
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/voltage_min_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/charge_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/energy_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/charge_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/energy_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/online", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "1\n", 4096)                    = 2
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/status", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/type", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "USB\n", 4096)                  = 4
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_0_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_0_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_1_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_1_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_2_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_2_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_3_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_3_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_4_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/trip_point_4_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/cur_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/max_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/current_now", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "1931000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/power_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/charge_now", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "1086000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/energy_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/voltage_now", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "8173000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/voltage_min_design", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "7600000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/charge_full", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "3544000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/energy_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/charge_full_design", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "6577000\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/energy_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/online", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/status", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "Charging\n", 4096)             = 9
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/type", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "Battery\n", 4096)              = 8
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "BAT0/temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_0_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_0_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_1_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_1_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_2_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_2_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_3_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_3_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_4_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/trip_point_4_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/cur_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "BAT0/max_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/current_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/power_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/charge_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/energy_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/voltage_now", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/voltage_min_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/charge_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/energy_full", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/charge_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/energy_full_design", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/online", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "1\n", 4096)                    = 2
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "AC/status", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/type", O_RDONLY)   = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
read(4, "Mains\n", 4096)                = 6
read(4, "", 4096)                       = 0
close(4)                                = 0
openat(AT_FDCWD, "AC/temp", O_RDONLY)   = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_0_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_0_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_1_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_1_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_2_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_2_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_3_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_3_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_4_type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/trip_point_4_temp", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/cur_state", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "AC/max_state", O_RDONLY) = -1 ENOENT (No such file or directory)
getdents64(3, 0x64917e01e2f0 /* 0 entries */, 32768) = 0
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
write(1, "Battery 0: Charging, 30%, 01:16:"..., 49Battery 0: Charging, 30%, 01:16:22 until charged
) = 49
write(1, "Battery 1: Unknown, 0%, rate inf"..., 53Battery 1: Unknown, 0%, rate information unavailable
) = 53
exit_group(0)                           = ?
+++ exited with 0 +++

Offline

#9 2024-03-23 08:59:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,013

Re: [Solved?... I guess]Strange behaviour of acpi

openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/current_now", O_RDONLY) = 4
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/voltage_now", O_RDONLY) = 4
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/online", O_RDONLY) = 4
openat(AT_FDCWD, "ucsi-source-psy-USBC000:002/type", O_RDONLY) = 4
openat(AT_FDCWD, "wacom_battery_0/status", O_RDONLY) = 4
openat(AT_FDCWD, "wacom_battery_0/type", O_RDONLY) = 4
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/current_now", O_RDONLY) = 4
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/voltage_now", O_RDONLY) = 4
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/online", O_RDONLY) = 4
openat(AT_FDCWD, "ucsi-source-psy-USBC000:001/type", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/current_now", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/charge_now", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/voltage_now", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/voltage_min_design", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/charge_full", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/charge_full_design", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/status", O_RDONLY) = 4
openat(AT_FDCWD, "BAT0/type", O_RDONLY) = 4
openat(AT_FDCWD, "AC/online", O_RDONLY) = 4
openat(AT_FDCWD, "AC/type", O_RDONLY)   = 4

It's lookign at everything, wacom has type & status, but nothing else, the uscsi devices have current and voltage.

tail /sys/class/power_supply/*/type

Online

#10 2024-03-23 16:54:14

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: [Solved?... I guess]Strange behaviour of acpi

the output of tail /sys/class/power_supply/*/type

-> tail /sys/class/power_supply/*/type
==> /sys/class/power_supply/AC/type <==
Mains

==> /sys/class/power_supply/BAT0/type <==
Battery

==> /sys/class/power_supply/ucsi-source-psy-USBC000:001/type <==
USB

==> /sys/class/power_supply/ucsi-source-psy-USBC000:002/type <==
USB

==> /sys/class/power_supply/wacom_battery_0/type <==
Battery

Offline

#11 2024-03-23 17:09:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,013

Re: [Solved?... I guess]Strange behaviour of acpi

Yup, it says that it's a battery but doesn't have any of the battery stuff.
https://bugzilla.kernel.org/show_bug.cgi?id=217062

The "fix" linked there is why it's sporadic/when using the pen, https://git.kernel.org/pub/scm/linux/ke … 19ac48734f & https://git.kernel.org/pub/scm/linux/ke … f008bb8cc6

Is the actual problem some statusbar indicator rather than acpi?

Online

#12 2024-03-26 18:23:47

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: [Solved?... I guess]Strange behaviour of acpi

Ok thx i have updated my scripts in order to work anyway and i will live with it since i don't have the skills and the time (really meaning the will) and since it isn't really a problem but more of a "non-damaging implementation bug" i will live with it.
I will update the title as [Solved]

Offline

Board footer

Powered by FluxBB