How to Check NVIDIA Driver Version on Linux

Understanding the version of the NVIDIA driver installed on your Linux system is crucial for compatibility with various applications, especially for gaming, scientific computing, and machine learning tasks. Whether you are troubleshooting a driver issue or ensuring that you meet the prerequisites for software that requires a specific driver version, knowing how to check your NVIDIA driver version is a useful skill.

In this tutorial you will learn:

  • How to use the command line to find the NVIDIA driver version
  • Different commands that can provide detailed information about the installed NVIDIA driver
  • Additional tips for accessing NVIDIA driver information through graphical tools and system logs
How to Check NVIDIA Driver Version on Linux
How to Check NVIDIA Driver Version on Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Linux OS with NVIDIA GPU installed
Software NVIDIA driver, Terminal
Other Optional: sudo privileges for certain commands
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user
LONG-LIVED VS. SHORT-LIVED BRANCH NVIDIA DRIVERS
NVIDIA offers two types of driver releases: Long-Lived Branch (LLB) and Short-Lived Branch (SLB). LLB drivers are intended for more stable and tested features, suitable for enterprise and productivity users who need reliability over cutting-edge features. On the other hand, SLB drivers include the latest enhancements and improvements, which are ideal for gamers and developers who prioritize access to the newest capabilities.

Methods to Check NVIDIA Driver Version

There are several methods to determine the version of the NVIDIA driver on a Linux system, ranging from simple command line queries to examining system logs.

  1. Using nvidia-smi Command: This command provides the easiest way to check your NVIDIA driver version.
    $ nvidia-smi

    This tool not only displays the driver version but also provides information about the GPU type, its memory, and current usage statistics.

    Check NVIDIA driver version by using nvidia-smi command
    Using nvidia-smi Command


  2. Using modinfo Command: Detailed driver information can be accessed through the kernel module.
    $ modinfo nvidia | grep ^version

    This command retrieves detailed information about the NVIDIA driver module, specifically filtering to show the version.

    Using modeinfo command to check driver version
    Using modeinfo command to check driver version
    $ modinfo /usr/lib/modules/$(uname -r)/kernel/drivers/video/nvidia.ko | grep ^version

    This command looks up the version of the NVIDIA driver in the specific module directory for the currently running kernel.

    Check NVIDIA driver version in module directory
    Check NVIDIA driver version in module directory
    $ modinfo /lib/modules/$(uname -r)/updates/dkms/nvidia.ko.zst | grep ^version

    This command checks the version in a dynamically updated kernel module, useful when drivers are managed by DKMS (Dynamic Kernel Module Support).

  3. Checking Graphical Interface: For users who prefer a graphical interface, the NVIDIA X server settings application can be accessed from the GUI menu. This application provides a user-friendly way to view not only the driver version but also other settings related to the NVIDIA GPU.

    NVIDIA X server settings reveals driver version
    NVIDIA X server settings reveals driver version
  4. Using inxi Tool: The inxi command is a full-featured system information script that provides detailed reports about various hardware components, including graphics cards.
    $ inxi -G

    This command displays information about the graphics card(s) in the system. For NVIDIA devices, it will show the driver version along with other graphics card details like the GPU model and display resolution. This tool is particularly useful for getting a quick overview of the graphics setup, especially when troubleshooting or comparing performance across different systems.

    inxi shows GPU details, including driver
    inxi shows GPU details, including driver
  5. Reviewing System Logs: System logs can sometimes reveal the driver version at the time of system events like booting or hardware detection.
    $ sudo dmesg | grep 'loading NVIDIA'

    This command filters the kernel ring buffer messages for mentions of “loading NVIDIA,” which typically indicates when the NVIDIA driver is being initialized.

    $ sudo cat /var/log/syslog | grep "NVIDIA GLX"

    This command searches the syslog for entries related to NVIDIA GLX, which can include mentions of the NVIDIA driver version during graphical system initialization.

    Find NVIDIA GLX entries in syslog to check for drivers version
    Find NVIDIA GLX entries in syslog to check for drivers version

Conclusion

Checking the NVIDIA driver version on a Linux system can be done through various methods depending on your preference for using the command line or graphical interfaces. Each method provides a reliable way to ascertain the driver version, which is vital for troubleshooting and ensuring optimal system performance.

 



Comments and Discussions
Linux Forum