Phantom battery appears after resume from suspend

Bug #852406 reported by Chris Coulson on 2011-09-17
254
This bug affects 54 people
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux (Ubuntu)
Undecided
Unassigned
Oneiric
Undecided
Tim Gardner
Precise
Undecided
Unassigned

Bug Description

After resuming from suspend, I end up with a second battery in the power indicator menu (but marked as not present). It seems that this comes directly from upower itself:

Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/AC
  power supply: yes
  updated: Fri Sep 16 20:19:20 2011 (45099 seconds ago)
  has history: no
  has statistics: no
  line-power
    online: no

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
  vendor: Samsung SDI
  model: DELL M1RPP14
  serial: 6116
  power supply: yes
  updated: Sat Sep 17 08:50:34 2011 (25 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    energy: 41.6137 Wh
    energy-empty: 0 Wh
    energy-full: 94.5 Wh
    energy-full-design: 94.5 Wh
    energy-rate: 15.1762 W
    voltage: 11.225 V
    time to empty: 2.7 hours
    percentage: 44.0357%
    capacity: 100%
    technology: lithium-ion
  History (charge):
    1316245834 44.036 discharging
    1316245804 44.167 discharging
    1316245774 44.298 discharging
  History (rate):
    1316245834 15.176 discharging
    1316245804 12.285 discharging
    1316245774 11.790 discharging

Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:01/power_supply/BAT1
  power supply: no
  updated: Sat Sep 17 08:50:50 2011 (9 seconds ago)
  has history: no
  has statistics: no
  battery
    present: no
    rechargeable: no
    state: unknown
    energy: 0 Wh
    energy-empty: 0 Wh
    energy-full: 0 Wh
    energy-full-design: 0 Wh
    energy-rate: 0 W
    percentage: 0%

Daemon:
  daemon-version: 0.9.13
  can-suspend: yes
  can-hibernate yes
  on-battery: yes
  on-low-battery: no
  lid-is-closed: no
  lid-is-present: yes
  is-docked: no

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: upower 0.9.13-1
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
Date: Sat Sep 17 08:50:10 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110901)
SourcePackage: upower
UpgradeStatus: No upgrade log present (probably fresh install)
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/hwC0D0', '/dev/snd/hwC0D3', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D3p', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf6960000 irq 45'
   Mixer name : 'Intel IbexPeak HDMI'
   Components : 'HDA:111d76d5,1028040a,00100104 HDA:80862804,80860101,00100000'
   Controls : 19
   Simple ctrls : 11
DistroRelease: Ubuntu 11.10
HibernationDevice: RESUME=UUID=74c313af-6ee4-460f-98f3-c1ed84bb6cae
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110901)
MachineType: Dell Inc. Latitude E6410
Package: linux (not installed)
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-11-generic root=UUID=b2e419c9-361b-45c5-8964-3ee8ca387122 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
PulseSinks: Error: command ['pacmd', 'list-sinks'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
PulseSources: Error: command ['pacmd', 'list-sources'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-11-generic N/A
 linux-backports-modules-3.0.0-11-generic N/A
 linux-firmware 1.60
Tags: oneiric running-unity
Uname: Linux 3.0.0-11-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
WifiSyslog:
 Sep 17 12:32:09 farnsworth kernel: [22861.826874] dell_wmi: Received unknown WMI event (0x11)
 Sep 17 13:51:54 farnsworth kernel: [27646.487362] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro,commit=0
 Sep 17 13:52:07 farnsworth kernel: [27659.710365] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro,commit=0
dmi.bios.date: 02/15/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A07
dmi.board.name: 04373Y
dmi.board.vendor: Dell Inc.
dmi.board.version: A03
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA07:bd02/15/2011:svnDellInc.:pnLatitudeE6410:pvr0001:rvnDellInc.:rn04373Y:rvrA03:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E6410
dmi.product.version: 0001
dmi.sys.vendor: Dell Inc.

Chris Coulson (chrisccoulson) wrote :
Chris Coulson (chrisccoulson) wrote :

I guess this is really a kernel bug, seeing as the phantom battery appears in sysfs

affects: upower (Ubuntu) → linux (Ubuntu)
tags: added: apport-collected
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Brad Figg (brad-figg) on 2011-09-17
Changed in linux (Ubuntu):
status: New → Confirmed
Chris Coulson (chrisccoulson) wrote :

So, dmesg seems to suggest that my laptop does have a second battery slot, and googling around appears to confirm that too:

[ 4.496990] ACPI: Battery Slot [BAT1] (battery absent)
[ 4.504110] ACPI: Battery Slot [BAT0] (battery present)

However, this battery slot only seems to be fully exposed after resume from suspend.

Here's an excerpt of the output of udevadm info --export-db before suspending:

P: /devices/LNXSYSTM:00/device:00/PNP0C0A:00
E: UDEV_LOG=3
E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0C0A:00
E: DRIVER=battery
E: MODALIAS=acpi:PNP0C0A:
E: SUBSYSTEM=acpi

P: /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
E: UDEV_LOG=3
E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
E: POWER_SUPPLY_NAME=BAT0
E: POWER_SUPPLY_STATUS=Full
E: POWER_SUPPLY_PRESENT=1
E: POWER_SUPPLY_TECHNOLOGY=Li-ion
E: POWER_SUPPLY_CYCLE_COUNT=0
E: POWER_SUPPLY_VOLTAGE_MIN_DESIGN=11250000
E: POWER_SUPPLY_VOLTAGE_NOW=12816000
E: POWER_SUPPLY_CURRENT_NOW=1000
E: POWER_SUPPLY_CHARGE_FULL_DESIGN=8400000
E: POWER_SUPPLY_CHARGE_FULL=8400000
E: POWER_SUPPLY_CHARGE_NOW=8400000
E: POWER_SUPPLY_MODEL_NAME=DELL M1RPP14
E: POWER_SUPPLY_MANUFACTURER=Samsung SDI
E: POWER_SUPPLY_SERIAL_NUMBER=6116
E: SUBSYSTEM=power_supply

P: /devices/LNXSYSTM:00/device:00/PNP0C0A:01
E: UDEV_LOG=3
E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0C0A:01
E: DRIVER=battery
E: MODALIAS=acpi:PNP0C0A:
E: SUBSYSTEM=acpi

And after suspending:

P: /devices/LNXSYSTM:00/device:00/PNP0C0A:00
E: UDEV_LOG=3
E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0C0A:00
E: DRIVER=battery
E: MODALIAS=acpi:PNP0C0A:
E: SUBSYSTEM=acpi

P: /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
E: UDEV_LOG=3
E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
E: POWER_SUPPLY_NAME=BAT0
E: POWER_SUPPLY_STATUS=Full
E: POWER_SUPPLY_PRESENT=1
E: POWER_SUPPLY_TECHNOLOGY=Li-ion
E: POWER_SUPPLY_CYCLE_COUNT=0
E: POWER_SUPPLY_VOLTAGE_MIN_DESIGN=11250000
E: POWER_SUPPLY_VOLTAGE_NOW=12816000
E: POWER_SUPPLY_CURRENT_NOW=1000
E: POWER_SUPPLY_CHARGE_FULL_DESIGN=8400000
E: POWER_SUPPLY_CHARGE_FULL=8400000
E: POWER_SUPPLY_CHARGE_NOW=8400000
E: POWER_SUPPLY_MODEL_NAME=DELL M1RPP14
E: POWER_SUPPLY_MANUFACTURER=Samsung SDI
E: POWER_SUPPLY_SERIAL_NUMBER=6116
E: SUBSYSTEM=power_supply

P: /devices/LNXSYSTM:00/device:00/PNP0C0A:01
E: UDEV_LOG=3
E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0C0A:01
E: DRIVER=battery
E: MODALIAS=acpi:PNP0C0A:
E: SUBSYSTEM=acpi

P: /devices/LNXSYSTM:00/device:00/PNP0C0A:01/power_supply/BAT1
E: UDEV_LOG=3
E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0C0A:01/power_supply/BAT1
E: POWER_SUPPLY_NAME=BAT1
E: POWER_SUPPLY_PRESENT=0
E: SUBSYSTEM=power_supply

Note, /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:01/power_supply doesn't exist before suspend.

So, is this a kernel bug and a upower bug? (ie, should the battery always be exposed and should upower not expose it), or is it just a kernel bug (should it never become exposed). In any case, it makes the power indicator pretty useless in my session, because it always displays my battery as completely empty (both in Unity and gnome-shell)

Cas (calumlind) wrote :

I have me too'd this bug however during my testing of Oneiric I have also found my laptop hibernates due to "critical low battery" immediately after resuming from suspend despite having more than enough battery charge left.

Could this bug be responsible for that?

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-12.19
Cas (calumlind) wrote :

Tested with 3.0.0-12.19 and still occurs

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Peter Clifton (pcjc2) wrote :

Same here with HP 6730b laptop

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-12.20
Chris Coulson (chrisccoulson) wrote :

G'aaaaah

Changed in linux (Ubuntu):
status: Incomplete → Confirmed

Still present in 3.0.0-12.20

Joseph Salisbury (jsalisbury) wrote :

Would it be possible for someone affected by this to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

tags: added: needs-upstream-testing

I'd be glad to help but using nvidia drivers I seem unable to use the mainline builds. If someone has some pointers on how to do that I can report back.

Jeff Strunk (jstrunk-math) wrote :

I have tried a few mainline kernels from 3.0.6 to 3.1.0-999. I can't get far enough to test for this bug.

I always get the following message:
[ 17.609844] intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled

Is there a particular mainline kernel you would recommend?

Hi Jeff,
I guess i only got this because i am subscribed to the bug report.

I have no clue how to answer the question :-( I don't even understand
completely what it means :-(
P

> I have tried a few mainline kernels from 3.0.6 to 3.1.0-999. I can't
> get far enough to test for this bug.
>
> I always get the following message:
> [ 17.609844] intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled
>
> Is there a particular mainline kernel you would recommend?
>

Ingo Gerth (igerth) wrote :

I tried to test the latest kernel on my machine, following the procedures from [1]. However, it won't boot using that one. Anything else I can do?

[1] http://askubuntu.com/questions/65661/i-was-told-on-launchpad-to-test-a-mainline-kernel-how-do-i-do-that-with-nvidia

Having the same problem, using kernel 2.6.38-11-generic

Carl G (carl-gherardi) wrote :

I'm experiencing something similar, but it seems to be related to a docking station/port replicator

Oneiric linux-image-generic-pae-3.0.0.12.14

1 Resume on dock.
2. Close lid to suspend
3. Eject from dock
4. Open lid to resume

A second (and occasionally 3rd) phantom battery appears in applet with 0:00 charge, and my laptop immediately goes into hibernation again.

Just tested with 3.1.0-999.201110260408 and i've been unable to replicate the problem on that kernel.

Chris Coulson (chrisccoulson) wrote :

This is fixed in precise by this commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6e17fb6aa1a67afa1827ae317c3594040f055730

Can we please get this in to oneiric? This bug is responsible for my laptop immediately shutting down occasionally on resume, due to an unfortunate sequence of events on resume where the real battery disappears temporarily from sysfs, and this fake battery reappears before the real one, triggering gnome-settings-daemon to run the critical charge action (which is to shut down, by default). This hit myself, plus several other people a lot during UDS....

Tim Gardner (timg-tpi) wrote :

SRU Justification

Impact: Immediate suspend after resume

Patch Description: ACPI / Battery: Add the check before refresh sysfs in the battery_notify()

Changed in linux (Ubuntu Precise):
status: Confirmed → Fix Released
Changed in linux (Ubuntu Oneiric):
status: New → In Progress
assignee: nobody → Tim Gardner (timg-tpi)
Tim Gardner (timg-tpi) on 2011-11-18
Changed in linux (Ubuntu Oneiric):
status: In Progress → Fix Committed
Herton R. Krzesinski (herton) wrote :

This bug is awaiting verification that the kernel for Oneiric in -proposed solves the problem (3.0.0-14.23). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-oneiric' to 'verification-done-oneiric'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-oneiric
Cas (calumlind) wrote :

Updated my laptop with proposed and it is fixed here.

3.0.0-14.23 fixes the issue on my laptop (Dell latitude e6510)

tags: added: verification-done-oneiric
removed: verification-needed-oneiric
casey hyde (caseyjhyde) wrote :

The kernel in Oneiric -proposed did not fix this for me. The phantom battery (which displays "Battery (Not Present)" above Battery(charged) or whatever my current actual battery percentage is)is always present and causes my system to shutdown anytime I resume from suspend.

Jochen Garcke (jochen-garcke) wrote :

for me the kernel from proposed fixes the problems I had with a phantom battery and following automatic suspends after a resume.

Launchpad Janitor (janitor) wrote :
Download full text (24.8 KiB)

This bug was fixed in the package linux - 3.0.0-14.23

---------------
linux (3.0.0-14.23) oneiric-proposed; urgency=low

  [Herton R. Krzesinski]

  * Release Tracking Bug
    - LP: #893213

  [ Andy Whitcroft ]

  * debian: add locking to protect debian/files from parallel update

  [ Konrad Rzeszutek Wilk ]

  * SAUCE: x86/paravirt: Partially revert "remove lazy mode in interrupts"
    - LP: #854050

  [ Leann Ogasawara ]

  * Revert "ubuntu: fsam7400 disable driver"
    - LP: #876030

  [ Seth Forshee ]

  * [Config] Enable EVENT_POWER_TRACING_DEPRECATED=y for powertop

  [ Tim Gardner ]

  * Add postinit and postrm scripts to the extras package
    - LP: #882120
  * [Config] CONFIG_R6040=m
    - LP: #650899
  * [Config] CONFIG_MEMSTICK_R592=m
    - LP: #238208
  * [Config] CONFIG_HID_ACRUX_FF=y
    - LP: #890952

  [ Upstream Kernel Changes ]

  * Revert "NFS: Ensure that writeback_single_inode() calls write_inode()
    when syncing"
    - LP: #890952
  * sparc64: Force the execute bit in OpenFirmware's translation entries.
    - LP: #881420
  * sched/rt: Migrate equal priority tasks to available CPUs
    - LP: #881420
  * sched: Fix up wchan borkage
    - LP: #881420
  * ide-disk: Fix request requeuing
    - LP: #881420
  * posix-cpu-timers: Cure SMP wobbles
    - LP: #881420
  * lis3: fix regression of HP DriveGuard with 8bit chip
    - LP: #881420
  * ASoC: use a valid device for dev_err() in Zylonite
    - LP: #881420
  * ASoC: Fix setting update bits for WM8753_LADC and WM8753_RADC
    - LP: #881420
  * drm/radeon: Update AVIVO cursor coordinate origin before x/yorigin
    calculation.
    - LP: #881420
  * drm/radeon/kms: fix regression in DP aux defer handling
    - LP: #881420
  * drm/radeon/kms: add retry limits for native DP aux defer
    - LP: #881420
  * drm/radeon/kms: fix channel_remap setup (v2)
    - LP: #881420
  * ptp: fix L2 event message recognition
    - LP: #881420
  * x86/PCI: use host bridge _CRS info on ASUS M2V-MX SE
    - LP: #881420
  * qla2xxx: Fix crash in qla2x00_abort_all_cmds() on unload
    - LP: #881420
  * libsas: fix panic when single phy is disabled on a wide port
    - LP: #881420
  * md: Avoid waking up a thread after it has been freed.
    - LP: #881420
  * dm table: avoid crash if integrity profile changes
    - LP: #881420
  * mmc: mxs-mmc: fix clock rate setting
    - LP: #881420
  * exec: do not call request_module() twice from search_binary_handler()
    - LP: #881420
  * ARM: mach-ux500: enable fix for ARM errata 754322
    - LP: #881420
  * drm/radeon/kms: retry aux transactions if there are status flags
    - LP: #881420
  * drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for
    DCE4.1
    - LP: #881420
  * ipv6: fix NULL dereference in udp6_ufo_fragment()
    - LP: #881420
  * ahci: Enable SB600 64bit DMA on Asus M3A
    - LP: #881420
  * MIPS: PM: Use struct syscore_ops instead of sysdevs for PM (v2)
    - LP: #881420
  * ftrace: Fix regression of :mod:module function enabling
    - LP: #881420
  * ftrace: Fix regression where ftrace breaks when modules are loaded
    - LP: #881420
  * ftrace: Fix warning when CONFIG_FUNCTION_TRACER is not defined
    - LP: #881420
  * ...

Changed in linux (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in linux:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.