Skip to content

htop exits if battery meter is added #16

@pfactum

Description

@pfactum

With htop 3.0.0 once battery meter is added or if old htoprc (from 2.2.0) is used (where it was already added and working), htop immediately exits with the following message:

htop: No such file or directory

strace shows this:

openat(AT_FDCWD, "/proc/acpi/battery/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/proc/acpi/ac_adapter", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/power_supply", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents64(4, 0x55e6aa023d40 /* 8 entries */, 32768) = 272
openat(AT_FDCWD, "/sys/class/power_supply/./type", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/power_supply/../type", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, "\33[?12l\33[?25h", 12)        = 12
write(1, "\33[?1006;1000l", 13)         = 13
write(1, "\33[38;1H\33[?1049l\33[23;0;0t\r\33[?1l\33>", 32) = 32
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
write(2, "htop: No such file or directory\n", 32) = 32
exit_group(1)                           = ?

This happens on Lenovo T490s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions