Battery stats in Ubuntu
#2
The PMIC for the A64 supports reading out the battery stats, I just dont know if the Linux kernel driver exposes that information to userspace already... /sys/class/power_supply/battery on my Ubuntu running on the pine has all the necessary entries:

Code:
ubuntu@pine64:/sys/class/power_supply/battery$ ls -l
total 0
-r--r--r-- 1 root root 4096 Jun 16 18:51 capacity
-r--r--r-- 1 root root 4096 Jun 16 18:51 current_now
lrwxrwxrwx 1 root root    0 Jun 16 18:51 device -> ../../../axp81x-supplyer.47
-r--r--r-- 1 root root 4096 Jun 16 18:51 energy_full_design
-r--r--r-- 1 root root 4096 Jun 16 18:51 health
-r--r--r-- 1 root root 4096 Jun 16 18:51 model_name
-r--r--r-- 1 root root 4096 Jun 16 18:51 online
drwxr-xr-x 2 root root    0 Jun 16 18:51 power
-r--r--r-- 1 root root 4096 Jun 16 17:30 present
-r--r--r-- 1 root root 4096 Jun 16 18:51 status
lrwxrwxrwx 1 root root    0 Jun 16 18:51 subsystem -> ../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Jun 16 18:51 technology
-r--r--r-- 1 root root 4096 Jun 16 18:51 temp
-r--r--r-- 1 root root 4096 Jun 16 18:51 type
-rw-r--r-- 1 root root 4096 Jun 16 18:51 uevent
-r--r--r-- 1 root root 4096 Jun 16 18:51 voltage_max_design
-r--r--r-- 1 root root 4096 Jun 16 18:51 voltage_min_design
-r--r--r-- 1 root root 4096 Jun 16 18:51 voltage_now
ubuntu@pine64:/sys/class/power_supply/battery$

I dont have a battery attached to test if the files contain actual values....
Come have a chat in the Pine IRC channel >>
  Reply


Messages In This Thread
Battery stats in Ubuntu - by mcalderwood - 06-16-2016, 12:26 PM
RE: Battery stats in Ubuntu - by xalius - 06-16-2016, 12:53 PM
RE: Battery stats in Ubuntu - by mcalderwood - 06-16-2016, 01:12 PM
RE: Battery stats in Ubuntu - by xalius - 06-16-2016, 01:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Ubuntu server 20.04 request phi0x 2 5,284 12-30-2020, 08:02 PM
Last Post: phi0x
  SPI on ubuntu IlyaM 4 9,089 07-16-2018, 03:00 AM
Last Post: kingflab
  Ubuntu password not working joemassimino 4 8,513 05-18-2018, 03:33 PM
Last Post: Luke
  After flashing Ubuntu- how to get graphical desktop Partymack711 6 10,839 02-01-2018, 09:45 AM
Last Post: Partymack711
  (ARCHIVED) Ubuntu Xenial Image (BSP Kernel) longsleep 337 633,776 01-31-2018, 11:58 AM
Last Post: Luke
  PPTP doesnt work with ubuntu escovedo 2 8,658 08-23-2017, 09:28 AM
Last Post: gilbertotcc
Question HELP Ubuntu Mate password recovery procedure Captain Anni Hilator 5 9,909 08-03-2017, 03:52 PM
Last Post: Luke
  Ubuntu boot very slow with wifi driver remainder 9 20,656 08-03-2017, 07:23 AM
Last Post: victorssantos
  Recovering root access in Ubuntu Scientomancer 3 5,830 07-28-2017, 02:53 PM
Last Post: Scientomancer
  Pine64 2Gb Ubuntu Mono not updating and stuck petec 0 2,874 07-08-2017, 09:34 AM
Last Post: petec

Forum Jump:


Users browsing this thread: 1 Guest(s)