26

I tried using cat /proc/driver/nvidia/version but it says the file does not exist.

Is there any alternative way to do that?

I tried to look manually for that file, but I couldn't find it. I also searched for
it and still could not find it.

Any suggestions?

Rev3rse
  • 941
  • 2
  • 8
  • 6
  • have you tried the command you have post with `sudo` ? – Hanan Nov 29 '11 at 22:05
  • 1
    @HananN. That file is world-readable on my system, and you wouldn't get a "file does not exist" error if it wasn't – Michael Mrozek Nov 30 '11 at 00:10
  • 2
    @Rev3rse: are you sure the nvidia module is loaded? Does it appear in `lsmod`? `dmesg|grep -i nvidia`? – Mat Nov 30 '11 at 06:46
  • related: https://askubuntu.com/questions/774651/switching-between-nvdia-driver-versions-on-16-04, https://askubuntu.com/questions/335285/how-to-change-proprietary-video-driver-using-the-command-line – Charlie Parker Jul 19 '21 at 20:37

5 Answers5

22

Try to run the nvidia-smi command. It will give you information about your driver version, the cards you have in your system, etc. The advantage is that you do not need a GUI, and it is an altervative to modinfo nvidia.

Robert
  • 221
  • 2
  • 3
  • Is this actually a solution or a recommendation for the next step in troubleshooting? If the latter, it should be a comment. – HalosGhost Dec 01 '14 at 16:07
  • 2
    It is nvidia's own management program, which should answer the original question. – Robert Dec 01 '14 at 16:58
10

Ok.. first of all, what is this video card and what kernel module is loaded:

$ lspci -k | grep -A 2 -i "VGA"
02:00.0 VGA compatible controller: nVidia Corporation NV41 [GeForce 6800 GS] (rev a2)
  Kernel driver in use: nvidia
  Kernel modules: nvidia, nouveau, nvidiafb
$ _

So I do have nVidia graphics card with loaded kernel module - "nvidia". Let's see more about this driver, but search for the "version":

$ modinfo nvidia | grep version 

Although you could just read a full output if ".. | grep version" returns no result:

$ modinfo nvidia
elv
  • 336
  • 1
  • 9
10

Easiest way to isolate the NVidia Driver Version number alone is to run the following:

nvidia-smi --query-gpu=driver_version --format=csv,noheader

On my system this produces the following result:

andrew@ilium~$ nvidia-smi --query-gpu=driver_version --format=csv,noheader
510.60.02
andrew@ilium~$ 
  • That is assuming the `nvidia` driver is loaded, which might not be the case if the system is using a Bumblebee-type solution to power down the discrete GPU to save power... which woukd have been the way to do it back in 2011 when the question was written. – telcoM Feb 25 '21 at 00:26
4

You can also use nvidia-settings from command line:

$ nvidia-settings -q NvidiaDriverVersion

Attribute 'NvidiaDriverVersion' (neptune:0.0): 304.117

Use all to get the whole attribute list (verbose!)

$ nvidia-settings -q all

Marcs
  • 411
  • 6
  • 13
4

try nvidia-settings and on the Gui that open you should see the version number.

Hanan
  • 5,631
  • 4
  • 28
  • 30