
In this article, we will delve into the process of disabling and enabling the NVIDIA GPU from the command line in Ubuntu 18.04.5 LTS. This guide will be particularly useful for those who want to manage their system’s graphics processing unit (GPU) usage effectively.
To disable the NVIDIA GPU from the command line in Ubuntu, use the following command: sudo prime-select intel
. To enable the NVIDIA GPU again, use the command sudo prime-select nvidia
. Reboot your system after each command for the changes to take effect.
Introduction
Ubuntu, like other Linux distributions, allows you to control your system’s hardware through the command line. This includes the graphics card, which can be crucial for tasks that require high graphical processing power, such as gaming, 3D modeling, and video editing.
In systems with both Intel and NVIDIA GPUs, you might want to switch between them depending on your current needs. The prime-select
command in Ubuntu allows you to do just that.
Prerequisites
Before proceeding, ensure that you have the NVIDIA driver installed correctly. You can install the driver by navigating to “Software & Updates” and selecting the appropriate driver from the “Additional Drivers” tab.
Disabling the NVIDIA GPU
To disable the NVIDIA GPU, you need to switch your system’s GPU profile to Intel. Here’s how:
- Open a terminal window. You can do this by pressing
Ctrl+Alt+T
. - Run the following command:
sudo prime-select intel
The sudo
command allows you to run commands with administrative privileges. prime-select
is the command used to switch between GPU profiles, and intel
is the parameter that specifies the Intel GPU.
- You will likely need to enter your password to authorize the command.
- Reboot your system for the changes to take effect. You can do this by running:
sudo reboot
After the reboot, your system will be using the Intel GPU instead of the NVIDIA GPU.
Enabling the NVIDIA GPU
To enable the NVIDIA GPU again, follow these steps:
- Open a terminal window.
- Run the following command:
sudo prime-select nvidia
In this command, nvidia
is the parameter that specifies the NVIDIA GPU.
- Reboot your system again for the changes to take effect:
sudo reboot
After the second reboot, your system will be using the NVIDIA GPU.
Conclusion
By following the steps outlined in this article, you can easily switch between using the NVIDIA GPU and the Intel GPU on your Ubuntu system. This can be particularly useful for managing your system’s resources effectively.
Remember, always be cautious when using sudo
commands and only use them when necessary. Misuse of sudo
commands can lead to system instability or data loss.
For more information on managing your system’s hardware in Ubuntu, you can visit the Ubuntu documentation.
You can check if the NVIDIA driver is installed correctly by running the command nvidia-smi
in the terminal. If the command displays information about your NVIDIA GPU, then the driver is installed correctly.
No, switching between the Intel and NVIDIA GPUs requires a system reboot for the changes to take effect.