Did a clean reinstall of Fedora on my laptop, Lenovo Thinkpad E520, and now the battery will not charge.
It is discharged to 0%. The power supply is OK as it still runs when plugged in.
It won’t charge if it is on or off.
The Battery indicator in gnome alternates every few seconds between red and white and upower -i /org/freedesktop/UPower/devices/battery_BAT0 shows the state alternating between charging and pending-charge.
What I have found that sometimes aids in recovery for this type issue is to force a recalibration of the battery charge circuit in the laptop.
I have a laptop that I did that with and the process involved using the laptop with no ac power until it automatically shut down due to low battery (or at least below 10%), then recharge it while the laptop was off.
I repeated that cycle several times and it seemed to recover the ability to charge.
Sometimes this seems to occur when the battery is right on the edge of failing so the battery may also need replaced.
Try the recovery method first and if that does not work then replace the battery.
The same method was recommended when I purchased a new battery for calibrating the charge circuit in the laptop to match the new battery.