2

I want to install CUDA toolkit and NVIDIA drivers on Ubuntu.I am starter in linux,so I have no experience.I've had worked on this for three days but problem still exists.

Firstly, I disabled Secure Boot in BIOS.After that, In grub menu, I set nomodeset quiet splash installed CUDA Toolkit 10.1 from there.And to install Nvidia drivers I applied steps given below:

$ sudo add-apt-repository ppa:graphics-drivers/ppa  
$ sudo apt update  
$sudo apt install nvidia-driver-418  
reboot

,

when nvidia-smi is entered the output is:

"NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running."

How can I solve this, thanks friends.

~$ uname -a

Linux denisa 4.18.0-17-generic #18-Ubuntu SMP Wed Mar 13 14:34:40 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

,

~$ uname -i

x86_64

,

~$ cat /etc/os-release

NAME="Ubuntu"
VERSION="18.10 (Cosmic Cuttlefish)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.10"
VERSION_ID="18.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=cosmic
UBUNTU_CODENAME=cosmic

̣,

~$ sudo ubuntu-drivers devices

== /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0 ==
modalias : pci:v000010DEd0000134Dsv00001043sd00001490bc03sc02i00
vendor   : NVIDIA Corporation
model    : GM108M [GeForce 940MX]
driver   : nvidia-driver-410 - third-party free
driver   : nvidia-driver-418 - third-party free recommended
driver   : nvidia-driver-396 - third-party free
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-390 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

and

~$ sudo lshw -numeric -C display

      *-display UNCLAIMED       
           description: VGA compatible controller
           **product: HD Graphics 620 [8086:5916]
           vendor: Intel Corporation [8086]**
           physical id: 2
           bus info: pci@0000:00:02.0
           version: 02
           width: 64 bits
           clock: 33MHz
           capabilities: pciexpress msi pm vga_controller bus_master cap_list
           configuration: latency=0
           resources: memory:ed000000-edffffff memory:c0000000-cfffffff ioport:f000(size=64) memory:c0000-dffff
      *-display
           description: 3D controller
           **product: GM108M [GeForce 940MX] [10DE:134D]**
           vendor: NVIDIA Corporation [10DE]
           physical id: 0
           bus info: pci@0000:01:00.0
           version: a2
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list rom
           configuration: driver=nvidiafb latency=0
           resources: irq:16 memory:ee000000-eeffffff memory:d0000000-dfffffff memory:e0000000-e1ffffff ioport:e000(size=128) memory:ef000000-ef07ffff

, Edited-V-1:

~$ mokutil --sb-state
SecureBoot disabled

,

~$ ls /sys/firmware/efi/
config_table  esrt              fw_vendor  runtime-map  vars
efivars       fw_platform_size  runtime    systab

,

 ~$ sudo lshw -c video


 [sudo] password for denisa: 
   *-display UNCLAIMED       
        description: VGA compatible controller
        product: HD Graphics 620
        vendor: Intel Corporation
        physical id: 2
        bus info: pci@0000:00:02.0
        version: 02
        width: 64 bits
        clock: 33MHz
        capabilities: pciexpress msi pm vga_controller bus_master cap_list
        configuration: latency=0
        resources: memory:ed000000-edffffff memory:c0000000-cfffffff ioport:f000(size=64) memory:c0000-dffff
   *-display
        description: 3D controller
        product: GM108M [GeForce 940MX]
        vendor: NVIDIA Corporation
        physical id: 0
        bus info: pci@0000:01:00.0
        version: a2
        width: 64 bits
        clock: 33MHz
        capabilities: pm msi pciexpress bus_master cap_list rom
        configuration: driver=nvidiafb latency=0
        resources: irq:16 memory:ee000000-eeffffff memory:d0000000-dfffffff memory:e0000000-e1ffffff ioport:e000(size=128) memory:ef000000-ef07ffff

,

 ~$ dkms status 

 nvidia, 418.56, 4.18.0-17-generic, x86_64: installed

,

~$ lsmod | grep nvidia

nvidiafb               49152  0
vgastate               20480  1 nvidiafb
fb_ddc                 16384  1 nvidiafb
i2c_algo_bit           16384  2 nvidiafb,i915

,

~$ echo $XDG_SESSION_TYPE

x11

,

~$ nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105

,

Edited-V-2:

~$ sudo mv /etc/modprobe.conf /etc/modprobe.conf.bak

[sudo] password for denisa: 
mv: cannot stat '/etc/modprobe.conf': No such file or directory   

~$ echo "blacklist nvidiafb" | sudo tee -a /etc/modprobe.d/nvidiafb.conf 

blacklist nvidiafb 

~$ sudo depmod -ae 

depmod: WARNING: -e needs -E or -F



~$ sudo update-initramfs -u

update-initramfs: Generating /boot/initrd.img-4.18.0-17-generic

Any help will be appreciated.Thanks friends.

Denisa
  • 21
  • 1
  • 3
  • Please edit your question and post output of the following commands: 1. `mokutil --sb-state` 2. `ls /sys/firmware/efi/` 3. `sudo lshw -c video` 4. `dkms status` 5. `lsmod | grep nvidia` and 6. `echo $XDG_SESSION_TYPE` – Marmayogi Apr 18 '19 at 19:16
  • I ve edited the outputs above, @Marmayogi thanks. for your help. What should be done friends – Denisa Apr 18 '19 at 21:02
  • Do you have any line "blacklist nvidiafb" in any file in /etc/modprobe.d ? Should be on in blacklist-framebuffer.conf. If not, something went wrong with the install, you may add it, but maybe other things are missing too. – ubfan1 Apr 18 '19 at 21:54
  • Yes, @ubfan1 **blacklist nvidiafb** exists in the file **/etc/modprobe.d/blacklist-framebuffer.conf** and it is uncommented.Also in the same path, there exists a file that contains following codelines: **blacklist nouveau** **options nouveau modeset=0** **#alias nouveau off** **#alias lbm-nouveau off** – Denisa Apr 18 '19 at 22:28
  • You tried to install nvidia-418 instead nvidiafb (framebuffer) is in the kernel. Please issue commands: 1. `sudo mv /etc/modprobe.conf /etc/modprobe.conf.bak` 2. `echo "blacklist nvidiafb" | sudo tee -a /etc/modprobe.d/nvidiafb.conf` 3. `sudo depmod -ae` and 4. `sudo update-initramfs -u`. Now install Nvidia driver 1. `sudo apt-get purge nvidia*`, 2. `sudo add-apt-repository ppa:graphics-drivers/ppa`, 3. `sudo apt update`, 4. `sudo apt install nvidia-418` and 5. finally **Reboot**. – Marmayogi Apr 19 '19 at 02:19
  • I have just edited @Marmayogi .After purge and reinstall process Blank Screen appears. – Denisa Apr 19 '19 at 16:03
  • I havent enough reputation to attent the chat – Denisa Apr 19 '19 at 16:52
  • I havent enough reputation to attend the chat It says **"You must have 20 reputation on The Stack Exchange Network to talk here. See the faq. "**. I have only 6 reputation now. – Denisa Apr 19 '19 at 17:10
  • Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/92654/discussion-on-question-by-denisa-cuda-nvidia-installation-unsuccessful-and-nvi). The reputation requirements for this room have been waived for Denisa :) – Seth Apr 19 '19 at 19:23
  • @Denisa, please appear at chat session. `PKCS#7 signature not signed with a trusted key` is not solved yet! – Marmayogi Apr 20 '19 at 16:52
  • **sudo systemctl status systemd-modules-load** I r'ssue the command .I realized in file **/etc/modules-load.d/modules.conf** there exist a line **nouveau.IN this file I commented nouveau =>> #nouveau , save the file, dpkg --configure -a , – Denisa Apr 25 '19 at 20:10
  • apt-get dist-upgrade , apt-get -f install then reboot blank screen problem continued.Then I opened /etc/default/grub with the text editor nano, I edited theline: GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1" *also in this line I had removed **nomodeset quiet splash , save and exit. – Denisa Apr 25 '19 at 20:10
  • Then I run update-grub and reboot Blank screen problem is solved .But **PKCS#7 signature not signed with a trusted key. ** codelines continue appearing on my screen while I am opening the computer.I purged and removed all f'les related with cuda and nvidia\ after nvidia uninstallation the PKS#7 ... has gone/BUt after I reinstalled them again it started to appear again.Until now, it has not created any problem.Thank all of you friends! – Denisa Apr 25 '19 at 20:10

0 Answers0