Polybar battery status is always 98%

Hello everybody!

This is my first post to forum. I’m a new Endeavour user and bspwm is my first tiling window manager. I really like this lightweight “desktop” and trying to learn how it works.

My battery status in polybar is always 98%. It doesn’t matter if the laptop is on charger or not. If I log out, the battery status in login screen shows the right value. But when logging in to bspwm, the polybar battery status is 98%.

Does anyone know what’s causing this?

This is a configuration issue - most likely your config needs adjustment to match your hardware.

1 Like

Thank you for the answer. I ran the command:

ls -1 /sys/class/power_supply/ gives:

I’m using Levono ThinkPad X240 and this has two batteries. Polybar’s config.ini has the lines:

battery = BAT0
adapter = ADP1

I changed the BAT0 to BAT1 and now the % is same as login screen. I also tried to put them both BAT0 BAT1, but then Polybar doesn’t load at all.

Polybar can show only one battery on one module. If you want to see both, you can copy paste the module code, change module name and battery path.

Then add this new module to modules-right (or left or center)

Welcome to Endeavour OS! :rocket: