I have installed Ubuntu on, but now I am trying to install NVIDIA CUDA Toolkit for the GPU. When I install it, it says that there is no driver found, so I have tried to install the driver, but I don't know why after installation, the system not coming up. Maybe it is because of the wrong version of the driver.

When I tried to detect the driver version using sudo lshw -C display , it showed this information:

enter image description here

But here it doesn't say that what is the product name of the driver, and also when I go Software & Updates -> Additional Drivers, then it says NVIDIA Corporation: Unknown.

enter image description here

What should I do?


Sorry about posting this as an answer, I'm not able to post a comment to ask you this. Can you show the output of sudo lspci | grep -i nvidia? That might show what GPU it is.

edit: I don't think this is a duplicate. the output of lshw would typically have the name of the GPU, which you could use to install the right driver. Here's what it would usually look like:

       description: VGA compatible controller
       product: GK107GL [Quadro K420]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:49 memory:fa000000-faffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff
  • Thanks! Now I got the name and the product name of the graphics card. Now what is the problem with this nvidia-smi command, it is not found this command when I run. – Bahramdun Adil May 4 '18 at 4:40
  • because nvidia-smi is installed along with the nvidia drivers. Now that you know what GPU you have, you can check if 384.111 supports it. If it does, proceed with the installation. – Harikrishnan R May 4 '18 at 4:45
  • Hi! Images in the question I have clicked on the Use Nvidia binary... and Apply changes, but when reboot, the system cannot login, cannot enter to desktop, What should I do, How can I redo the task? Thanks! – Bahramdun Adil May 4 '18 at 5:14
  • To get back to your desktop, press ctrl-alt-f1 and log in. From this terminal interface, do sudo apt purge nvidia-* followed by sudo reboot. What was the display device that lspci showed? – Harikrishnan R May 4 '18 at 18:58
  • I have undone the task, but I installed the driver many times, every time when installation complete, after reboot, the computer goes to black screen. why? – Bahramdun Adil May 8 '18 at 12:32

From the Software and Updater/Alternative Drivers tab:

  1. Click on the Nvidia binary driver (384.111, should say "tested")
  2. Then click on the "Apply Change" button. Wait for the installation to finish.
  3. Reboot and use the command:

    lshw -c video

    to ensure the Nvidia driver is used (should say driver=nvidia).

    Login problems may result from a "nomodeset" left in the grub.cfg file -- edit it out of the grub boot commands to successfully boot (type e, instructions at bottom of grub screen). Permanently fix grub by editing the /etc/default/grub file and remove the "nomodeset" wherever it appears. Leftover dot files (those beginning with a ".") in your home directory may also cause login problems after installing the Nvidia drivers. These dot files are normally hidden in directory listings, but are shown when the -a is used for the ls command:

    ls -a

    Move them to a directory to save them and let them be recreated as needed.

    mkdir tmphold
    mv .Xauthority .cache .config .local tmphold

    Pull any pieces out of the saved copied if necessary. .Xauthority, .cache, .config and .local are the prime candidates for holding leftover configuration information.

Once the Nvidia drivers are installed and working, just install the cuda deb from the Intel site. Do check that your hardware is compatible with CUDA 9.1. You might need to use CUDA 8.0 which has lower requirements. Download the CUDA deb Intel CUDA download page and the patches offered. Follow the instructions in step one, copied below:

`sudo dpkg -i cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb`
`sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub`
`sudo apt-get update`
`sudo apt-get install cuda`

The last step installs the cuda package(s) from the Ubuntu repositories.

  • Hi sir! I have done what you mentioned (Click on the Nvidia binary driver (384.111) then click on the "Apply Change" button) but when I reboot the system, not when I enter the password and hit Enter Key, the screen become black and system unable login? – Bahramdun Adil May 4 '18 at 4:52
  • What should I do now, how can redo the previouse task? – Bahramdun Adil May 4 '18 at 4:52
  • Is there a link to the CUDA .deb file from the Intel site? I usually install the CUDA .deb file from the official NVIDIA site. Also this answer has spelling errors (akppears -> appears, intel -> Intel) and while you're editing it why not number the steps to improve the readability? – karel May 5 '18 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.