I had earlier installed nvidia-340, using
sudo apt-get install nvidia-340
I was trying to install Cuda-8, but it required nvidia-367. So I removed nvidia-340 and all other nvidia products, using
sudo apt-get purge nvidia
Then installed nvidia 367, using
sudo apt-get install nvidia-367
Now though nvidia-prime shows version as 367, in additional drivers section, nouveau is selected and the other option is nvidia-340 (unselected). There is no option for nvidia-367.
And when I switched to nvidia-340 in additional drivers section, nvidia-prime started showing version as 340.
So my problem is that I'm unable to install nvidia-367 successfully on my computer. Output of dpkg is:
$ dpkg -l | grep -i nvidia
ii bbswitch-dkms 0.8-3ubuntu1 amd64 Interface for toggling the power on NVIDIA Optimus video cards
ii libcuda1-340 340.101-0ubuntu0.16.04.1 amd64 NVIDIA CUDA runtime library
ii nvidia-340 340.101-0ubuntu0.16.04.1 amd64 NVIDIA binary driver - version 340.101
rc nvidia-367 367.57-0ubuntu0.16.04.1+gpu16.04.1 amd64 NVIDIA binary driver - version 367.57
ii nvidia-opencl-icd-340 340.101-0ubuntu0.16.04.1 amd64 NVIDIA OpenCL ICD
rc nvidia-opencl-icd-367 367.57-0ubuntu0.16.04.1+gpu16.04.1 amd64 NVIDIA OpenCL ICD
ii nvidia-prime 0.8.2 amd64 Tools to enable NVIDIA's Prime
ii nvidia-settings 375.26-0ubuntu0~gpu16.04.1 amd64 Tool for configuring the NVIDIA graphics driver
Note that both nvidia-340 and nvidia-367 come in the list.
The interesting thing is when I remove all nvidia drivers; even though "dpkg -l | grep -i nvidia" shows nothing, nvidia-340 still appears in additional drivers section.
PS: I'm running Ubuntu 16.04 on a notebook PC, GPU is Nvidia GeForce 820M.