Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
acpi battery status not available
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
babagau
n00b
n00b


Joined: 04 May 2021
Posts: 22
Location: Volos, Greece

PostPosted: Sun Jul 04, 2021 2:26 pm    Post subject: acpi battery status not available Reply with quote

The machine is a 2006 Macbook a1181. I am new in configuring power management. Been working on it.
Code:

acpitool -b
Battery status : <not available>

ls /proc/acpi/
button wakeup

find /proc -name BAT*
returns nothing

rc-update show|grep acpi
acpid | default

rc-update show|grep laptop
laptop_mode | default

grep -i bat config-5.10.27-gentoo
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_ACPI_BATTERY=y
# CONFIG_BATMAN_ADV is not set
# CONFIG_BATTERY_CW2015 is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_DS2782 is not set
CONFIG_BATTERY_SBS=y
# CONFIG_BATTERY_BQ27XXX is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
CONFIG_HID_BATTERY_STRENGTH=y
# CONFIG_USB_STORAGE_USBAT is not set

grep -i sbs config-5.10.27-gentoo
CONFIG_ACPI_SBS=y
CONFIG_BATTERY_SBS=y
CONFIG_CHARGER_SBS=y

grep -i acpi config-5.10.27-gentoo
# Power management and ACPI options
CONFIG_ARCH_SUPPORTS_ACPI=y
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_REV_OVERRIDE_POSSIBLE=y
# CONFIG_ACPI_EC_DEBUGFS is not set
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_TAD is not set
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_CPU_FREQ_PSS=y
CONFIG_ACPI_PROCESSOR_CSTATE=y
CONFIG_ACPI_PROCESSOR_IDLE=y
CONFIG_ACPI_CPPC_LIB=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_PROCESSOR_AGGREGATOR=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_CUSTOM_DSDT_FILE=""
CONFIG_ARCH_HAS_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=y
# CONFIG_ACPI_HED is not set
# CONFIG_ACPI_CUSTOM_METHOD is not set
CONFIG_ACPI_BGRT=y
# CONFIG_ACPI_NFIT is not set
CONFIG_ACPI_NUMA=y
# CONFIG_ACPI_HMAT is not set
CONFIG_HAVE_ACPI_APEI=y
CONFIG_HAVE_ACPI_APEI_NMI=y
# CONFIG_ACPI_APEI is not set
# CONFIG_ACPI_DPTF is not set
# CONFIG_ACPI_CONFIGFS is not set
# CONFIG_X86_ACPI_CPUFREQ is not set
# end of Power management and ACPI options 
# CONFIG_SENSORS_ACPI_POWER is not set

CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
CONFIG_POWER_SUPPLY_HWMON=y

ls /sys/class/power_supply
ADP1

grep -i batt /var/log/dmesg
returns nothing

_________________
love, peace and microchips
Back to top
View user's profile Send private message
babagau
n00b
n00b


Joined: 04 May 2021
Posts: 22
Location: Volos, Greece

PostPosted: Sun Jul 04, 2021 9:57 pm    Post subject: Reply with quote

There is no /proc/acpi/event

/var/lock/acpid lock file does not exist

acpid --foreground
starting up with netlink and the input layer
waiting for events: event logging is off
_________________
love, peace and microchips
Back to top
View user's profile Send private message
babagau
n00b
n00b


Joined: 04 May 2021
Posts: 22
Location: Volos, Greece

PostPosted: Sun Jul 11, 2021 6:27 pm    Post subject: Reply with quote

This is weird, the laptop turned off because of battery drain and after charging and booting, acpi can read the sensor. There were some kernel recompiles all these days, but they were not necessarily associated with the battery sensor, as far as I remember. When I thought it was solved, with the next boot, the reading hangs at

acpi -b
Battery 0: discharging 36% time remaining etc

this also changed:
Code:

ls /sys/class/power_supply/BAT0/
alarm capacity charge_full charge_full_design charge_now current_avg current_now cycle_count device hwmon3 manufacturer model_name power present status subsystem technology temp type uevent voltage_min_design voltage_now wakeup24


still it is progress and we go on...
_________________
love, peace and microchips
Back to top
View user's profile Send private message
babagau
n00b
n00b


Joined: 04 May 2021
Posts: 22
Location: Volos, Greece

PostPosted: Mon Sep 13, 2021 7:47 pm    Post subject: Reply with quote

This post seems to get near to the solution, but it does not mention the exact shell command to mess with the speed of the bus where the battery's gas gauge is.
https://e2e.ti.com:443/support/power-management-group/power-management/f/power-management-forum/210592/bq20z95-linux-i2c-smbus-smartbattery-sbs-not-detected

dmesg:
[18975.987173] smbus_hc ACPI0001:00: SBS HC: offset = 0x20, query_bit = 0x10

i2cdetect -l
i2c-3 i2c i915 gmbus dpc I2C adapter
i2c-1 i2c i915 gmbus vga I2C adapter
i2c-6 i2c SDVO DDC proxy I2C adapter
i2c-4 i2c i915 gmbus dpb I2C adapter
i2c-2 i2c i915 gmbus panel I2C adapter
i2c-0 i2c i915 gmbus ssc I2C adapter
i2c-7 smbus SMBus I801 adapter at efa0 SMBus adapter
i2c-5 i2c i915 gmbus dpd I2C adapter

The partial solution is to turn on the laptop with the charger plugged in.
This way /sys/class/power_supply/BAT0 reappears.
_________________
love, peace and microchips
Back to top
View user's profile Send private message
kocoman
n00b
n00b


Joined: 11 Dec 2022
Posts: 1

PostPosted: Tue Dec 13, 2022 12:02 am    Post subject: Reply with quote

anyone edit to apply this ?
https://web.archive.org/web/20210410071559/https://svn.exactcode.de/t2/trunk/package/base/linux/acpi-sbs-unbrick.diff

thx
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1391
Location: Germany

PostPosted: Tue Dec 13, 2022 9:33 am    Post subject: Reply with quote

Hello and welcome kocoman.

What is the purpose of your post and what is it what you want to achive?
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum