tag 574805 +patch
thanks

  Hello:

  I've researched a bit about this and I think I have a patch that fixes the 
issue. In fact the patch just revert one of the commits done some time ago, 
r316 from subversion repository.

  The problem is that the value in /sys/class/power_supply/BAT*/current_now is 
interpreted as watts while it should be considered as current.

  I suspect the real problem has been that this ACPI property is on its way to 
deprecation and power_now will be preferred. However, this latter is not shown 
in my case, I can't see it in the /sys/class/power_supply/BAT* dir.

  I have tested the patch and it works for me. I'm still pending to report 
this upstream.

  Regards,
-- 
     Raúl Sánchez Siles
----->Proud Debian user<-----
Linux registered user #416098
diff --git a/powertop.c b/powertop.c
--- a/powertop.c
+++ b/powertop.c
@@ -729,7 +729,7 @@
 			continue;
 		memset(line, 0, 1024);
 		if (fgets(line, 1024, file) != NULL) {
-			watts_drawn = strtoull(line, NULL, 10) / 1000000.0;
+			amperes_drawn = strtoull(line, NULL, 10) / 1000000.0;
 		}
 		fclose(file);
 	

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to