View Single Post
wicket's Avatar
Posts: 634 | Thanked: 3,266 times | Joined on May 2010 @ Colombia
#54
Originally Posted by sulu View Post
I think I know why the battery monitor doesn't work.
For comparison my netbook:
Code:
$ cat /sys/class/power_supply/BAT0/uevent 
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=8400000
POWER_SUPPLY_VOLTAGE_NOW=7500000
POWER_SUPPLY_CURRENT_NOW=1192000
POWER_SUPPLY_CHARGE_FULL_DESIGN=6580000
POWER_SUPPLY_CHARGE_FULL=4194000
POWER_SUPPLY_CHARGE_NOW=3337000
POWER_SUPPLY_CAPACITY=79
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=901
POWER_SUPPLY_MANUFACTURER=ASUS
POWER_SUPPLY_SERIAL_NUMBER=
Notice the key POWER_SUPPLY_CHARGE_NOW which is used to determine the current charge of the battery:
Code:
$ cat /sys/class/power_supply/BAT0/charge_now 
3237000
On the N900 (on battery) I get this:
Code:
$ cat /sys/class/power_supply/bq27200-0/uevent 
POWER_SUPPLY_NAME=bq27200-0
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=4012000
POWER_SUPPLY_CURRENT_NOW=307912
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=311
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL_DESIGN=2056320
POWER_SUPPLY_CYCLE_COUNT=22
POWER_SUPPLY_POWER_AVG=315818
POWER_SUPPLY_CHARGE_NOW is missing so the battery monitor has no way to determine the current charge of the battery:
Code:
$ cat /sys/class/power_supply/bq27200-0/charge_now
cat: /sys/class/power_supply/bq27200-0/charge_now: Keine Daten verfügbar
("No data available")
What kernel are you using under Debian? charge_now is available for me with 3.16-rc1 and 3.17 kernels and I've just noticed the the battery level widget is actually working in E17.

Code:
root@debian900:~# cat /sys/class/power_supply/bq27200-0/charge_now
406444
root@debian900:~# cat /sys/class/power_supply/bq27200-0/uevent
POWER_SUPPLY_NAME=bq27200-0
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=3615000
POWER_SUPPLY_CURRENT_NOW=270249
POWER_SUPPLY_CAPACITY=44
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=276
POWER_SUPPLY_TIME_TO_EMPTY_NOW=5400
POWER_SUPPLY_TIME_TO_EMPTY_AVG=5040
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=915526
POWER_SUPPLY_CHARGE_NOW=406087
POWER_SUPPLY_CHARGE_FULL_DESIGN=2056320
POWER_SUPPLY_CYCLE_COUNT=114
POWER_SUPPLY_ENERGY_NOW=1322760
POWER_SUPPLY_POWER_AVG=243311
POWER_SUPPLY_HEALTH=Good
Originally Posted by sulu View Post
Edit2:
It would also be nice if the kernel could provide /dev/rfkill
This should just be a matter of enabling CONFIG_RFKILL in the kernel config file. If you try it and it works, report here and I'll enable it in build_kernel.sh.

Originally Posted by sulu View Post
And it would certainly be much better if suspend to RAM worked
It does work if you use the right kernel. It works for me with every kernel that I've tried other than the default 3.16-rc1.

Originally Posted by sulu View Post
Should I?

Both, my regular device and the testing device (runing latest CSSU thumb) use rx51_battery.
You need both. bq27x00_battery is for the battery monitor chip. In Debian, both are loaded by default.
__________________
DebiaN900 - Native Debian on the N900. Deprecated in favour of Maemo Leste.

Maemo Leste for N950 and N9 (currently broken).
Devuan for N950 and N9.

Mobile devices with mainline Linux support - Help needed with documentation.

"Those who do not understand Unix are condemned to reinvent it, poorly." - Henry Spencer
 

The Following 4 Users Say Thank You to wicket For This Useful Post: