In this blog post, I’ll guide you through the process of installing proper NVIDIA drivers and CUDA on Ubuntu 23.10.

Scenario

Let’s first understand the situation you might be facing:

  • You own an NVIDIA GPU and need to install CUDA.
  • You’re facing issues with missing NVIDIA drivers.
  • The additional driver option in Ubuntu is displaying errors like pc-client-error-quark.

alt Additional drivers Figure: The Additional Drivers interface may display errors for all available NVIDIA drivers (both proprietary and open). This article provides a solution to resolve this issue using the terminal.

The Solution: A Step-by-Step Guide

Here’s a step-by-step guide to help you easily install recommended NVIDIA driver1. After that you can install by CUDA using nvidia-cuda-toolkit0. Open a terminal and follow the steps.

Step 1: Upgrade Ubuntu distro and remove unnecessary packages
sudo apt dist-upgrade
sudo apt autoremove
ubuntu-drivers devices

alt Check available drivers Figure: Check the available NVIDIA drivers with one “recommended” text.

One of them is marked as recommended. Install that driver:

sudo apt install nvidia-driver-XXX
# Example
sudo apt install nvidia-driver-550
Step 3: Restart the machine
sudo reboot

After reboot if you check System Details from Settings > About > System Details, it will show the NVIDIA GPU:

alt NVIDIA GPU Figure: After installation of proper GPU driver the system details show the GPU model

Step 4: Install CUDA toolkit

With the NVIDIA driver installed, proceed to install CUDA:

sudo apt-get install nvidia-cuda-toolkit

Confirm the GPU driver installation with nvidia-smi and check the NVCC compiler version with nvcc --version:

nvidia-smi
nvcc --version

alt NVIDIA SMI Figure: Displaying the NVIDIA GPU and NVCC compiler version after driver and CUDA toolkit installation.

Conclusion

Follow these simple steps to install the proper NVIDIA GPU driver, even if you encounter errors with the Additional Drivers setting. While the NVIDIA documentation2 provides an alternative installation procedure, nvidia-cuda-toolkit offers a straightforward solution. The same approach may work in other Ubuntu versions as well Ubuntu 23.10.

References:

Advertisement

Citation

Click to select citation style

Shovon, A. R. (2024, May 5). How to install NVIDIA driver and CUDA on Ubuntu 23.10. Ahmedur Rahman Shovon. Retrieved June 22, 2024, from https://arshovon.com/blog/install-cuda-on-ubuntu-23-10/

Shovon, Ahmedur Rahman. “How to install NVIDIA driver and CUDA on Ubuntu 23.10.” Ahmedur Rahman Shovon, 5 May. 2024. Web. 22 Jun. 2024. https://arshovon.com/blog/install-cuda-on-ubuntu-23-10/.

@misc{ shovon_2024,
    author = "Shovon, Ahmedur Rahman",
    title = "How to install NVIDIA driver and CUDA on Ubuntu 23.10",
    year = "2024",
    url = "https://arshovon.com/blog/install-cuda-on-ubuntu-23-10/",
    note = "[Online; accessed 22-June-2024]"
}
Related contents in this website