Why does my Ubuntu 18.04 randomly shut down?
Solution 1
In my case, it turned out to be an Nvidia driver that caused random shutdowns. I had the driver 396.54, but removing it and installing the 390.87 fixed the problem. You can do something like
sudo apt purge 'nvidia*'
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt install nvidia-390
Solution 2
For me it was also the temperature limit, although I think it is a false postive and something makes that value jump somehow. I recently changed batteries on my old Lenovo T430s and these things started happening.
This way I found out:
cat /var/log/kern.log | grep shutting
And it showed this:
Jan 10 11:36:34 kernel: [166814.992608] thermal thermal_zone0: critical temperature reached (128 C), shutting down
Solution 3
If the above doesn't work for you it might be because the current drivers might not be recommended for Ubuntu 18.04 on your machine.
First remove all current drivers
sudo apt purge 'nvidia*'
sudo add-apt-repository ppa:graphics-drivers/ppa
Try running
ubuntu-drivers devices
and install the driver that has recommended next to it using
sudo ubuntu-drivers autoinstall
then reboot
Related videos on Youtube
Wayne Werner
I'm a husband to my beautiful wife, father to our children, Computer Science graduate from University of Central Arkansas. I love my wife, our children, computers, playing guitar (especially singing/playing for my wife and/or kids), bicycling (including taking my kids for rides in my bike trailer), woodworking, airbrushing, digital and traditional artistry, playing games with my family (traditional and digital), my poor Chevette that I had to sell, throwing knives, firearms, knot tying, rope making, whip making, and really just learning new stuff in general. If I don't know about it I probably want to learn about it, if only so I can make informed decisions about it. My three favorite programming languages are Python, Lisp, and Assembly (though I'm not sure about the order of those last two languages...). I think the CANSPAM act is one of the dumbest pieces of legislation in the history of the universe I love Python and HTML+Javascript. I'm #SOreadytohelp (I really want a t-shirt, what can I say?)
Updated on September 18, 2022Comments
-
Wayne Werner almost 2 years
I'm running Ubuntu 18.04 (start with server edition, because the hardware is pretty weak) on some older hardware - a desktop. Memtest ran fine on it before I installed, but it seems that it will randomly shut down - typically when I'm doing something like a
sudo apt-get update
. It appears to go through the normal shutdown process - I see all the shutdown messages, etc. But it's definitely a forcible sort of stop since I have to rundpkg --configure -a
or whatever it is if I was in the middle of installing software.Any clue what could be happening here? I have a theory it might be related to power consumption but I'm not sure why that would cause what I'm seeing. If I run glxgears I can run like 10 of them at a time (slows my FPS way down, of course) for a couple of minutes and then beeeooooop! Off my machine goes.
Is there somewhere I could look?
-
RobotHumans almost 6 yearsI had a similar problem. It's probably a heat sensor (just spitballing, I haven't checked). Where if I run a VM within virtualbox on a single core machine, it has no problem pegging out the processor at 100%. So, heat most probably is the issue if it sits there pegged. Windows probably just had more loosey-goosey heat tolerances or doesn't do heat based shutdowns.
-
Wayne Werner almost 6 years@RobotHumans how would I be able to check that?
-
user535733 almost 6 yearsCan you please tell us more about the shutdown messages that you see? Also, review /var/log/syslog at the time of shutdown for helpful warnings and notifications. If you run across any, please add them to your question.
-
Rinzwind almost 6 yearsIf it is truly random it is likely a hardware error. Check in /var/log/ if you can find an log that got updated and if it shows any errors.
-
Wayne Werner almost 6 yearsI couldn't find anything in
/var/log/syslog
- not even anything about shutting down. I even did anag power
(grep -Inri power .
equivalent) in/var/log/
with nothing suspicious. Any other terms I should keep an eye out for? -
RobotHumans almost 6 yearsI'ld also look at dmesg output. If you see kernel panic anywhere, that's your problem.
-
Chai T. Rex over 5 years
-
-
Wayne Werner over 5 yearsFinally got around to reinstalling and this appears to be it
-
Ben almost 3 yearsSo how did you fix it?