Software & AppsOperating SystemLinux

How To Fix High CPU Usage in Ubuntu Desktop

Ubuntu 20

High CPU usage, even when no application is running, is a common issue faced by Ubuntu users. This problem has been reported in various versions of Ubuntu, including 10.04 and 13.04. Users have observed CPU usage of more than 30% on each core, leading to high processor temperatures. This article will guide you through several steps to troubleshoot and fix this issue.

Quick Answer

To fix high CPU usage in Ubuntu Desktop, start by identifying the process consuming the most CPU using the top command. If it’s not an essential process, kill it using sudo pkill [processname]. Alternatively, you can use the htop command for a more user-friendly interface to monitor processes. Adjust settings for specific processes like gnome-system-monitor or compiz, and check for hardware-related issues in the BIOS settings.

Identifying the Problematic Process

The first step in troubleshooting this issue is to identify the process consuming the most CPU. This can be done using the top command in the terminal. The top command provides a dynamic real-time view of the running system. It displays system summary information and a list of tasks currently managed by the Linux kernel.

Open the terminal and type top and press Enter. You will see a list of processes along with their CPU usage. Look for the process that is using the most CPU.

If the process is not essential to the system, it can be killed using the sudo pkill [processname] command. The sudo pkill command sends a signal to the process, causing it to terminate. Replace [processname] with the name of the process you want to kill.

However, if it is a system process, it is recommended to research its functionality in Ubuntu and disable it through system settings if possible.

Using Alternative Tools for Monitoring Processes

htop is an alternative to the top command and provides a more user-friendly interface. It can be installed using the command sudo apt install -y htop. The -y option in the command automatically confirms the installation, saving you from having to manually do so.

After installing htop, you can run it by typing htop in the terminal. This will give you a more detailed view of your system’s processes and their CPU usage.

Adjusting Settings for Specific Processes

In some cases, the high CPU usage may be attributed to specific processes such as gnome-system-monitor, tracker-miner-fs (file indexing service), or compiz (desktop compositor).

For example, tracker-miner-fs is a service that indexes your files for faster searching. However, it can sometimes cause high CPU usage. To limit its activity, you can go to Settings > Search and turn off the indexing when the computer is in use.

Compiz is a desktop compositor that provides 3D visual effects. While it enhances the visual experience, it can also lead to high CPU usage. You can disable unnecessary visual effects by going to System Settings > Appearance > Visual Effects and selecting ‘None’.

Checking Hardware-related Issues

In one instance, a user reported that disabling the battery charger in the BIOS resolved their excessive CPU utilization problem. This was likely due to the charger drawing excessive current and causing high temperatures.

To access the BIOS, restart your computer and press the BIOS key (usually F2, F10, F12, or Del) during boot up. Once in the BIOS, look for the battery charger setting and disable it. Note that the exact steps may vary depending on your computer’s make and model.

Conclusion

High CPU usage on Ubuntu even when no applications are running can be caused by various factors, including specific processes, system monitor tools, or hardware-related issues. By identifying the problematic processes and adjusting settings accordingly, users can potentially mitigate the issue and reduce CPU usage.

Remember, when dealing with system processes and BIOS settings, always proceed with caution. If you’re unsure about anything, it’s best to seek help from a professional or a trusted online community.

How can I identify the process consuming the most CPU in Ubuntu?

To identify the process consuming the most CPU, you can use the top command in the terminal. Open the terminal and type top and press Enter. You will see a list of processes along with their CPU usage. Look for the process that is using the most CPU.

How can I kill a process in Ubuntu?

If the process is not essential to the system, it can be killed using the sudo pkill [processname] command. The sudo pkill command sends a signal to the process, causing it to terminate. Replace [processname] with the name of the process you want to kill.

What is `htop` and how can I install it in Ubuntu?

htop is an alternative to the top command and provides a more user-friendly interface for monitoring processes. You can install htop by using the command sudo apt install -y htop. The -y option in the command automatically confirms the installation, saving you from having to manually do so.

How can I adjust settings for specific processes causing high CPU usage?

In some cases, specific processes like gnome-system-monitor, tracker-miner-fs, or compiz can cause high CPU usage. To adjust their settings, you can go to the respective system settings or preferences. For example, to limit the activity of tracker-miner-fs, go to Settings > Search and turn off indexing when the computer is in use. To disable unnecessary visual effects of compiz, go to System Settings > Appearance > Visual Effects and select ‘None’.

Can hardware-related issues cause high CPU usage in Ubuntu?

Yes, hardware-related issues can sometimes cause high CPU usage. For example, excessive current drawn by the battery charger can lead to high temperatures and increased CPU utilization. In such cases, accessing the BIOS and disabling the battery charger setting may resolve the issue. Restart your computer and press the BIOS key (usually F2, F10, F12, or Del) during boot up to access the BIOS. Look for the battery charger setting and disable it. Note that the exact steps may vary depending on your computer’s make and model.

Leave a Comment

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