this post was submitted on 21 Oct 2023
26 points (96.4% liked)
Linux
48178 readers
1477 users here now
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.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.
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.
Here a picture of the screen I get before it shuts down.