Your message dated Thu, 20 Nov 2008 00:17:53 +0900
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#495655: not fixed in cpufreqd 2.3.3-3
has caused the Debian Bug report #495655,
regarding cpufreqd: Fails to read battery info
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
495655: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495655
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: cpufreqd
Version: 2.3.2-2
Severity: important


cpufreqd fails to read battery info on my system because it tries to read
files named "energy_full" and "energy_now" while the files are named
"charge_full" and "charge_now".

The attached patch fixes this by trying the charge_* names of reading energy_*
fails.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to pt_BR.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cpufreqd depends on:
ii  libc6                         2.7-13     GNU C Library: Shared libraries
ii  libcpufreq0                   004-2      shared library to deal with the cp
ii  libsensors3                   1:2.10.7-1 library to read temperature/voltag
ii  libsysfs2                     2.1.0-4    interface library to sysfs
ii  lsb-base                      3.2-19     Linux Standard Base 3.2 init scrip

Versions of packages cpufreqd recommends:
ii  acpid                         1.0.6-10   Utilities for using ACPI power man

Versions of packages cpufreqd suggests:
ii  cpufrequtils                  004-2      utilities to deal with the cpufreq

-- no debconf information
--- cpufreqd-2.3.2.orig/src/cpufreqd_acpi_battery.c
+++ cpufreqd-2.3.2/src/cpufreqd_acpi_battery.c
@@ -31,6 +31,8 @@
 #define BATTERY_TYPE	"Battery"
 #define ENERGY_FULL	"energy_full"
 #define ENERGY_NOW	"energy_now"
+#define CHARGE_FULL "charge_full"
+#define CHARGE_NOW  "charge_now"
 #define PRESENT		"present"
 #define STATUS		"status"
 #define CURRENT_NOW	"current_now"
@@ -123,11 +125,20 @@
 	binfo->open = 1;
 
 	binfo->energy_full = get_class_device_attribute(binfo->cdev, ENERGY_FULL);
-	if (!binfo->energy_full)
-		return -1;
+	if (!binfo->energy_full) {
+		/* try the "charge_full" name */
+		binfo->energy_full = get_class_device_attribute(binfo->cdev,
+														CHARGE_FULL);
+		if (!binfo->energy_full)
+			return -1;
+	}
 	binfo->energy_now = get_class_device_attribute(binfo->cdev, ENERGY_NOW);
-	if (!binfo->energy_now)
-		return -1;
+	if (!binfo->energy_now) {
+		/* try the "charge_now" name */
+		binfo->energy_now = get_class_device_attribute(binfo->cdev, CHARGE_NOW);
+		if (!binfo->energy_now)
+			return -1;
+	}
 	binfo->present = get_class_device_attribute(binfo->cdev, PRESENT);
 	if (!binfo->present)
 		return -1;

--- End Message ---
--- Begin Message ---
On Wed, Nov 19, 2008 at 10:09:38AM +0100, Dirk Mueller wrote:
> reopen 495655
> found 495655 2.3.3-3
> thanks
> 
> 
> error messages:
> 
> 
> cpufreqd: get_class_device_attribute: couldn't 
> open /sys/class/power_supply/C1ED/energy_full (No such file or directory)
> cpufreqd: get_class_device_attribute: couldn't 
> open /sys/class/power_supply/C1ED/energy_now (No such file or directory)
> 
> 
> under
>   /sys/class/power_supply/C1ED
> 
>  I can find charge_full and charge_now.

cpufrequd might be too verbose but it actually opens charge_now and
charge_full after failing energy_*

run it with -V7 and check yourself.

thanks
-- 
mattia
:wq!


--- End Message ---

Reply via email to