You are not logged in.
Hello forums,
I'm using i3wm with i3bar and i3status on a laptop.
I've noticed that the output of the battery module seems to be partially incorrect- specifically, the "%status" output of the battery module always outputs "BAT" (battery discharging) no matter what. Even if I have my laptop plugged in, and even if my battery is full, and not discharging, the %status is always "BAT".
I've checked the output of /sys/class/power_supply/BAT0/uevent to see if my battery actually was discharging like i3status says, but it doesn't seem to be that way.
I would greatly appreciate it if anyone could teach me why that is, and potentially how to fix it?
Here is my i3status config file:
general {
colors = true
color_good = "#a3be8c"
color_degraded = "#ebcb8b"
color_bad = "#bf616a"
separator = ""
interval = 5
}
# order += "ipv6"
order += "wireless _first_"
# order += "ethernet _first_"
order += "battery 0"
order += "disk /"
order += "load"
order += "memory"
order += "tztime local"
wireless _first_ {
format_up = " (%quality at %essid) %ip "
format_down = "W: down"
}
ethernet _first_ {
format_up = "E: %ip (%speed)"
format_down = "E: down"
}
battery 0 {
format = " %status %percentage %remaining "
integer_battery_capacity = true
}
disk "/" {
format = " %avail "
}
load {
format = " %1min "
}
memory {
format = " %used | %available "
threshold_degraded = "1G"
format_degraded = "MEMORY < %available"
}
tztime local {
format = " %Y-%m-%d %H:%M:%S "
}Here is the current output of my battery module (78% for me is full as i3status outputs battery charge as a percentage of design capacity):
BAT 78%Here is the output of cat /sys/class/power_supply/BAT0/uevent:
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Not charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=15200000
POWER_SUPPLY_VOLTAGE_NOW=16489000
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_CHARGE_FULL_DESIGN=5400000
POWER_SUPPLY_CHARGE_FULL=4186000
POWER_SUPPLY_CHARGE_NOW=4208000
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=AP18JHQ
POWER_SUPPLY_MANUFACTURER=Getac KT00408001
POWER_SUPPLY_SERIAL_NUMBER=35975Thank you!
Last edited by yutanagano (2021-08-14 08:07:41)
Offline
I assume it's because you're ranking it against the design capacity, so it's not "full".
It's also not charging because the battery is over its remaining capacity.
Any reason to not go w/ "last_full_capacity = true"?
Offline
I assume it's because you're ranking it against the design capacity, so it's not "full".
It's also not charging because the battery is over its remaining capacity.Any reason to not go w/ "last_full_capacity = true"?
Thanks for the reply seth!
I should have mentioned- I did try this and it didn't change the status string. I've just tried it once now again, and while the %percentage output has now changed to "100%", the %status string remains as "BAT". ![]()
BAT 100%Offline
It's not charging nor full…
https://github.com/i3/i3status/blob/30a … nfo.c#L190
You could fle an upstream bug (i3 github) as to whether there should be a second level sanitization - the bsd code has something similar:
https://github.com/i3/i3status/blob/30a … nfo.c#L270
https://github.com/i3/i3status/blob/30a … nfo.c#L494
Incidentally and because of the conditions you found, the test should probably check whether it's >= full_last
Offline
Ah- thank you for pointing out the source code. My bar's behaviour makes sense now.
I will consider filing a bug report!
I will close this issue- all I have to do is prepend the title with [SOLVED] right?
Thanks so much!
Offline