[*buntu 16.04 / PRIME] nvidia-smi not work if iGPU as the primary display

Bug #1632019 reported by YAFU
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Related links:
https://devtalk.nvidia.com/default/topic/876441/linux/monitoring-nvidia-gpu-when-intel-igpu-as-primary-display/

https://devtalk.nvidia.com/default/topic/970144/linux/intel-for-display-nvidia-for-cuda-optimus-bug-/

So the problem is that you can not monitor the temperature with nvidia-smi and also can't set the fan speed if iGPU is as a primary display selected from Prime profiles in Nvidia-Settings.

In the second link it is mentioned a workaround that might give a clue about the cause of the problem. That is, I think 'nvidia-smi " should work by default without running this workaround as root.

To make it clear, nvidia-smi works as expected if you have selected nvidia gpu as the primary display.

Tested with nvidia-361 from official Ubuntu 16.04 repos. Installed libcuda1 and nvidia-prime packages.
====

As additional information regarding the Proprietary GPU Drivers PPA (since it is the only way Ubuntu users can update the drivers with .deb packages):
https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

If you install the drivers from the PPA (I tested 370.28 and 367.44) and iGPU as the primary display using PRIME, you can not even able to use CUDA in applications such as Blender/Cycles (CUDA is not available in Blender for GPU compute). This problem (not having CUDA available) does not occur with drivers from official repositories of Ubuntu, for example 361.42 is working well in Kubuntu 16.04. So I do not know if it is because PPA packages are built differently from the official repository. It would be good you to take a look at this.

Thanks.

System and Hardware specs:

i7 3770 - HD 4000
GTX 960
Kubuntu 16.04 64bits

$ lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)

$ uname -r
4.4.0-38-generic

nvidia 361 from official Ubuntu 16.04 repos. Installed libcuda1 and nvidia-prime packages.

Revision history for this message
YAFU (yafu) wrote :

I forgot to say that this is the message you get if you try to use nvidia-smi from the terminal with iGPU as primary display:

$ watch -n 1 nvidia-smi

Every 1,0s: nvidia-smi Mon Oct 10 13:24:51 2016

NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.
Please also try adding directory that contains libnvidia-ml.so to your system PATH.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Confirmed
Revision history for this message
José Tomás Atria (jtatria) wrote :

I can confirm this bug on ubuntu 17.04.

running nvidia-smi fails:

jta@rachael:~$ nvidia-smi
NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.
Please also try adding directory that contains libnvidia-ml.so to your system PATH.

adding LD_PRELOAD with the location of libnvidia-ml.so and running nvidia-smi works:

jta@rachael:~$ LD_PRELOAD=/usr/lib/nvidia-375/libnvidia-ml.so nvidia-smi
Mon May 22 16:37:10 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39 Driver Version: 375.39 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro K2000M Off | 0000:01:00.0 Off | N/A |
| N/A 41C P0 N/A / N/A | 0MiB / 1999MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.