26
My Thinkpad T480s randomly dies with Arch Linux
(sh.itjust.works)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
There are lots and lots of possible reasons for this to happen, so people will need some more information to help you find the issue.
Are you able to boot it at all after it shuts down? How often does it "randomly" get shut down? How do you determine your battery has 50% before it shuts down? Can you check if it happens on other operating systems? What does "it complains" mean, is it a warning in journalctl? Also, please post precise outputs of any errors you might see in journalctl at the time 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.
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.
Here a picture of the screen I get before it shuts down.
I am using upower to determine the battery status. It happens once every day or so. It posts the messages in the tty as it shuts down. systemctl schedules the shutdown slightly ahead of time.