The battery levels might have changed drastically compared to before sleep. Since we poll batteries at set intervals, it can take quite some time for the new level to be picked up by the polling code.
Listen to the "PrepareForSleep" signal emitted by logind, that gets emitted on suspend and wake up. Pause polling globally on suspend, and refresh all devices manually and resume polling when waking up.
01cd65c linux: Refresh devices after waking up from sleep
src/linux/up-backend.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)