Driver cannot detect third GTX980 (using 346.16 on Ubuntu) - "error -5" in logs

Driver cannot detect third GTX980 (using 346.16 on Ubuntu) - “error -5” in logs

We have 3 GTX 980s installed in a workstation. However, when I run nvidia-smi, I only see 2 of the cards. Running lspci indicates that all 3 cards are detected by the OS, just not seen by the driver. I’ve tried swapping all of the cards to different slots and it makes no difference. I’ve tried pulling out one card at a time and have confirmed that all 3 cards can work, just not at the same time. We don’t care about getting X11 set up – we’re just running CUDA code on these.

In the OS log, after I run nvidia-smi I can see an error:
NVRM: RmInitAdapter failed! (0x24:0x65:1205)
NVRM: rm_init_adapter failed for device bearing minor number 0
NVRM: nvidia_frontend_open: minor 0, module->open() failed, error -5

It looks like two of the cards are sharing an IRQ (183) - is that a cause of problems? We can’t just move one to a different slot, as all sots are filled.

OS: Ubuntu 14.04

Uname -a:
Linux pogo-SYS-7048GR-TR 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Driver: 346.16 (installed by apt-get install nvidia-346)

The motherboard is a Supermicro SYS-7048GR-TR.
BIOS: AMI 1.0a

Output of “cat /proc/driver/nvidia/gpus/*/information”:

Model:           GeForce GTX 980
IRQ:             183
GPU UUID:        GPU-????????-????-????-????-????????????
Video BIOS:      ??.??.??.??.??
Bus Type:        PCIe
DMA Size:        40 bits
DMA Mask:        0xffffffffff
Bus Location:    0000:02:00.0
Model:           GeForce GTX 980
IRQ:             183
GPU UUID:        GPU-????????-????-????-????-????????????
Video BIOS:      ??.??.??.??.??
Bus Type:        PCIe
DMA Size:        40 bits
DMA Mask:        0xffffffffff
Bus Location:    0000:03:00.0
Model:           GeForce GTX 980
IRQ:             184
GPU UUID:        GPU-????????-????-????-????-????????????
Video BIOS:      ??.??.??.??.??
Bus Type:        PCIe
DMA Size:        40 bits
DMA Mask:        0xffffffffff
Bus Location:    0000:82:00.0

Output of “lspci | grep -i nvid”:
02:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 980] (rev a1)
02:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
03:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 980] (rev a1)
03:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
82:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 980] (rev a1)
82:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)

Output of nvidia-smi:

+------------------------------------------------------+                      
| NVIDIA-SMI 346.16     Driver Version: 346.16         |                      
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 980     Off  | 0000:03:00.0     N/A |                  N/A |
| 26%   41C    P0    N/A /  N/A |     15MiB /  4095MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 980     Off  | 0000:82:00.0     N/A |                  N/A |
|  0%   39C    P0    N/A /  N/A |     15MiB /  4095MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                              
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0            C+G   Not Supported                                         |
|    1            C+G   Not Supported                                         |
+-----------------------------------------------------------------------------+

Did you find any solution to this issue? We are encountering exactly the same problems, having 4 GTX 980 on a Supermicro X9DRG-QF board, Bios Rev. 3.0a.

One CPU drives 2 GPUs, however only one card per CPU works. #1 and #3 are ok, for #2 and #4 we get exactly the same RmInitAdapter error. As far as I can tell, the IRQ is not the issue - it is reassigned to card #2 if #1 failed, so it seems it is not assigned at all.

Seems to be a driver/kernel issue?

Ok, so after playing around a bit, by chance I found a way to get all 4 GTX980 to work:

sudo nvidia-smi -L
GPU 0: GeForce GTX 980 (UUID: GPU-686ddb2b-bcac-a199-3918-cf5be21844cf)
GPU 1: GeForce GTX 980 (UUID: GPU-608bd7f7-83eb-95b3-f5f4-fd020d7897b9)
GPU 2: GeForce GTX 980 (UUID: GPU-546d367c-3d98-692e-ccc4-b99470c09834)
GPU 3: GeForce GTX 980 (UUID: GPU-b8bb1f03-34d8-f53b-5e72-d1fec15a4d5f)

Actually the key seems to be the initialization of both kernel modules:

lsmod | grep nvidia
nvidia_uvm             45407  0 
nvidia              11057029  1 nvidia_uvm
drm                   303102  1 nvidia

Note that the nvidia_uvm is not loaded at startup per default. After doing a ‘modprobe nvidia_uvm’ followed by a ‘deviceQuery’ from the cuda examples, all the cards appeared. I did some number crunching and checked with the nvidia-settings in X if all the GPUs are accessible. They are…

./deviceQuery
./deviceQuery Starting...

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

Detected 4 CUDA Capable device(s)

Device 0: "GeForce GTX 980"
  CUDA Driver Version / Runtime Version          6.5 / 6.5
  CUDA Capability Major/Minor version number:    5.2
  Total amount of global memory:                 4095 MBytes (4294246400 bytes)
  (16) Multiprocessors, (128) CUDA Cores/MP:     2048 CUDA Cores
  GPU Clock rate:                                1216 MHz (1.22 GHz)
  Memory Clock rate:                             3505 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 2097152 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 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:  2048
  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 PCI Bus ID / PCI location ID:           2 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

Device 1: "GeForce GTX 980"
  CUDA Driver Version / Runtime Version          6.5 / 6.5
  CUDA Capability Major/Minor version number:    5.2
  Total amount of global memory:                 4096 MBytes (4294770688 bytes)
  (16) Multiprocessors, (128) CUDA Cores/MP:     2048 CUDA Cores
  GPU Clock rate:                                1216 MHz (1.22 GHz)
  Memory Clock rate:                             3505 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 2097152 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 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:  2048
  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 PCI Bus ID / PCI location ID:           3 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

Device 2: "GeForce GTX 980"
  CUDA Driver Version / Runtime Version          6.5 / 6.5
  CUDA Capability Major/Minor version number:    5.2
  Total amount of global memory:                 4096 MBytes (4294770688 bytes)
  (16) Multiprocessors, (128) CUDA Cores/MP:     2048 CUDA Cores
  GPU Clock rate:                                1216 MHz (1.22 GHz)
  Memory Clock rate:                             3505 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 2097152 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 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:  2048
  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 PCI Bus ID / PCI location ID:           131 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

Device 3: "GeForce GTX 980"
  CUDA Driver Version / Runtime Version          6.5 / 6.5
  CUDA Capability Major/Minor version number:    5.2
  Total amount of global memory:                 4096 MBytes (4294770688 bytes)
  (16) Multiprocessors, (128) CUDA Cores/MP:     2048 CUDA Cores
  GPU Clock rate:                                1216 MHz (1.22 GHz)
  Memory Clock rate:                             3505 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 2097152 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 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:  2048
  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 PCI Bus ID / PCI location ID:           132 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
> Peer access from GeForce GTX 980 (GPU0) -> GeForce GTX 980 (GPU1) : Yes
> Peer access from GeForce GTX 980 (GPU0) -> GeForce GTX 980 (GPU2) : No
> Peer access from GeForce GTX 980 (GPU0) -> GeForce GTX 980 (GPU3) : No
> Peer access from GeForce GTX 980 (GPU1) -> GeForce GTX 980 (GPU1) : No
> Peer access from GeForce GTX 980 (GPU1) -> GeForce GTX 980 (GPU2) : No
> Peer access from GeForce GTX 980 (GPU1) -> GeForce GTX 980 (GPU3) : No
> Peer access from GeForce GTX 980 (GPU2) -> GeForce GTX 980 (GPU1) : No
> Peer access from GeForce GTX 980 (GPU2) -> GeForce GTX 980 (GPU2) : No
> Peer access from GeForce GTX 980 (GPU2) -> GeForce GTX 980 (GPU3) : Yes
> Peer access from GeForce GTX 980 (GPU1) -> GeForce GTX 980 (GPU0) : Yes
> Peer access from GeForce GTX 980 (GPU1) -> GeForce GTX 980 (GPU1) : No
> Peer access from GeForce GTX 980 (GPU1) -> GeForce GTX 980 (GPU2) : No
> Peer access from GeForce GTX 980 (GPU2) -> GeForce GTX 980 (GPU0) : No
> Peer access from GeForce GTX 980 (GPU2) -> GeForce GTX 980 (GPU1) : No
> Peer access from GeForce GTX 980 (GPU2) -> GeForce GTX 980 (GPU2) : No
> Peer access from GeForce GTX 980 (GPU3) -> GeForce GTX 980 (GPU0) : No
> Peer access from GeForce GTX 980 (GPU3) -> GeForce GTX 980 (GPU1) : No
> Peer access from GeForce GTX 980 (GPU3) -> GeForce GTX 980 (GPU2) : Yes

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.5, NumDevs = 4, Device0 = GeForce GTX 980, Device1 = GeForce GTX 980, Device2 = GeForce GTX 980, Device3 = GeForce GTX 980
Result = PASS

That really sucks… same problem again after restarting the machine… I hope they will fix the driver soon…

same issue

Very strange. This sounds exactly like the “enthusiast key” that Nvidia was introducing at the 1080 launch. No more 3/4 way card setups without that key. But I thought it was just for that new card. It’s just weird that it would see 2 cards, and not 3. If it can’t see 3, then it shouldn’t see 2 either. I’m seeing alot of tech support requests on reddit saying their 3 way nvidia setups are no longer working. Glad I have just one monitor/card(sort of).

https://youtu.be/2wBDt9tN5-c

The real reason of my problem is “the GPU cool power cable is loose”.