Switch from NVIDIA gpu to IGPU

Hello all,

Due to heavy the nature of my work I need to run very heavy GPU ML computations on my desktop which makes my whole screen lag.

For this reason I have thought of maybe using the IGPU on my intel cpu for everyday needs while having the gpu only for the heavy cuda applications.

So my question is how can i switch from using the gpu to the igpu? I have tried installing video-linux but it didnt do anything (yes i have plugged the hdmi cable to the igpu), and i dont know how to proceed from here.

Thanks!

video-hybrid-intel-nvidia-prime is what you want. After that, I recommend installing optimus-manager because that way you’ll be able to switch back and forth between the nvidia and the intel GPUs with relative ease should you want that. Please also post the output of mhwd -li and inxi -Gazy.

Thanks for the suggestion, but I dont think I want optimus since i will never use the “graphics displaying” capabilities of my GPU, just it’s computational power.

From my understand prime lets you run some applications, say steam, through the GPU while others more “light” with the iGPU.

[delta@x ~]$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2020.11.30               false            PCI


Warning: No installed USB configs!
[delta@x ~]$ inxi -Gazy
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: Gigabyte driver: nvidia 
  v: 460.73.01 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 
  chip-ID: 10de:1b81 class-ID: 0300 
  Device-2: Microsoft LifeCam VX-2000 type: USB driver: snd-usb-audio,uvcvideo 
  bus-ID: 1-3:2 chip-ID: 045e:0761 class-ID: 0102 
  Display: x11 server: X.Org 1.20.11 driver: loaded: nvidia display-ID: :0.0 
  screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3") 
  s-diag: 583mm (23") 
  OpenGL: renderer: GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 460.73.01 
  direct render: Yes 

There doesn’t seem to be another video card. Are you sure there’s one? Or is it disabled?

The other video card only gets enabled when a display is plugged into it, which I cant do since by doing that it results into black screen. Missing drivers or something.

If I plug the hdmi cable to the iGPU then it will show up, but I can only have a tty.

Well, that is interesting… and strange. Can you determine why it results in a black screen? Anything in the journal?

What is its PCI address? If you have that, you should be able to replace the current Xorg video settings with the following:

Section "ServerLayout"
	Identifier "layout"
	Screen 0 "integrated"
EndSection

Section "Device"
	Identifier "integrated"
	Driver "modesetting"
	BusID "PCI:<PCI ADDRESS HERE>"
EndSection

Section "Screen"
	Identifier "integrated"
	Device "integrated"
EndSection

(e.g. /etc/X11/xorg.conf.d/10-integrated.conf).

My guess is the black screen is caused by driver mismatch since last time I tried this I had 2 drivers installed, on the nvidia and the intel one. I guess the nvidia display is disabled if the iGPU gets enabled?

Below are some outputs of when the iGPU is enabled.

--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:01.0/0000:01:00.0 (0300:10de:1b81)
  Display controller nVidia Corporation GP104 [GeForce GTX 1070]
--------------------------------------------------------------------------------
  > INSTALLED:

   NAME:	video-nvidia
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Closed source NVIDIA drivers for linux.
   PRIORITY:	4
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 
   VENDORIDS:	10de 



  > AVAILABLE:

   NAME:	video-hybrid-intel-nvidia-prime
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	6
   FREEDRIVER:	false
   DEPENDS:	video-modesetting 
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-hybrid-intel-nvidia-390xx-bumblebee
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	5
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-nvidia
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Closed source NVIDIA drivers for linux.
   PRIORITY:	4
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 
   VENDORIDS:	10de 

   NAME:	video-nvidia-390xx
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Closed source NVIDIA drivers for linux.
   PRIORITY:	3
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 
   VENDORIDS:	10de 

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de 

   NAME:	video-modesetting
   ATTACHED:	PCI
   VERSION:	2020.01.13
   INFO:	X.org modesetting video driver.
   PRIORITY:	1
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 

   NAME:	video-vesa
   ATTACHED:	PCI
   VERSION:	2017.03.12
   INFO:	X.org vesa video driver.
   PRIORITY:	0
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 


--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:02.0 (0300:8086:5912)
  Display controller Intel Corporation HD Graphics 630
--------------------------------------------------------------------------------
  > AVAILABLE:

   NAME:	video-hybrid-intel-nvidia-prime
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	6
   FREEDRIVER:	false
   DEPENDS:	video-modesetting 
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-hybrid-intel-nvidia-390xx-bumblebee
   ATTACHED:	PCI
   VERSION:	2020.11.30
   INFO:	Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	5
   FREEDRIVER:	false
   DEPENDS:	-
   CONFLICTS:	video*nvidia* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de 

   NAME:	video-modesetting
   ATTACHED:	PCI
   VERSION:	2020.01.13
   INFO:	X.org modesetting video driver.
   PRIORITY:	1
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 

   NAME:	video-vesa
   ATTACHED:	PCI
   VERSION:	2017.03.12
   INFO:	X.org vesa video driver.
   PRIORITY:	0
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 
   VENDORIDS:	* 


Warning: no configs for USB devices found!
Graphics:
  Device-1: Intel HD Graphics 630 vendor: ASUSTeK driver: i915 v: kernel 
  bus-ID: 00:02.0 chip-ID: 8086:5912 class-ID: 0300 
  Device-2: NVIDIA GP104 [GeForce GTX 1070] vendor: Gigabyte driver: nvidia 
  v: 460.73.01 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 
  chip-ID: 10de:1b81 class-ID: 0300 
  Device-3: Microsoft LifeCam VX-2000 type: USB driver: snd-usb-audio,uvcvideo 
  bus-ID: 1-3:2 chip-ID: 045e:0761 class-ID: 0102 
  Display: server: X.org 1.20.11 driver: loaded: nvidia tty: 240x67 
  Message: Advanced graphics data unavailable in console. Try -G --display