← Back to team overview

kernel-packages team mailing list archive

[Bug 971061] Re: acpi reports battery state incorrectly

 

UPDATED v2: Safer because it obtains the EC ports automatically from /proc/ioports, and it micro-pauses between queries, so that the EC returns each event only once. This replaces the little program in #3.
________
This is the program I made, that "unstucks" the computer so that it can send LID and AC and Battery events again. (it queries the embedded controller queued events, thus unblocking the EC so that it can start sending them again).

Ideally run after resume from sleep, or at any other time.

** Attachment added: "samsung_fix_ec_events_v2.c"
   https://bugs.launchpad.net/ubuntu/+source/linux/+bug/971061/+attachment/3993277/+files/samsung_fix_ec_events_v2.c

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/971061

Title:
  acpi reports battery state incorrectly

Status in “linux” package in Ubuntu:
  Won't Fix

Bug description:
  I have a new Samsung 9-series laptop (NP900X3B) and the battery state
  is detected incorrectly. Basically the state what was at the time of
  boot stays active all the time - regardless of the ac-adapter state.

  Here is output from "acpitool -a -b" in various situations:

  When booted with charger connected and charger is still connected:
    Battery #1     : charging, 47.00%, 01:00:43
    AC adapter     : on-line 
   
  When booted with charger connected and charger is now disconnected:
    Battery #1     : charging, 47.00%, 01:36:59
    AC adapter     : off-line 
  [The battery couldn't possibly be charging when the AC adapter is offline!]

  When booted with charger disconnected and charger is still disconnected:
    Battery #1     : discharging, 47.00%, 01:39:44
    AC adapter     : off-line 

  When booted with charger disconnected and charger is now connected:
    Battery #1     : discharging, 47.00%, 00:53:43
    AC adapter     : on-line 
  [The battery is actually charging as the AC adapter is online]

  The percentage and time are correctly updated when the battery is
  actually charging or discharging - regardless of the reported state.
  So the state is the only thing that is incorrect. However a number of
  applications make their decisions based on this state (battery
  monitor, jupiter, etc.) and therefore behave incorrectly.

  "lshal -m" doesn't report anything when I plug the charger in or out.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: acpi (not installed)
  ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13
  Uname: Linux 3.2.0-21-generic x86_64
  ApportVersion: 2.0-0ubuntu2
  Architecture: amd64
  Date: Sun Apr  1 22:50:35 2012
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
  ProcEnviron:
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: acpi
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/971061/+subscriptions