I can’t find an active thinkpad centric community on here I am just going to post here. My Thinkpad T480s, 16 GB RAM, 238 GB SSD is randomly shutting off while at like 50%. When I try to open it back up it always is dead and I have to connect charger to boot it up again. Why is this happening? Is it battery issue? It complains about not being able to read temp2_input while shutting down and sometimes say PM usage count underflow. Not sure what that is supposed to mean.

  • tal@lemmy.today
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    How do you determine your battery has 50% before it shuts down?

    Debian has a program in the battery-stats package that logs battery at a (by default) 30 second interval. That has a pretty graphing program too. I dunno if Arch packages that, but if not, not hard to roll your own.

    #!/bin/sh
    
    while true; do
        echo $(date; cat /sys/class/power_supply/BAT0/energy_now) >> ~/battery-log
        sync
        sleep 10
    done
    

    That’ll get you a capacity within ten seconds of the next shutdown. If you save that log, repeat it running until it dies a couple times, you can probably tell if it’s consistently at the same capacity that it goes down.