Most recent kernel where this bug did *NOT* occur: none Distribution: Fedora 6 Hardware Environment: Kontron Revolution Weatherproof Laptop Software Environment: Stock standard environment. All modules are Fedora distribution. Updated to latest. Problem Description: No samrtbattery entry in /proc/acpi/battery Have a specialised weatherproof laptop with a smartbattery running FC6 latest kernel. I cannot get battey monitoring going. Have loaded modules i2c_ec and sbs with out any errors. log/messages indicate that the EC driver loads with ACPI: EC HC smbus [SMB1] There is nothing from the sbs module though it is loaded and the /proc/acpi/battery directory is empty. The smartbattery can be recognized. If I run the following command ... smartbattery 1 (1 is to specify the i2c dev, needs i2c-dev module loaded) then I get battery status, which behaves properly (changes if I unplug AC etc). It shows Battery name, status , charge or discharge current, time to full/left, temperature etc. The smartbattery command came with the initial code exploring the ec-smbus interface a couple of years ago by Bruno Ducrot. However nothing shows up in the proc/acpi/battery directory under the sbs module, and therefore the gui battery indicators do not work Any suggestions? Love to get this working in the gui. Posted this to acpi group, and Alexey Starikovskiy asked me to post here with output from acpidump will be attached next John
Created attachment 11625 [details] acpidump output
sbs driver in kernel relies on SBS having ACPI0002 HID and not REVO0002 as it is in your case. To make it work you need to replace sbs.c:129 .ids=ACPI_SBS_HID with .ids="ACPI0002,REVO0002". Note "O" is not zero in the name.
Alexey, This worked quite nicely thanks. Once you described the fix it was obvious from the DSDT, and the ACPI specs. Maybe a log output that says that the HID wasnt found would be nice. I will pass this info on the Kontron people. I suppose that a module parameter is not possible to allow a load-time configuration? Otherwise this bug could be closed. John
Notebooks with Smart Batteries are quite rare, but the sbs module is loaded by each distribution kernel, thus message of absent HID will do more harm than benefit. I was considering of moving a check up to the parent device -- it is smbus host controller with ids="ACPI0001,ACPI0005", as it is more needed for successful work of SBS
Created attachment 11690 [details] Find SBS by SMBUS host controller HID John, could you please check if following patch detects your batteries?
Alex, I downloaded the latest kernel 2.6.22-rc4 and applied your patches. Success - this works nicely with no other changes to code. Thanks. Just have to wait till my distro goes to 2.6.22! Would this version back port or there a lot of changes in the rest of the acpi code? Cheers John
Should work with .21, may be with some minor modifications... And with .20 with some more mods.
#define ACPI_SBS_HID "ACPI0002" - .ids = ACPI_SBS_HID, + .ids = "ACPI0001,ACPI0005", Is it possible that ACPI0002 is ever present without ACPI0001 or ACPI0005?
patch in comment #5 shipped in Linux-2.6.23-rc1 closed.