Four Monitor Setup Stopped Working

I fight with this setup now and again. I have 3 monitors plugged into my nvidia GPU and one into my intel motherboard. The monitor plugged into the motherboard has stopped displaying and cannot be selected in any nvidia or system settings. It used to show up in nvidia-settings GUI and say “PRIME”.

I’ve spent the last day trying various post I come across but I can never quite tell which posts are out of date and which make sense. My latest attempt was to try this optimus-manager thing but that really screwed up my system so I removed it.

I had it working with the video-hybrid-intel-nvidia-prime and video-modesetting installed. As far as I know I haven’t installed anything recently or changed any settings. The only thing I can conclude is that using nomachine to remote into the machine somehow screwed things up.

~ >>> inxi -SCGxx --no-host                                                                                                                                                                                       


System:    Kernel: 5.11.22-2-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: GNOME 3.38.4 tk: GTK 3.24.29 
           wm: gnome-shell dm: GDM Distro: Manjaro Linux base: Arch Linux 
CPU:       Info: Quad Core model: Intel Core i7-4790K bits: 64 type: MT MCP arch: Haswell rev: 3 cache: L2: 8 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 64030 
           Speed: 4400 MHz min/max: 800/4400 MHz Core speeds (MHz): 1: 4400 2: 4402 3: 4400 4: 4403 5: 4396 6: 4407 7: 4401 
           8: 4405 
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics vendor: Micro-Star MSI driver: i915 
           v: kernel bus-ID: 00:02.0 chip-ID: 8086:0412 
           Device-2: NVIDIA GM204 [GeForce GTX 970] vendor: Micro-Star MSI driver: nvidia v: 465.31 bus-ID: 01:00.0 
           chip-ID: 10de:13c2 
           Display: x11 server: X.Org 1.20.11 compositor: gnome-shell driver: loaded: modesetting,nvidia resolution: 
           1: 1920x1080~60Hz 2: 1920x1080~60Hz 3: 1920x1080~60Hz s-dpi: 96 
           OpenGL: renderer: NVIDIA GeForce GTX 970/PCIe/SSE2 v: 4.6.0 NVIDIA 465.31 direct render: Yes 
~ >>> xrandr                                                                                                                                                                                                      
Screen 0: minimum 8 x 8, current 5760 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+  50.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+ 144.00   119.98    99.93    84.90    59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93  
DP-1 disconnected (normal left inverted right x axis y axis)
DVI-D-0 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+ 144.00   119.98    99.93    84.90  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    59.94  
VGA-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
~ >>> mhwd -li -d                                                                                                                                                                                                 
   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-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 

Randomly started working again after a restart.