# [SOLVED] Battery not detected

## jetboo

Hi, 

I am using an old macbook (late 2008 model) and my battery is not detected by the acpi. I am using the kernel 4.9.6 but this problem is there since a long time although i can't say exactly when it started.

```
 uname -ar:

Linux djanboox 4.9.6-gentoo-r1-nouveau-kernel #5 SMP Wed Feb 22 16:08:25 CET 2017 x86_64 Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz GenuineIntel GNU/Linux
```

Here are the devices that are detected by the kernel (ACPI) during boot.

```
[    0.598959] pnp 00:03: Plug and Play ACPI device, IDs PNP0b00 (active)

[    0.599875] pnp: PnP ACPI: found 4 devices

[    0.605911] ACPI: PCI Interrupt Link [LUS0] enabled at IRQ 20

[    0.657523] ACPI: PCI Interrupt Link [LUS2] enabled at IRQ 17

[    0.658067] ACPI: PCI Interrupt Link [Z000] enabled at IRQ 22

[    0.710512] ACPI: PCI Interrupt Link [Z001] enabled at IRQ 22

[    0.768412] ACPI: PCI Interrupt Link [Z00F] enabled at IRQ 20

[    0.781520] ACPI: AC Adapter [ADP1] (on-line)

[    0.781683] ACPI: Lid Switch [LID0]

[    0.781768] ACPI: Power Button [PWRB]

[    0.781848] ACPI: Sleep Button [SLPB]

[    0.781953] ACPI: Power Button [PWRF]

[    0.789700] ACPI: PCI Interrupt Link [LSI0] enabled at IRQ 18

[    0.793042] ACPI: PCI Interrupt Link [LMAC] enabled at IRQ 17

[    2.010512] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (unknown) filtered out

[    2.014002] ata2.00: ACPI cmd ef/10:03:00:00:00:a0 (unknown) filtered out

[    2.018791] ata2.00: ACPI cmd ef/10:03:00:00:00:a0 (unknown) filtered out

[    2.020484] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (unknown) filtered out

[    2.617125] ACPI: PCI Interrupt Link [LAZA] enabled at IRQ 18

[    4.319920] ACPI: PCI Interrupt Link [LGPU] enabled at IRQ 20

[44880.867162] ACPI : EC: event blocked

[44882.952373] ACPI : EC: interrupt blocked

```

As you can see there is no BAT* devices being detected during the boot, while in the kernel setup the battery is enabled.

```
# Power management and ACPI options

CONFIG_ACPI=y

CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y

CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y

CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y

# CONFIG_ACPI_DEBUGGER is not set

CONFIG_ACPI_SLEEP=y

# CONFIG_ACPI_PROCFS_POWER is not set

CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y

# CONFIG_ACPI_EC_DEBUGFS is not set

CONFIG_ACPI_AC=y

[b]CONFIG_ACPI_BATTERY=y[/b]

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

CONFIG_ACPI_FAN=y

# CONFIG_ACPI_DOCK is not set

CONFIG_ACPI_CPU_FREQ_PSS=y

CONFIG_ACPI_PROCESSOR_CSTATE=y

CONFIG_ACPI_PROCESSOR_IDLE=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_HOTPLUG_CPU=y

# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_CUSTOM_DSDT is not set

CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y

CONFIG_ACPI_TABLE_UPGRADE=y

# CONFIG_ACPI_DEBUG is not set

# CONFIG_ACPI_PCI_SLOT is not set

CONFIG_ACPI_CONTAINER=y

CONFIG_ACPI_HOTPLUG_IOAPIC=y

# CONFIG_ACPI_SBS is not set

# CONFIG_ACPI_HED is not set

# CONFIG_ACPI_CUSTOM_METHOD is not set

# CONFIG_ACPI_BGRT is not set

# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set

# CONFIG_ACPI_NFIT is not set

CONFIG_HAVE_ACPI_APEI=y

CONFIG_HAVE_ACPI_APEI_NMI=y

# CONFIG_ACPI_APEI is not set

# CONFIG_ACPI_EXTLOG is not set

# CONFIG_ACPI_CONFIGFS is not set

CONFIG_X86_ACPI_CPUFREQ=y

# CONFIG_X86_ACPI_CPUFREQ_CPB is not set

CONFIG_PNPACPI=y

CONFIG_ATA_ACPI=y

CONFIG_ACPI_I2C_OPREGION=y

# ACPI drivers

# ACPI drivers

# CONFIG_SENSORS_ACPI_POWER is not set

# ACPI INT340X thermal drivers

# CONFIG_MFD_INTEL_LPSS_ACPI is not set

CONFIG_DMA_ACPI=y

# CONFIG_THINKPAD_ACPI is not set

CONFIG_ACPI_WMI=y

# CONFIG_ACPI_CMPC is not set

```

Acpitool doesn't return anything useful either  

```
acpitool 

  Battery status : <not available>

  AC adapter     : online 

  Thermal info   : <not available>
```

Any idea of whats wrong here ? 

Best,

Can

----------

## jetboo

Solved by upgrading the kernel to 

```
Linux djanboox 4.10.0-gentoo-nouveau-kernel #2 SMP Fri Feb 24 22:44:11 CET 2017 x86_64 Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz GenuineIntel GNU/Linux
```

and enabling Smart battery system ;

```
grep SBS /usr/src/linux/.config

CONFIG_ACPI_SBS=m
```

Cheers

----------

