5

I have a system with on-board (on-CPU) graphics:

(--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4000

and an nVIDIA GTX 650 Ti. The on-board graphics is what feeds my display, and the GPU is used for other things (CUDA). Now, I want to make my Xorg completely ignore my card, not probe it or anything - not trying to use nVIDIA's drivers nor the nouveau drivers. (So it would not complain about driver issues, nor load the kernel modules etc.)

Is that possible?

Notes:

  • The modules must still exist, and at least the nVIDIA module must be loadable (I just want X not to try doing that).
  • I've already tried blacklisting nouveau in /etc/modprobe.d/, that did not help.
  • But you still want the noveau driver to perform CUDA, correct? Or you have another driver that allows for CUDA operations? (never used CUDA, sorry) – grochmal Jul 29 '16 at 22:29
  • 2
    @grochmal: The nouveau drivers don't support CUDA at all... I do want to use the nVIDIA kernel drivers for CUDA, but that's external to the question. I mean, assume I don't use the GPU at all for the moment; I want X to come up and not see any nouveau or nvidia module loaded. – einpoklum Jul 29 '16 at 22:40
  • The question was already answered if this comment above is valid. Blacklisting both nouveau and nvidia modules does solve the problem if the nvidia GPU is not used. – ILMostro_7 Sep 26 '17 at 1:47
  • @ILMostro_7: No, the question wasn't already answered. And - the question is n ot about blacklisting. – einpoklum Sep 26 '17 at 7:59
  • @einpoklum the assumption is already that it's not answered. I'm just pointing out that the comment may have to be deleted then, because another comment below says "Blacklisting nouveau does not help... and blacklisting nvidia prevents me from using CUDA. :-( ". – ILMostro_7 Sep 26 '17 at 18:44
-1

You can blacklist kernel modules. Blacklisted modules will not be loaded by the kernel. Xorg then shall not try to autodetect the hardware.

For example you can add a file called nonvidiavideo.conf in /etc/modprobe.d/ with the following content (the name of the file does not matter, it just needs to end with .conf):

blacklist nouveau

You may need to extend the file if you have modules that consider the nouveau driver as their pre-requisite, for example:

blacklist nouveau
blacklist nvidia-dkms

(I made up the name of the other module for the purpose of the example.) Basically, blacklisting a module does not work if another module has a dependency on it, you need to blacklist the entire dependency chain. Probably there is no dependency chain with nvidia/nouveau since they're quite specific modules. But, to find modules that have nouveau as a dependency you can do:

depmod -n | grep nouveau | egrep -v '^alias'

(That will print the module itself too, dependencies are show when 2 modules appear on the same line.)


Another option that I would try would be to force Xorg to use the intel card for the screen. Add the following to a file (say nonvidia.conf, again the name does not matter) to /etc/X11/xord.conf.d/:

Section "Device"
    Identifier  "Intel Card"
    Driver      "intel"
EndSection

Section "Device"
    Identifier  "Nvidia Card"
    Driver      "nouveau"
EndSection

Section "Screen"
    Identifier  "My Screen"
    Device      "Intel Card"
EndSection

You can also add a BusID "PCI:..." parameter to a "Device" section if you know where your card resides (but it should not be needed, Xorg should be able to figure things out from the drivers).

The important part is that the Device parameter of the "Screen" points to the Identifier of the "Device".

This will probably do not work if you have two screens.

(Disclaimer: this is untested code, I do not have a machine with two video cards to test it, sorry.)

  • Blacklisting nouveau does not help... and blacklisting nvidia prevents me from using CUDA. :-( – einpoklum Jul 30 '16 at 9:16
  • @einpoklum - Hm... let's try then configuring Xorg. I've made a huge edit to my answer, try following that. In theory you need only to restart Xorg to make it work, but I'll suggest a full reboot since Xorg is quirky. – grochmal Jul 30 '16 at 15:19
  • Great, I'll try it out and let you know. – einpoklum Jul 30 '16 at 16:02
  • Will this work even if there's no xorg.conf.d on my system (Kubuntu 16.04 right now)? And no xorg.conf in /etc/X11? – einpoklum Jul 30 '16 at 16:44
  • @einpoklum - it should, those are the default files for Xorg. If you do not have the directory I would try putting that into /etc/X11/xord.conf (the file), since that is an older configuration. – grochmal Jul 30 '16 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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