VK Cloud logo

Updating the Linux GPU driver

  1. Check your VM's configuration type:

    1. Go to your VK Cloud personal account.
    2. Go to Cloud ComputingVirtual Machines.
    3. In the list, find the VM for which you need to update the GPU driver. Make sure the Type column shows a dedicated GPU configuration flavor.
  2. Connect to the VM with the GPU.

  3. Determine the installed driver version:

    /usr/bin/nvidia-smi --query-gpu=driver_version --format=csv,noheader| head -n1

    A No such file or directory error means the driver is not installed. Go to Installing the Linux GPU driver.

  4. Determine how the driver was installed:

    dpkg -S "$(command -v nvidia-smi)" 2>/dev/null

    An empty response means the nvidia-smi command is not linked to your package manager. Usually this means the driver was installed without a package manager, using a ready-made *.run installer from the vendor's website.

    To update the version, the driver needs to be reinstalled. To do this, first remove the driver, and then install it again.

  5. Determine the update source and the versions available for update:

    apt-cache policy nvidia-driver-<BRANCH_VERSION>

    <BRANCH_VERSION> is the major version number of the driver obtained when checking for nvidia-smi. For example, 550.

    If the command succeeds and the Candidate or Installed fields in the output show a version from system or other third-party repositories other than developer.download.nvidia.com, it's better to switch to the NVIDIA CUDA repository and reinstall the driver instead of updating.

    To reinstall, first remove the driver, and then install it again.

  6. Update the driver:

    sudo apt install --only-upgrade -y cuda-driver-<BRANCH_VERSION>

    Here <BRANCH_VERSION> is the major version number to update the driver to. For example, 550.

Was this article helpful?