Bug 785261 - acpitool doesn't detect laptop battery on kernel version 3.2.X
Summary: acpitool doesn't detect laptop battery on kernel version 3.2.X
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: acpitool
Version: 26
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Al Stone (Old account - use ahs3@redhat.com)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-27 19:52 UTC by Roy Dragseth
Modified: 2018-05-29 11:55 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:55:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Roy Dragseth 2012-01-27 19:52:14 UTC
Description of problem:

acpitool cannot detect the laptop battery after upgrading to kernel 3.2.1-3.fc16.x86_64.


Version-Release number of selected component (if applicable):

[root@lux ~]# uname -a
Linux lux 3.2.1-3.fc16.x86_64 #1 SMP Mon Jan 23 15:36:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@lux ~]# rpm -q acpitool
acpitool-0.5.1-2.fc15.x86_64
[root@lux ~]# rpm -q kernel
kernel-3.2.1-3.fc16.x86_64


How reproducible:
Every time.

Steps to Reproduce:
[root@lux ~]# acpitool -B
 Battery is not present, bailing out. 
  Battery #1     : slot empty
[root@lux ~]# acpitool -b
 Battery is not present, bailing out. 
  
Actual results:


Expected results:

acpitool should report battery drain.

Additional info:
This also affects powertop.  The KDE battery monitor seems to still be working correctly.

The kernel detects the battery:

[root@lux ~]# ls /sys/class/power_supply/BAT1/
alarm        charge_full_design  current_now  device        model_name  present        status     technology  uevent              voltage_now
charge_full  charge_now          cycle_count  manufacturer  power       serial_number  subsystem  type        voltage_min_design


Both powertop and acpitool worked correctly under the kernel 3.1.X series.
It seems like some details have changed between kernel 3.1.X and 3.2.X

(not a big issue, just thought I'd report it)

Comment 1 craigbarnes85 2012-03-09 16:46:39 UTC
I can also confirm this.

$ acpitool 
 Battery is not present, bailing out. 
  AC adapter     : <info not available> 
  Thermal info   : <not available>

$ uname --kernel-release 
3.2.7-1.fc16.i686

$ rpm -q acpitool 
acpitool-0.5.1-2.fc15.i686

Comment 2 Ankur Sinha (FranciscoD) 2012-05-14 13:47:06 UTC
Confirming. 

[root@ankur sys]# acpitool
 Battery is not present, bailing out.
  AC adapter     : <info not available>
  Thermal info   : <not available>
[root@ankur sys]# rpm -q acpitool
acpitool-0.5.1-4.fc17.x86_64
[root@ankur sys]#

Comment 3 Fedora End Of Life 2013-01-16 17:35:00 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Roy Dragseth 2013-01-16 21:18:26 UTC
Still present on F17.

Comment 5 Isaac Lenton 2013-02-01 10:40:49 UTC
Firstly: Still present on F18.

I downloaded the source earlier today and located what I believe may be the issue:

I think the issue is in how acpitool reads the uevent file for the battery.  acpitool uses the uevent file to determine the status of a battery and other information such as if it is present or not.

When the program is run, the response: 'Battery is not present, bailing out.'
is caused when acpitool does not find the line 'POWER_SUPPLY_PRESENT=1' (or there about).  This is probably due to the way acpitool reads the uevent file, in-particular the lines:

for(int t=0; t<5; t++)
        fgets(str, 100, power_fp);            /* skip first 5 lines */

In my case this completely misses all the important parts of the file.

Here is an example of my /sys/class/power_supply/BAT1/uevent file.

POWER_SUPPLY_NAME=BAT1
POWER_SUPPLY_STATUS=Unknown
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
[...]

I might put together a replacement for this part of the code if I get time and post it here.  I am completely new to Red Hat Bugzilla so I don't have a clue if this is the right process.

Comment 6 Isaac Lenton 2013-02-01 14:50:57 UTC
Added a patch, see here: https://sourceforge.net/tracker/?func=detail&aid=3602979&group_id=111358&atid=659019

This will re-enable 'some' of the functionality for battery statistics but may not fix temperature or ac-power statistics.  The following commands should now behave as expected.

acpitool -B
acpitool -b

This is only a partial fix and more work needs to be done, but probably not by me, this patch solves my immediate needs.

Comment 7 Fedora End Of Life 2013-07-04 03:25:42 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Mike Ellis 2014-02-28 06:27:07 UTC
This is still an issue in FC 20.

uname --kernel-release
3.11.10-301.fc20.x86_64

rpm -q acpitool
acpitool-0.5.1-7.fc20.x86_64

cat /etc/*release
Fedora release 20 (Heisenbug)

Comment 9 Fedora End Of Life 2015-05-29 08:42:29 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 SteveB 2015-05-29 14:42:12 UTC
Still an issue in FC 21

uname --kernel-release
3.19.5-200.fc21.x86_64

rpm -q acpitool
acpitool-0.5.1-9.fc21.x86_64

Seems like this bug is not getting fixed.
I also note that not much seems to work with acpi these days.
acpid -d seems to miss a lot of power-related events...
Is there a replacement for acpi?

Comment 11 Fedora Admin XMLRPC Client 2016-02-12 18:22:48 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 12 Fedora Admin XMLRPC Client 2016-02-16 01:49:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 13 Al Stone (Old account - use ahs3@redhat.com) 2016-03-22 17:15:27 UTC
I'm relatively new as a Fedora Packager, but I've started looking through the ACPI tools to see what's going on.  For this one in particular, it appears to rely on a lot of info from /proc that either no longer exists or has been moved to /sys.  It may take a while to fix it.

In the meantime, acpi -d (not acpid -d) seems to be working reasonably well right now and may be a reasonable replacement for the short term.

Comment 14 Fedora End Of Life 2016-11-24 10:36:27 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Fedora End Of Life 2017-02-28 09:30:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 16 Al Stone 2018-04-24 17:29:14 UTC
Due to other commitments, I need to make this a fairly low priority effort on my part.  It appears there are a few patches available that may help this specific issue so I will be evaluating those.  I am concerned however for the long term usability of this package since upstream has been inactive, even though ACPI is very much alive and well, and in extensive use.  I will attempt to connect with upstream as well to see what the longer term plan is for this project.

Comment 17 Fedora End Of Life 2018-05-03 08:13:30 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 18 Fedora End Of Life 2018-05-29 11:55:52 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.