0

To a large extent, this question has been asked but the machinations in the answers are sort of dated or honestly not definitive. Therefore at the risk of an "already asked" penalty my goal:

I'm trying to isolate the integrated Intel video to serve all functions as a primary, and isolate a Nvidia GPU for Cuda work which has no monitor attached.

Here is the primary reference/previous ask:

How to configure igpu for xserver and nvidia gpu for cuda?

Unfortunately, after a few days trying to wrestle my xorg.conf into shape, it hasn't worked. I am also loathed to try bumblebee because throwing more complexity on the problem until I understand it better seems foolish.

My current xorg.conf largely copied from the previous thread:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:5@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

And you can see the processes on the GPU:

root@zeus:~# nvidia-smi
Mon Nov 27 16:48:35 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90                 Driver Version: 384.90                    |
|-------------------------------+----------------------+----------------------+
| 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 106...  Off  | 00000000:05:00.0 Off |                  N/A |
|  0%   42C    P8     6W / 120W |    257MiB /  3013MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1798      G   /usr/lib/xorg/Xorg                            59MiB |
|    0      4052      G   /usr/bin/gnome-shell                         192MiB |
|    0      9880      G   /usr/bin/python                                2MiB |
+-----------------------------------------------------------------------------+

What is really frustrating about this is that there is a color anomoly in lua / conky because of this. Colors have in effect changes (e.g. green is now red).

This installation was done with --dkms --no-opengl-files

1 Answer 1

0

So I was close it seems. Final workaround is derived from here: https://devtalk.nvidia.com/default/topic/970144/linux/intel-for-display-nvidia-for-cuda-optimus-bug-/1

  1. Using Prime switch to Intel sudo prime-select intel
  2. Remove the link sudo rm /usr/bin/nvidia-smi
  3. Create a bash wrapper for your installed version (384 in my case). Note you'll have to update this when you do the driver.

nano /usr/bin/nvidia-smi

#!/bin/bash
export LD_LIBRARY_PATH=/usr/lib/nvidia-384; /etc/alternatives/x86_64-linux-gnu_nvidia_smi "$@"
  1. sudo chmod +x /usr/bin/nvidia-smi

Reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .