i3status issues reading battery status
#1
So, finally had the time to sit down and try to whip this thing into shape since getting it, so far solid hardware and no more issues than I would have expected with a product like this. But after getting i3 set up, I cannot get the status display to read the battery charge status. At first assumed it was just the normal issue with non-standard battery names, but after manually putting the path in the i3status.conf I'm now getting an error: 

no '%d' in battery path


Has anyone else had this issue/have a resolution? I've seen a lot of people playing with i3 setups on here, so hoping someone else's past struggles found the solution.
#2
to check if the charger is plugged in: cat /sys/class/power_supply/dc-charger/device/power_supply/dc-charger/online
#3
(01-20-2020, 04:08 PM)dummy Wrote: So, finally had the time to sit down and try to whip this thing into shape since getting it, so far solid hardware and no more issues than I would have expected with a product like this. But after getting i3 set up, I cannot get the status display to read the battery charge status. At first assumed it was just the normal issue with non-standard battery names, but after manually putting the path in the i3status.conf I'm now getting an error: 

no '%d' in battery path


Has anyone else had this issue/have a resolution? I've seen a lot of people playing with i3 setups on here, so hoping someone else's past struggles found the solution.

I have the same issue.  I can not get the battery to display in the i3bar. I have tried using both battery 0 and battery 1 as the labels in my i3status config file. (below) but nothing seams to work.  Not sure if this is a issue with i3 or with the pinebook pro....?

i3status config:

battery 0 {
  format = " %status %percentage %remaining "
  format_down = " no battery "  
  last_full_capacity = false
  integer_battery_capacity = true  
  hide_seconds = true    
  status_chr = "⚡"
  status_bat = "☉"
  status_full = "☻"
  low_threshold = 10
  threshold_type = percentage
  path = "/sys/class/power_supply/rk-bat/uevent"
}
#4
(01-25-2020, 02:09 AM)cbk Wrote: i3status config:

battery 0 {
  format = " %status %percentage %remaining "
  format_down = " no battery "  
  last_full_capacity = false
  integer_battery_capacity = true  
  hide_seconds = true    
  status_chr = "⚡"
  status_bat = "☉"
  status_full = "☻"
  low_threshold = 10
  threshold_type = percentage
  path = "/sys/class/power_supply/rk-bat/uevent"
}

Try by changing the path to:
Code:
path = "/sys/class/power_supply/cw2015-battery/uevent"


Remaining time does not work for me but at least you will have the percentage.
#5
(01-25-2020, 04:22 AM)Antoine Wrote:
(01-25-2020, 02:09 AM)cbk Wrote: i3status config:

battery 0 {
  format = " %status %percentage %remaining "
  format_down = " no battery "  
  last_full_capacity = false
  integer_battery_capacity = true  
  hide_seconds = true    
  status_chr = "⚡"
  status_bat = "☉"
  status_full = "☻"
  low_threshold = 10
  threshold_type = percentage
  path = "/sys/class/power_supply/rk-bat/uevent"
}

Try by changing the path to:
Code:
path = "/sys/class/power_supply/cw2015-battery/uevent"


Remaining time does not work for me but at least you will have the percentage.

Listing  out the above file returns No such file or directory on my system.
The pinebook pro does not have the same battery as you describe above.  It has swhat I had posted: /sys/class/power_supply/rk-bat/ueven
#6
(01-20-2020, 04:08 PM)I had trouble with this at first too. The usual things I tried did not work. But in the end, since I installed i3 over the default debian, I just added "exec_always mate-power-manager" to my config. If you didn\t install over debian, you can still download the mate-power-manager, will show up in your tray.dummy Wrote: So, finally had the time to sit down and try to whip this thing into shape since getting it, so far solid hardware and no more issues than I would have expected with a product like this. But after getting i3 set up, I cannot get the status display to read the battery charge status. At first assumed it was just the normal issue with non-standard battery names, but after manually putting the path in the i3status.conf I'm now getting an error: 

no '%d' in battery path


Has anyone else had this issue/have a resolution? I've seen a lot of people playing with i3 setups on here, so hoping someone else's past struggles found the solution.
#7
Quote:Remaining time does not work for me but at least you will have the percentage.

I've got a patch that enables that here: https://github.com/C-Elegans/i3status.

Essentially the issue is i3status is looking for a field called POWER_SUPPLY_CHARGE_NOW with the current state of charge in Wh or mAh that it can use to calculate the battery run time. The pinebook battery doesn't provide this, however it does expose a field called POWER_SUPPLY_TIME_TO_EMPTY_NOW which has the number of minutes until the battery is empty. My patch just has i3status look at that if it's present instead of trying to calculate the runtime from the other fields.

Hope this helps!
#8
(01-27-2020, 02:43 AM)aversglay Wrote: I'm now getting an error: 
[quote pid='57529' dateline='1579558118']

no '%d' in battery path


Has anyone else had this issue/have a resolution? I've seen a lot of people playing with i3 setups on here, so hoping someone else's past struggles found the solution.

[/quote]

Do not forget the "0" in the config definition:


Code:
battery 0 {
        format = [...]
        path = [...]
}
#9
(01-27-2020, 02:04 PM)C_Elegans Wrote:
Quote:Remaining time does not work for me but at least you will have the percentage.

I've got a patch that enables that here: https://github.com/C-Elegans/i3status.

Essentially the issue is i3status is looking for a field called POWER_SUPPLY_CHARGE_NOW with the current state of charge in Wh or mAh that it can use to calculate the battery run time. The pinebook battery doesn't provide this, however it does expose a field called POWER_SUPPLY_TIME_TO_EMPTY_NOW which has the number of minutes until the battery is empty. My patch just has i3status look at that if it's present instead of trying to calculate the runtime from the other fields.

Hope this helps!

Nice work! This patch works great for me. Will you submit a PR upstream to the i3status project?
#10
(01-31-2020, 06:13 AM)mbooth Wrote: Nice work! This patch works great for me. Will you submit a PR upstream to the i3status project?

Yup, already did: https://github.com/i3/i3status/pull/378


Possibly Related Threads…
Thread Author Replies Views Last Post
  Manjaro [ARM Stable Update] 2021-07-23 issues Bocanila 1 1,912 08-21-2023, 09:10 PM
Last Post: vanessadonald
  Hibernation and Speaker Sound Issues, First Month of PBP kebab 7 2,796 11-02-2022, 02:33 PM
Last Post: kebab
  Any chance of fixing the audio issues on the new batch PBP(it can't be just me...) crazyquark 0 722 09-30-2022, 10:15 AM
Last Post: crazyquark
  Fedora 33 to 34 upgrade issues tydeman 2 2,387 12-02-2021, 02:43 AM
Last Post: linuxfreund
  Battery gauge issue (mainline kernel) lfourquaux 4 4,838 05-22-2021, 02:43 PM
Last Post: jiyong
  eMMC frequently not found by Linux kernel (especially on low battery) v-man 14 16,162 05-14-2021, 01:18 PM
Last Post: djhnsn
  Battery charge threshold xNix 1 2,140 04-17-2021, 07:13 AM
Last Post: Damon
Question Manjaro arm + sway - battery indicator broken mfashby 6 6,575 02-20-2021, 04:07 AM
Last Post: mfashby
  Manjaro Issues: Dark Screen & Font size Sally2 1 2,925 12-19-2020, 03:33 PM
Last Post: wove
  Status stonepound 0 1,585 11-18-2020, 01:35 PM
Last Post: stonepound

Forum Jump:


Users browsing this thread: 1 Guest(s)