Nvidia process not running

I have a GPU server having Arch Linux installed on it:
Linux 5.14.16-arch1-1 #1 SMP PREEMPT Tue, 02 Nov 2021 22:22:59 +0000 x86_64 GNU/Linux

having two NVIDIA GeForce RTX 3080 GPU cards installed on it:

$ lspci -k | grep -A 2 -E "(VGA|3D)"
lspci: Unable to load libkmod resources: error -2
00:02.0 VGA compatible controller: Intel Corporation CometLake-S GT2 [UHD Graphics 630] (rev 05)
        DeviceName: Onboard - Video
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device 7c79
--
01:00.0 VGA compatible controller: NVIDIA Corporation GA102 [GeForce RTX 3080] (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] RTX 3080 10GB GAMING X TRIO
        Kernel driver in use: nvidia
--
03:00.0 VGA compatible controller: NVIDIA Corporation GA102 [GeForce RTX 3080] (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] RTX 3080 10GB GAMING X TRIO
        Kernel driver in use: nvidia
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

However, it seems that they are not functioning at all:

$ nvidia-smi
Sun Dec 12 22:29:29 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.44       Driver Version: 495.44       CUDA Version: 11.5     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| 30%   46C    P0    96W / 340W |      0MiB / 10018MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA GeForce ...  Off  | 00000000:03:00.0 Off |                  N/A |
| 30%   37C    P0    N/A / 340W |      0MiB / 10018MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Consequently, when I am trying to utilize them using TensorFlow2 with the following code,

# Check GPU availibility-
gpu_devices = tf.config.list_physical_devices('GPU')
# print(f"GPU: {gpu_devices}")

if gpu_devices:
    print(f"GPU: {gpu_devices}")
    details = tf.config.experimental.get_device_details(gpu_devices[0])
    print(f"GPU details: {details.get('device_name', 'Unknown GPU')}")
else:
    print("No GPU found")

It outputs: “No GPU found”.

What’s going wrong?

Please post the output of the deviceQuery sample that comes with cuda.

./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 999
-> unknown error
Result = FAIL

Please make sure the nvidia-uvm module is installed. Please try loading it by running deviceQuery as root. If that succeds, please install nvidia-modprobe so normal users can also load the module.

How to install “nvidia-uvm”? Loading deviceQuery repeats the error posted above. Any tutorial on how to reinstall nvidia drivers from scratch for RTX 3080?

Please check if it’s available
modinfo nvidia-uvm
and loaded
lsmod |grep uvm

Hi, sorry for the late reply. The outputs of the commands are as follows:

To check it’s availability:

$ modinfo nvidia-uvm
filename:       /lib/modules/5.15.7-arch1-1/extramodules/nvidia-uvm.ko.xz
supported:      external
license:        Dual MIT/GPL
srcversion:     CF0936610198538441A2A2D
depends:        nvidia
retpoline:      Y
name:           nvidia_uvm
vermagic:       5.15.7-arch1-1 SMP preempt mod_unload
parm:           uvm_perf_prefetch_enable:uint
parm:           uvm_perf_prefetch_threshold:uint
parm:           uvm_perf_prefetch_min_faults:uint
parm:           uvm_perf_thrashing_enable:uint
parm:           uvm_perf_thrashing_threshold:uint
parm:           uvm_perf_thrashing_pin_threshold:uint
parm:           uvm_perf_thrashing_lapse_usec:uint
parm:           uvm_perf_thrashing_nap:uint
parm:           uvm_perf_thrashing_epoch:uint
parm:           uvm_perf_thrashing_pin:uint
parm:           uvm_perf_thrashing_max_resets:uint
parm:           uvm_perf_map_remote_on_native_atomics_fault:uint
parm:           disable_hmm:Force-disable HMM functionality in the UVM driver.                                                                          Default: false (i.e, HMM is potentially enabled). Ignored if HMM is not support                                                                         ed in the driver, or if ATS settings conflict with HMM. (bool)
parm:           uvm_perf_migrate_cpu_preunmap_enable:int
parm:           uvm_perf_migrate_cpu_preunmap_block_order:uint
parm:           uvm_global_oversubscription:Enable (1) or disable (0) global ov                                                                         ersubscription support. (int)
parm:           uvm_perf_pma_batch_nonpinned_order:uint
parm:           uvm_leak_checker:Enable uvm memory leak checking. 0 = disabled,                                                                          1 = count total bytes allocated and freed, 2 = per-allocation origin tracking.                                                                          (int)
parm:           uvm_force_prefetch_fault_support:uint
parm:           uvm_debug_enable_push_desc:Enable push description tracking (ui                                                                         nt)
parm:           uvm_debug_enable_push_acquire_info:Enable push acquire informat                                                                         ion tracking (uint)
parm:           uvm_page_table_location:Set the location for UVM-allocated page                                                                          tables. Choices are: vid, sys. (charp)
parm:           uvm_perf_access_counter_mimc_migration_enable:Whether MIMC acce                                                                         ss counters will trigger migrations.Valid values: <= -1 (default policy), 0 (of                                                                         f), >= 1 (on) (int)
parm:           uvm_perf_access_counter_momc_migration_enable:Whether MOMC acce                                                                         ss counters will trigger migrations.Valid values: <= -1 (default policy), 0 (of                                                                         f), >= 1 (on) (int)
parm:           uvm_perf_access_counter_batch_count:uint
parm:           uvm_perf_access_counter_granularity:Size of the physical memory                                                                          region tracked by each counter. Valid values asof Volta: 64k, 2m, 16m, 16g (ch                                                                         arp)
parm:           uvm_perf_access_counter_threshold:Number of remote accesses on                                                                          a region required to trigger a notification.Valid values: [1, 65535] (uint)
parm:           uvm_perf_reenable_prefetch_faults_lapse_msec:uint
parm:           uvm_perf_fault_batch_count:uint
parm:           uvm_perf_fault_replay_policy:uint
parm:           uvm_perf_fault_replay_update_put_ratio:uint
parm:           uvm_perf_fault_max_batches_per_service:uint
parm:           uvm_perf_fault_max_throttle_per_service:uint
parm:           uvm_perf_fault_coalesce:uint
parm:           uvm_fault_force_sysmem:Force (1) using sysmem storage for pages                                                                          that faulted. Default: 0. (int)
parm:           uvm_perf_map_remote_on_eviction:int
parm:           uvm_exp_gpu_cache_peermem:Force caching for mappings to peer me                                                                         mory. This is an experimental parameter that may cause correctness issues if us                                                                         ed. (uint)
parm:           uvm_exp_gpu_cache_sysmem:Force caching for mappings to system m                                                                         emory. This is an experimental parameter that may cause correctness issues if u                                                                         sed. (uint)
parm:           uvm_channel_num_gpfifo_entries:uint
parm:           uvm_channel_gpfifo_loc:charp
parm:           uvm_channel_gpput_loc:charp
parm:           uvm_channel_pushbuffer_loc:charp
parm:           uvm_enable_va_space_mm:Set to 0 to disable UVM from using mmu_n                                                                         otifiers to create an association between a UVM VA space and a process. This wi                                                                         ll also disable pageable memory access via either ATS or HMM. (int)
parm:           uvm_enable_debug_procfs:Enable debug procfs entries in /proc/dr                                                                         iver/nvidia-uvm (int)
parm:           uvm_peer_copy:Choose the addressing mode for peer copying, opti                                                                         ons: phys [default] or virt. Valid for Ampere+ GPUs. (charp)
parm:           uvm_ats_mode:Set to 0 to disable ATS (Address Translation Servi                                                                         ces). Any other value is ignored. Has no effect unless the platform supports AT                                                                         S. (int)
parm:           uvm_debug_prints:Enable uvm debug prints. (int)
parm:           uvm_enable_builtin_tests:Enable the UVM built-in tests. (This i                                                                         s a security risk) (int)
[arjun@equinox ~]$
[arjun@equinox ~]$ modinfo nvidia-uvm
filename:       /lib/modules/5.15.7-arch1-1/extramodules/nvidia-uvm.ko.xz
supported:      external
license:        Dual MIT/GPL
srcversion:     CF0936610198538441A2A2D
depends:        nvidia
retpoline:      Y
name:           nvidia_uvm
vermagic:       5.15.7-arch1-1 SMP preempt mod_unload
parm:           uvm_perf_prefetch_enable:uint
parm:           uvm_perf_prefetch_threshold:uint
parm:           uvm_perf_prefetch_min_faults:uint
parm:           uvm_perf_thrashing_enable:uint
parm:           uvm_perf_thrashing_threshold:uint
parm:           uvm_perf_thrashing_pin_threshold:uint
parm:           uvm_perf_thrashing_lapse_usec:uint
parm:           uvm_perf_thrashing_nap:uint
parm:           uvm_perf_thrashing_epoch:uint
parm:           uvm_perf_thrashing_pin:uint
parm:           uvm_perf_thrashing_max_resets:uint
parm:           uvm_perf_map_remote_on_native_atomics_fault:uint
parm:           disable_hmm:Force-disable HMM functionality in the UVM driver. Default: false (i.e, HMM is potentially enabled). Ignored if HMM is not supported in the driver, or if ATS settings conflict with HMM. (bool)
parm:           uvm_perf_migrate_cpu_preunmap_enable:int
parm:           uvm_perf_migrate_cpu_preunmap_block_order:uint
parm:           uvm_global_oversubscription:Enable (1) or disable (0) global oversubscription support. (int)
parm:           uvm_perf_pma_batch_nonpinned_order:uint
parm:           uvm_leak_checker:Enable uvm memory leak checking. 0 = disabled, 1 = count total bytes allocated and freed, 2 = per-allocation origin tracking. (int)
parm:           uvm_force_prefetch_fault_support:uint
parm:           uvm_debug_enable_push_desc:Enable push description tracking (uint)
parm:           uvm_debug_enable_push_acquire_info:Enable push acquire information tracking (uint)
parm:           uvm_page_table_location:Set the location for UVM-allocated page tables. Choices are: vid, sys. (charp)
parm:           uvm_perf_access_counter_mimc_migration_enable:Whether MIMC access counters will trigger migrations.Valid values: <= -1 (default policy), 0 (off), >= 1 (on) (int)
parm:           uvm_perf_access_counter_momc_migration_enable:Whether MOMC access counters will trigger migrations.Valid values: <= -1 (default policy), 0 (off), >= 1 (on) (int)
parm:           uvm_perf_access_counter_batch_count:uint
parm:           uvm_perf_access_counter_granularity:Size of the physical memory region tracked by each counter. Valid values asof Volta: 64k, 2m, 16m, 16g (charp)
parm:           uvm_perf_access_counter_threshold:Number of remote accesses on a region required to trigger a notification.Valid values: [1, 65535] (uint)
parm:           uvm_perf_reenable_prefetch_faults_lapse_msec:uint
parm:           uvm_perf_fault_batch_count:uint
parm:           uvm_perf_fault_replay_policy:uint
parm:           uvm_perf_fault_replay_update_put_ratio:uint
parm:           uvm_perf_fault_max_batches_per_service:uint
parm:           uvm_perf_fault_max_throttle_per_service:uint
parm:           uvm_perf_fault_coalesce:uint
parm:           uvm_fault_force_sysmem:Force (1) using sysmem storage for pages that faulted. Default: 0. (int)
parm:           uvm_perf_map_remote_on_eviction:int
parm:           uvm_exp_gpu_cache_peermem:Force caching for mappings to peer memory. This is an experimental parameter that may cause correctness issues if used. (uint)
parm:           uvm_exp_gpu_cache_sysmem:Force caching for mappings to system memory. This is an experimental parameter that may cause correctness issues if used. (uint)
parm:           uvm_channel_num_gpfifo_entries:uint
parm:           uvm_channel_gpfifo_loc:charp
parm:           uvm_channel_gpput_loc:charp
parm:           uvm_channel_pushbuffer_loc:charp
parm:           uvm_enable_va_space_mm:Set to 0 to disable UVM from using mmu_notifiers to create an association between a UVM VA space and a process. This will also disable pageable memory access via either ATS or HMM. (int)
parm:           uvm_enable_debug_procfs:Enable debug procfs entries in /proc/driver/nvidia-uvm (int)
parm:           uvm_peer_copy:Choose the addressing mode for peer copying, options: phys [default] or virt. Valid for Ampere+ GPUs. (charp)
parm:           uvm_ats_mode:Set to 0 to disable ATS (Address Translation Services). Any other value is ignored. Has no effect unless the platform supports ATS. (int)
parm:           uvm_debug_prints:Enable uvm debug prints. (int)
parm:           uvm_enable_builtin_tests:Enable the UVM built-in tests. (This is a security risk) (int)

and to check whether it’s loaded:

$ lsmod | grep uvm
nvidia_uvm           2564096  0
nvidia              36966400  2 nvidia_uvm,nvidia_modeset

What next?

Please check if the device files are created, post the output of
ls -l /dev/nvid*

ls -l /dev/nvid*
crw-rw-rw- 1 root root 195,   0 Dec 13 18:47 /dev/nvidia0
crw-rw-rw- 1 root root 195,   1 Dec 13 18:47 /dev/nvidia1
crw-rw-rw- 1 root root 195, 255 Dec 13 18:47 /dev/nvidiactl
crw-rw-rw- 1 root root 195, 254 Dec 13 18:47 /dev/nvidia-modeset
crw-rw-rw- 1 root root 510,   0 Dec 13 18:47 /dev/nvidia-uvm
crw-rw-rw- 1 root root 510,   1 Dec 13 18:47 /dev/nvidia-uvm-tools

Looka correct. Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

Unable to attach file. Download it using download URL

Your driver install is broken (or you forgot to reboot after update):

Failed to initialize NVML: Driver/library version mismatch

Please uninstall/reinstall cleanly.

How to uninstall it? Can you either please provide the command list and/or provide a tutorial.

Also, where can I find an end-to-end tutorial for installing Nvidia software + driver for RTX 3080 10GB GAMING X TRIO cards for a server having Intel(R) Core™ i9-10900K CPU @ 3.70GHz and 66 GB of RAM?

Please just reboot and afterwards create a new nvidia-bug-report.log and also try to run deviceQuery as root.

I have rebooted the system.

$ sudo ./deviceQuery
[sudo] password for arjun:
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 2 CUDA Capable device(s)

Device 0: "NVIDIA GeForce RTX 3080"
  CUDA Driver Version / Runtime Version          11.5 / 11.5
  CUDA Capability Major/Minor version number:    8.6
  Total amount of global memory:                 10018 MBytes (10504699904 bytes)
  (68) Multiprocessors, (128) CUDA Cores/MP:     8704 CUDA Cores
  GPU Max Clock rate:                            1815 MHz (1.81 GHz)
  Memory Clock rate:                             9501 Mhz
  Memory Bus Width:                              320-bit
  L2 Cache Size:                                 5242880 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

Device 1: "NVIDIA GeForce RTX 3080"
  CUDA Driver Version / Runtime Version          11.5 / 11.5
  CUDA Capability Major/Minor version number:    8.6
  Total amount of global memory:                 10018 MBytes (10504699904 bytes)
  (68) Multiprocessors, (128) CUDA Cores/MP:     8704 CUDA Cores
  GPU Max Clock rate:                            1815 MHz (1.81 GHz)
  Memory Clock rate:                             9501 Mhz
  Memory Bus Width:                              320-bit
  L2 Cache Size:                                 5242880 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1536
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 3 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
> Peer access from NVIDIA GeForce RTX 3080 (GPU0) -> NVIDIA GeForce RTX 3080 (GPU1) : No
> Peer access from NVIDIA GeForce RTX 3080 (GPU1) -> NVIDIA GeForce RTX 3080 (GPU0) : No

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.5, CUDA Runtime Version = 11.5, NumDevs = 2, Device0 = NVIDIA GeFo                          rce RTX 3080, Device1 = NVIDIA GeForce RTX 3080
Result = PASS

nvidia-bug-report.sh as root can be accesses using this.

1 Like

Does Tensorflow work now?

Yes, it’s working now. However it’s not very fast.

You might have installed a TF version built for an earlier cuda version so it’s using jit compiling to adoppt to the installed version.

How do I fix this?

The current software details are:

NVIDIA-SMI 495.46
Driver Version: 495.46
CUDA Version: 11.5

And for TensorFlow:

tensorflow: 2.4.1
tensorflow-base: 2.4.1
tensorflow-estimator: 2.6.0
tensorflow-gpu: 2.4.1

Thanks

TF 2.4 seems to be built with cuda 11.0, not supporting the cc 8.6 of your 3080 so jit compiling takes place. Seems it’s upgraded beginning with TF2.5:
https://github.com/tensorflow/tensorflow/issues/46093