linux (2.6.32-10.14) - "delay first lookup of the battery until first use" confuses KDE battery management

Bug #507211 reported by zigi on 2010-01-13
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Andy Whitcroft

Bug Description

From linux (2.6.32-10.14) changelog:
  SAUCE: acpi battery -- delay first lookup of the battery until first use

KDE4 battery widget status is now "Battery: not present" until first use, which is misleading and confusing.

ProblemType: Bug
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 /dev/snd/controlC0: ziegleka 2448 F.... pulseaudio
                      ziegleka 2456 F.... kmix
CRDA: Error: [Errno 2] No such file or directory
 Card hw:0 'Intel'/'HDA Intel at 0xf8500000 irq 17'
   Mixer name : 'Conexant CX20561 (Hermosa)'
   Components : 'HDA:14f15051,17aa20fd,00100000'
   Controls : 14
   Simple ctrls : 7
Date: Wed Jan 13 22:33:53 2010
DistroRelease: Ubuntu 10.04
HibernationDevice: RESUME=UUID=0ccf8d25-f8f3-4aeb-9809-efe8b1ebfe5d
MachineType: LENOVO 273232G
Package: linux-image-2.6.32-10-generic 2.6.32-10.14
 Socket 0:
   no product info available
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-10-generic root=UUID=26a40a7b-95dd-4565-8f86-c2cd3f3359a9 ro quiet
ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
Regression: Yes
RelatedPackageVersions: linux-firmware 1.28
Reproducible: Yes
SourcePackage: linux
Tags: lucid needs-upstream-testing regression-proposed
TestedUpstream: No
Uname: Linux 2.6.32-10-generic x86_64 09/16/2009
dmi.bios.vendor: LENOVO
dmi.bios.version: 7YET78WW (3.08 ) 273232G
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7YET78WW(3.08):bd09/16/2009:svnLENOVO:pn273232G:pvrThinkPadR500:rvnLENOVO:rn273232G:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable: 273232G
dmi.product.version: ThinkPad R500
dmi.sys.vendor: LENOVO

CVE References

zigi (ziegleka) wrote :
zigi (ziegleka) on 2010-01-13
description: updated

Hi zigi,

You noted this is a regression. Can you comment which was the most recent kernel where this wasn't an issue so we can narrow down the window the regression may have been introduced? I'm also changing the tag from "regression-proposed" to "regression-potential" for now. For an explanation of the regression-* tags, please refer to Thanks.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: regression-potential
removed: regression-proposed
zigi (ziegleka) wrote :

With linux (2.6.32-9.13) it was ok. As I mention above: from linux (2.6.32-10.14) changelog:
   SAUCE: acpi battery -- delay first lookup of the battery until first use ... I think this is the problem.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
zigi (ziegleka) wrote :

With linux (2.6.32-11) no change.

Andy Whitcroft (apw) wrote :

@zigi -- can you indicate what 'before first use' means in your report here? The patch you indicate does change the battery scanning to delay it until first access. But any use ought to make up to date so its not obvious how not-present would be exposed.

    "KDE4 battery widget status is now "Battery: not present" until first use, which is misleading and confusing."

summary: - linux (2.6.32-10.14) - delay first lookup of the battery until first use
+ linux (2.6.32-10.14) - "delay first lookup of the battery until first
+ use" confuses KDE battery management
Andy Whitcroft (apw) on 2010-01-26
Changed in linux (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Andy Whitcroft (apw)
Andy Whitcroft (apw) wrote :

Ok I think I have a handle on this. In the default lucid install you can see this too. If you boot without the AC connected you will not get a battery icon as expected, inserting the power fixes this. Looks like attaching to netlink is not something we can see and trigger an update for. It seems easier to move just the first update async.

Andy Whitcroft (apw) on 2010-01-26
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
zigi (ziegleka) wrote :

@Andy thank you for your work.

My test case:
Boot system (KUBUNTU - 10.04 Lucid) with AC adapter plugged in.
Baterry widget and PowerDevil report "Battery: not present".
After unplugging AC adapter system detects battery.
Plug AC adapter to notebook.

zigi (ziegleka) wrote :

After boot with AC Adapter plugged in the ACPI - Battery procfs structure exists:

total 0
dr-xr-xr-x 2 root root 0 2010-01-27 07:28 BAT0

total 0
-rw-r--r-- 1 root root 0 2010-01-27 07:28 alarm
-r--r--r-- 1 root root 0 2010-01-27 07:28 info
-r--r--r-- 1 root root 0 2010-01-27 07:28 state

and after this command the KDE enviroment detects battery:

$ cat /proc/acpi/battery/BAT0/info

I will test your fix after release.

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

This bug was fixed in the package linux - 2.6.32-12.16

linux (2.6.32-12.16) lucid; urgency=low

  [ Andy Whitcroft ]

  * Revert "SAUCE: acpi battery -- delay first lookup of the battery until
    first use"
  * SAUCE: acpi battery -- move first lookup asynchronous
    - LP: #507211
  * [Config] update configs to cleanup generic configs
  * [Config] disable CONFIG_X86_CPU_DEBUG for amd64
  * [Config] enable USER_NS
    - LP: #480739, #509808

  [ Heiko Carstens ]

  * (pre-stable) driver-core: fix devtmpfs crash on s390
    - LP: #512370

  [ John Johansen ]

  * [Config] for server and virtual flavours make CONFIG_SCSI_SYM53C8XX_2=y
    - LP: #494565
  * [Config] VIRTIO=y for server/virtual flavours
    - LP: #494565

  [ Kay Sievers ]

  * (pre-stable) Driver-Core: devtmpfs - set root directory mode to 0755
    - LP: #512370

  [ Kees Cook ]

  * SAUCE: x86: brk away from exec rand area
    - LP: #452175

  [ Leann Ogasawara ]

  * [Upstream] e1000: enhance frame fragment detection
    - CVE-2009-4536
  * [Upstream] e1000e: enhance frame fragment detection
    - CVE-2009-4538

  [ Sebastian Kapfer ]

  * (pre-stable) Input: ALPS - add interleaved protocol support (Dell E6x00
    - LP: #296610

  [ Upstream Kernel Changes ]

  * inotify: do not reuse watch descriptors
    - LP: #485556
  * inotify: only warn once for inotify problems
  * revert "drivers/video/s3c-fb.c: fix clock setting for Samsung SoC
  * memcg: ensure list is empty at rmdir
  * drm/i915: remove loop in Ironlake interrupt handler
  * block: Fix incorrect reporting of partition alignment
  * x86, mce: Thermal monitoring depends on APIC being enabled
  * futexes: Remove rw parameter from get_futex_key()
  * page allocator: update NR_FREE_PAGES only when necessary
  * x86, apic: use physical mode for IBM summit platforms
  * edac: i5000_edac critical fix panic out of bounds
  * x86: SGI UV: Fix mapping of MMIO registers
  * mfd: WM835x GPIO direction register is not locked
  * mfd: Correct WM835x ISINK ramp time defines
  * ALSA: hda - Fix missing capture mixer for ALC861/660 codecs
  * V4L/DVB (13868): gspca - sn9c20x: Fix test of unsigned.
  * reiserfs: truncate blocks not used by a write
  * HID: add device IDs for new model of Apple Wireless Keyboard
  * PCI/cardbus: Add a fixup hook and fix powerpc
  * Input: pmouse - move Sentelic probe down the list
  * asus-laptop: add Lenovo SL hotkey support
  * sched: Fix cpu_clock() in NMIs, on !CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
  * sparc64: Fix NMI programming when perf events are active.
  * sparc64: Fix Niagara2 perf event handling.
  * i2c: Do not use device name after device_unregister
  * i2c/pca: Don't use *_interruptible
  * serial/8250_pnp: add a new Fujitsu Wacom Tablet PC device
  * sched: Fix task priority bug
  * vfs: Fix vmtruncate() regression
  * Linux
  * x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers
  * V4L/DVB (13900): gspca - sunplus: Fix bridge exchanges.
  * Staging: asus_oled: fix oops in
  * Staging: hv: fix smp problems in the hyperv core code
  * tty: fix race in tty_fasync
  * ecryptfs: use after free
  * ecryptfs: initi...


Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Andy Whitcroft (apw) wrote :

@zigi -- could you try the 2.6.32-12.15 kernel and see if it works better for you. Seems to help on gnome.

zigi (ziegleka) wrote :

@Andy - it works - all my tests passed

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints