Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a desktop machine (running Ubuntu 13.10) with two video outputs (both nVidia):

  1. an integrated graphics card, which I want to use for my desktop display, and
  2. a PCI graphics card, which I would like to use for CUDA based tasks.

Is there a way to select which one to use for the X server and which for CUDA, and make it permanent?

share|improve this question
Which Linux distribution? What model of GPUs? – Gilles Feb 23 '14 at 23:53
Ubuntu 13.10 and they are both Nvidia – TheDoctor Feb 23 '14 at 23:54

I believe you can follow the directions outlined here in this post titled: Multiple Nvidia Video Cards & Monitors on Linux Mint 15 MATE. Even though the details are targeting Linux Mint they should still be applicable, since the bulk of the tweaking is being done through the NVIDIA drivers.

I would assume that you can do so either through the NVIDIA dialogs or through your xorg.conf file.


   ss #1

xorg.conf files

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 610"
    BusID          "PCI:1:0:0"
    Screen          1

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 6200"
    BusID          "PCI:5:4:0"

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 610"
    BusID          "PCI:1:0:0"
    Screen          0

Then just only assign the displays to the internal "device":

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24

This is just to give you the general approach, see the article for further details.

share|improve this answer
Hey, that's my article! I'm famous, woo! :D Amazing what you find when you look through the referrer logs for the day, eh? – Logos Jun 10 '15 at 2:26
@Logos - very nicely constructed article! Thanks for posting it. – slm Jun 10 '15 at 2:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.