You are not logged in.

#1 2011-10-10 23:28:38

newarch2011
Member
Registered: 2011-09-18
Posts: 41

[aur] cbatticon no longer recognizes acpi

for some reason when i booted my machine today cbatticon from aur no longer works. it stated acpi not supported but i have acpid installed and it was working up until now. does anyone else use this? i even did an uninstall and reinstall of it and it did not help. right now i switched to vattery but definately prefer cbatticon. or can anyone recommend me a new battery monitor? i looked around aur and tested a few but not sure which to stick with. i dont mind just checking it via a terminal but would prefer to see at a glance.

thanks

Offline

#2 2011-10-11 10:36:59

dobedo
Member
From: Belgium
Registered: 2008-10-04
Posts: 113

Re: [aur] cbatticon no longer recognizes acpi

The problem is that the old way to get ACPI information (/proc/acpi) has been disabled in the latest version of the kernel.
The "new" way is by using /sys/class/power_supply stuffs.

cbatticon uses libacpi which is still using the old ACPI info and so cbatticon is unable to get the ACPI information.
There are patches here and there on internet to change libacpi to the /sys/class/... but as this has again changed, the patch is not working anymore, and is anyway incomplete.

So....it either needs a fix of kernel config, libacpi or cbatticon.

Last edited by dobedo (2011-10-11 10:37:36)

Offline

#3 2011-10-11 22:31:36

newarch2011
Member
Registered: 2011-09-18
Posts: 41

Re: [aur] cbatticon no longer recognizes acpi

what battery monitor would you recommend in this case then?

Offline

#4 2011-10-12 11:33:53

dobedo
Member
From: Belgium
Registered: 2008-10-04
Posts: 113

Re: [aur] cbatticon no longer recognizes acpi

I'm busy migrating cbatticon to the new sysfs structure and will send the patch upstream when done.
I like cbatticon and don't foresee to change now.

Offline

#5 2011-10-13 23:36:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [aur] cbatticon no longer recognizes acpi

Does it have something to do with https://bugs.archlinux.org/task/26416 ?

Offline

#6 2011-10-14 08:45:53

dobedo
Member
From: Belgium
Registered: 2008-10-04
Posts: 113

Re: [aur] cbatticon no longer recognizes acpi

Yes, it's definitely linked.

More precisely, I've contacted the author of libacpi (currently used by cbatticon to get battery info) and ask him if it was foreseen to upgrade libacpi to sysfs. It was not foreseen, but after I provided him some more info he has put it in his todo list. Anyway not to be done in the coming days I suppose.

So, I'm currently changing cbatticon. I've removed libacpi and added libudev, which is a nice and clean way to access sysfs. Computations will be done in cbatticon directly. I'm almost finished with the changes.

I must admit that I've not yet contacted that author of cbatticon, but anyway I want to have it back up and running quickly, so I hope he will accept the changes I will make. If not, I will fork it.

edit: ...additional info: I wanted first to migrate libacpi to the new sysfs structure but it requires way too many changes in the internal structure. The internal design has to be globally reviewed.

Last edited by dobedo (2011-10-14 08:50:31)

Offline

#7 2011-10-25 17:46:58

dobedo
Member
From: Belgium
Registered: 2008-10-04
Posts: 113

Re: [aur] cbatticon no longer recognizes acpi

As agreed with Xentalion, the deprecated libacpi has been replaced by libudev to read /sys/class/power_supply information.
The PKGBUILD will soon be adapted by xentalion to replace libacpi by udev.

There is still a problem I have to look at: it can take a bit of time to have the refreshed info in /sys/... so the value is not always accurate when the notification is sent.

Offline

Board footer

Powered by FluxBB