Software & AppsOperating SystemLinux

Why Does My Ubuntu 18.04 Randomly Shut Down?

Ubuntu 19

Ubuntu 18.04, like any other operating system, can sometimes experience issues that lead to random shutdowns. These shutdowns can be due to various reasons, including driver incompatibility, overheating, or hardware issues. This article will explore some of the most common causes and provide solutions to help you resolve the problem.

Quick Answer

The random shutdowns in Ubuntu 18.04 can be caused by Nvidia driver incompatibility, overheating, or hardware issues. To resolve the issue, you can remove the problematic Nvidia driver and install a more stable version, clean your system’s fans or replace thermal paste to prevent overheating, or check for recommended drivers and install them. If none of these solutions work, reviewing system logs may provide further insights into the issue.

Nvidia Driver Incompatibility

One of the most common causes of random shutdowns in Ubuntu 18.04 is Nvidia driver incompatibility. Some users have reported that the Nvidia driver version 396.54 was causing their systems to shut down randomly.

To resolve this issue, you can remove the problematic driver and install a more stable version. Here’s how to do it:

  1. Remove the current Nvidia driver. You can do this by running the following command in your terminal:
    sudo apt purge 'nvidia*'
    This command removes all Nvidia drivers from your system. The sudo command is used to run the operation with root privileges, apt is the package handling utility in Ubuntu, and purge is used to remove the packages along with their configuration files.
  2. Add the graphics-drivers PPA repository. This repository contains the latest graphics drivers. Use the following command:
    sudo add-apt-repository ppa:graphics-drivers/ppa
    This command adds the graphics-drivers PPA to your system’s software sources.
  3. Install the stable Nvidia driver. In this case, we’re installing version 390.87:
    sudo apt install nvidia-390
    This command installs the Nvidia driver version 390.87.

After running these commands, reboot your system to see if the problem is resolved.

Overheating

Another common cause of random shutdowns is overheating. Your system may be reaching its critical temperature limit and shutting down to prevent hardware damage.

To check if this is the case, you can review the kernel log by running the following command:

cat /var/log/kern.log | grep shutting

The cat command is used to display the content of files, and grep is used to search for a specific string. In this case, we’re looking for the word “shutting” in the kernel log.

If you find a message indicating a critical temperature reached, you may need to clean your system’s fans or replace your thermal paste. You can also consider using a cooling pad if you’re using a laptop.

Checking for Driver Recommendations

If the above solutions do not work, it might be helpful to check if the current drivers are recommended for Ubuntu 18.04 on your specific hardware.

  1. Remove all current drivers. You can do this by running the following commands:
    sudo apt purge 'nvidia*'
    sudo add-apt-repository ppa:graphics-drivers/ppa
  2. Check for recommended drivers. Run the following command:
    ubuntu-drivers devices
    This command lists all devices that need drivers, and shows the recommended drivers.
  3. Install the recommended drivers. You can do this by running the following command:
    sudo ubuntu-drivers autoinstall
    This command automatically installs the recommended drivers.

After running these commands, reboot your system to see if the problem is resolved.

Reviewing System Logs

If none of the above solutions work, you can check the system logs for any error messages that might indicate why your system is shutting down. The /var/log/syslog file contains system log messages, and you can view it with the following command:

cat /var/log/syslog

You can also check other log files in /var/log/ for any errors that might provide further insights into the issue.

Conclusion

Random shutdowns can be frustrating and disruptive, but with a bit of troubleshooting, they can often be resolved. By checking your drivers, monitoring your system’s temperature, and reviewing your system logs, you can identify and fix the most common causes of random shutdowns in Ubuntu 18.04. If you’re still experiencing issues, you may need to consider hardware troubleshooting or seeking help from the Ubuntu community.

How do I check my Ubuntu version?

You can check your Ubuntu version by opening a terminal and running the command lsb_release -a.

How can I update my Ubuntu 18.04 to the latest version?

To update Ubuntu 18.04 to the latest version, open a terminal and run the command sudo apt update && sudo apt upgrade. This will update all the packages on your system to their latest versions.

Can I upgrade my Nvidia driver without removing the current one?

Yes, you can upgrade your Nvidia driver without removing the current one. You can do this by running the command sudo apt install nvidia-driver-version, replacing "version" with the specific version you want to install.

How can I monitor the temperature of my system in Ubuntu 18.04?

You can monitor the temperature of your system in Ubuntu 18.04 by installing a tool called "lm-sensors". Open a terminal and run the command sudo apt install lm-sensors. After installation, run sudo sensors-detect to detect and configure your sensors. Finally, run sensors to display the temperature readings.

How can I clean my system’s fans?

To clean your system’s fans, you can use a can of compressed air to blow away any dust or debris that may have accumulated. Make sure to turn off your system and unplug it before cleaning to avoid any electrical damage.

How can I replace the thermal paste on my system?

Replacing the thermal paste on your system requires disassembling your computer and accessing the CPU or GPU. It is recommended to consult the manufacturer’s instructions or seek professional help to ensure proper replacement and avoid any damage.

How can I join the Ubuntu community for help?

You can join the Ubuntu community for help by visiting the Ubuntu Forums (https://ubuntuforums.org/) or the Ubuntu subreddit (https://www.reddit.com/r/Ubuntu/). These platforms are filled with knowledgeable users who are willing to assist with any Ubuntu-related questions or issues.

Leave a Comment

Your email address will not be published. Required fields are marked *