You are not logged in.
Pages: 1
Hi,
On my laptop (Clevo W150ER), I have the acpi informations about the battery, but I can't have any information about the discharge rate. It is also said to be "rate information unavailable".
Is there any ways to get such information ? I looked at the file under /sys/class/power_supply and could not found a CURRENT_NOW information which seems to be the source of the discharge rate info…
Thanks !
Offline
What is available under battery directory?
tree /sys/class/power_supply
Offline
Here it is :
% tree /sys/class/power_supply
/sys/class/power_supply
├── AC -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/AC
└── BAT -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT
2 directories, 0 file
When AC is plugged:
% tree /sys/class/power_supply/BAT/
/sys/class/power_supply/BAT/
├── alarm
├── capacity
├── capacity_level
├── charge_full
├── charge_full_design
├── charge_now
├── current_now
├── cycle_count
├── device -> ../../../PNP0C0A:00
├── manufacturer
├── model_name
├── power
│ ├── async
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_kids
│ ├── runtime_active_time
│ ├── runtime_enabled
│ ├── runtime_status
│ ├── runtime_suspended_time
│ └── runtime_usage
├── present
├── serial_number
├── status
├── subsystem -> ../../../../../../../../../class/power_supply
├── technology
├── type
├── uevent
├── voltage_min_design
└── voltage_now
3 directories, 27 files
When AC is unplugged:
% tree /sys/class/power_supply/BAT/
/sys/class/power_supply/BAT/
├── alarm
├── capacity
├── capacity_level
├── charge_full
├── charge_full_design
├── charge_now
├── current_now
├── cycle_count
├── device -> ../../../PNP0C0A:00
├── manufacturer
├── model_name
├── power
│ ├── async
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_kids
│ ├── runtime_active_time
│ ├── runtime_enabled
│ ├── runtime_status
│ ├── runtime_suspended_time
│ └── runtime_usage
├── present
├── serial_number
├── status
├── subsystem -> ../../../../../../../../../class/power_supply
├── technology
├── type
├── uevent
├── voltage_min_design
└── voltage_now
3 directories, 27 files
However, when I
% cat /sys/class/power_supply/BAT/current_now
with AC unplugged (laptop running on battery), I get
% cat /sys/class/power_supply/BAT/current_now
cat: /sys/class/power_supply/BAT/current_now: No such file or directory.
EDIT: Terminal output in english.
Last edited by doupod (2014-09-01 06:49:43)
Offline
Please post terminal output in English: https://wiki.archlinux.org/index.php/Fo … s_and_Code
Offline
@jasonwryan: I didn't pay attention that the output of `cat` was localized… I updated accordingly.
Offline
So how can the file appear in tree, but not in cat?
Offline
That's something that puzzled me and I could not find an answer for now…
`ls` shows the files too.
% ls -al /sys/class/power_supply/BAT/
total 0
drwxr-xr-x 3 root root 0 1 sept. 08:44 ./
drwxr-xr-x 3 root root 0 1 sept. 08:44 ../
-rw-r--r-- 1 root root 4,0K 1 sept. 08:42 alarm
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 capacity
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 capacity_level
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 charge_full
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 charge_full_design
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 charge_now
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 current_now
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 cycle_count
lrwxrwxrwx 1 root root 0 1 sept. 08:42 device -> ../../../PNP0C0A:00/
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 manufacturer
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 model_name
drwxr-xr-x 2 root root 0 1 sept. 08:44 power/
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 present
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 serial_number
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 status
lrwxrwxrwx 1 root root 0 1 sept. 08:42 subsystem -> ../../../../../../../../../class/power_supply/
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 technology
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 type
-rw-r--r-- 1 root root 4,0K 1 sept. 08:42 uevent
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 voltage_min_design
-r--r--r-- 1 root root 4,0K 1 sept. 08:42 voltage_now
But `cat` still does not want to show them (and I confirm it's not a permission problem).
However, `stat` tells me this is a valid file:
% stat /sys/class/power_supply/BAT/current_now
File: '/sys/class/power_supply/BAT/current_now'
Size: 4096 Blocks: 0 IO Block: 4096 regular file
Device: eh/14d Inode: 19398 Links: 1
Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-09-01 08:42:36.777411898 +0200
Modify: 2014-09-01 08:42:36.777411898 +0200
Change: 2014-09-01 08:42:36.777411898 +0200
Birth: -
Offline
What does file say? And can you try opening it with less or vim?
Offline
Vim and less gives me read errors, as does cat.
file gives me a read error also:
% file /sys/class/power_supply/BAT/current_now
/sys/class/power_supply/BAT/current_now: ERROR: cannot read `/sys/class/power_supply/BAT/current_now' (No such device)
This file exists and is perfectly readable without any problem when AC is plugged. As soon as I unplug the AC adapter, the file still exists in the tree, according to ls / tree / stat, but is not readable anymore, according to cat / vim / less / file.
Offline
I speculate you can cat charge_now when running on battery, but it may be inaccessible with ac power on. I assume this is similar to behaviour displayed here. Check all the files you can cat in both scenarios. Even in worst case, you should be able to calculate the current.
Offline
@emeres: Yes, I can, but this is not as accurate as the current_now measure, as I have to compute some derivative. Plus most of the tools out there only read current_now and can't take charge_now and derivate it.
And anyway, the behavior of the current_now file is superweird…
Offline
The laptops usually don't report the discharge rate if:
1. the laptop is plugged in AC
2. You are using battery when below 0% charge.
Offline
My laptop is running on battery when I want to know the discharge rate. My battery is almost fully charged (but this does not matter AFAIK, I tested with half charged battery as well).
On AC, my laptop report correctly the current_now value.
Offline
That makes sense from a technical point of view. Determine who made the firmware and search for information on it/ask them. Have you looked at the python script, that was referenced in the other thread? Have you had the behaviour you expect under Windows?
Offline
Mmmh… I looked at /sys/class/power_supply/uevent, and the manufacturer line says "NOTEBOOK" and the model line says "BAT" which is not very helpful…
I also tried dmidecode -t 22, without any result. And dmidecode | grep battery does not return anything…
Concerning the python script, AFAIK, it does not estimate the remaining time but simply read values from the files on the disk, which I can just cat to have the same result.
Sadly, I don't have any Windows license available to test it… I may have a way to get one and test, I'll see.
Offline
Pages: 1