Hi, I’ve installed three GPUs on a machine running Ubuntu 16.04; and I’ve installed NVIDIA proprietary driver 375.39.
So now I have GPU 0 (TitanX); GPU 1 (GTX1050); GPU 2 (TitanX). By default, it select GPU 0 for display. How can I set GPU 1 for display instead? I want to use GPU 0 and GPU 2 for CUDA computing.
Then create /etc/X11/xorg.conf.d/nvidia.conf with this content:
Section "Device"
Identifier "Videocard0"
BusID "PCI:1:0:0" # This must be what your lspci command gave you
Driver "nvidia"
VendorName "NVIDIA"
EndSection
Then connect your monitor to this GPU and reboot your PC or press Ctrl + Alt + Backspace (not enabled on all distros).
Thank you, both sunbearc22 and birdie for providing help! birdie’s method works for me, except that for Linux 16.04, I should create the file in another directory: /usr/share/X11/xorg.conf.d/nvidia.conf
You can use either. /usr/share/X11/xorg.conf.d is for system software to install pieces of configuration data, and /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/ are for the system administrator’s configuration files.
If you put your configuration files in /usr/share/X11/xorg.conf.d, you run the risk of them being overwritten by the package manager. Although the risk of that is probably small. :)
There’s a list of places the server looks for configuration files in the xorg.conf(5) man page.
Thank you Moderator! I see what you mean. However, Ubuntu 16.04 don’t have xorg.conf nor xorg.conf.d/ under the directory /etc/X11. Shall I mkdir /etc/X11/xorg.conf.d, and create the file /etc/X11/xorg.conf.d/nvidia.conf ?
I have the same issue as the original poster, but the solution given here does not work for me. I am running Linux Mint 18.3 which is based on Ubuntu 16.04. My Nvidia driver version is 384.130. I have two GTX1080’s (GPU0,GPU1) and one GT620 (GPU2) installed in an Asus X299 motherboard. I want to use the GT620 for display and the GTX1080’s for CUDA computing. I tried adding the BusID line for the GT620 (in decimal and hex) to both /etc/X11/xorg.conf and /usr/share/X11/xorg.conf.d/nvidia.conf. BIOS ignores the change and Linux Mint will not start at all. Nothing ever comes out of GPU2. Has something changed in the past year and a half that would require a different solution? nvidia-bug-report.log.gz (213 KB)
Thank you for the quick response. I tried your xorg.conf and got the same behavior - hang during startup, GPU2 silent, everything coming out GPU0. Is there anything else I can try?
Is there a way that I can use my 2nd GPU for display while having coolbits enabled on my 1st GPU for fan control? In order to enable manual fan control I need to explicitly enable coolbits on X11/xorg.conf for my 1st GPU but doing that will make Linux use it for display instead of my 2nd GPU.
I have two graphics cards gtx 1070 and gt 710 I have tried the solution suggested by user @birdie to no avail. I am running linux min 20. I can book into mint using the gt710, but it goes into “fallback mode”. Does the solution posted here still work? For more details please see my post:
Thank you for the prompt reply. In my Stack post I am detailing two separate attempts. From what I understand the Bus ID of my GT 710 is 5:0:0. Could you please explain what I have done incorrectly?
That’s really not obvious in your post. For sure you cannot use the same PCI ID in two different device definitions.
Please post your complete xorg.conf here.
Also look for other .conf files in /etc/X11/xorg.conf.d, /etc/xorg.conf.d, /usr/etc/xorg.conf.d, /usr/lib/X11/xorg.conf.d, /etc/X11/xorg.conf.d-4 that might contain Screen, or nvidia configuration, which might interfere (some of those directories might not exist).
There are no other conf files in /etc/X11/ I had to make xorg.conf.d. I have checked in /usr/lib/X11/ as well and was not able to find any other xorg.conf files.
I found the solution. I had to switch MultiGPU to “on” in the “Screen” section of etc/X11/xorg.conf.
I had tried omitting this option before and it didnt work.
Just in case any one else has the same issue I will post my xorg.conf here: