Dual gpu issue, where iGPU screen is black

❯ inxi -G
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GM206 [GeForce GTX 960] driver: nvidia v: 455.38 
           Display: x11 server: X.Org 1.20.9 driver: nvidia resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 960/PCIe/SSE2 v: 4.6.0 NVIDIA 455.38

❯ inxi -Fxz
System:    Kernel: 5.8.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: KDE Plasma 5.20.2 Distro: Manjaro Linux 
Machine:   Type: Desktop System: MSI product: MS-7922 v: 2.0 serial: <filter> 
           Mobo: MSI model: Z97S SLI Krait Edition (MS-7922) v: 2.0 serial: <filter> UEFI: American Megatrends v: 10.7 
           date: 02/16/2016 
Battery:   Device-1: hid-b8:f6:b1:2e:9a:d7-battery model: Nate Doyle’s Trackpad charge: N/A status: Discharging 
CPU:       Info: Quad Core model: Intel Core i5-4690K bits: 64 type: MCP arch: Haswell rev: 3 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 28010 
           Speed: 800 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 934 2: 1288 3: 1000 4: 1142 
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 
           Device-2: NVIDIA GM206 [GeForce GTX 960] vendor: ASUSTeK driver: nvidia v: 455.38 bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.9 driver: nvidia resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 960/PCIe/SSE2 v: 4.6.0 NVIDIA 455.38 direct render: Yes 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Micro-Star MSI driver: snd_hda_intel 
           v: kernel bus ID: 00:03.0 
           Device-2: Intel 9 Series Family HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Device-3: NVIDIA GM206 High Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Device-4: Logitech QuickCam Communicate STX type: USB driver: gspca_zc3xx,snd-usb-audio bus ID: 2-3:3 
           Sound Server: ALSA v: k5.8.18-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8169 v: kernel 
           port: d000 bus ID: 05:00.0 
           IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Realtek RTL88x2bu [AC1200 Techkey] type: USB driver: rtl88x2bu bus ID: 2-5:5 
           IF: wlp0s20u5 state: up mac: <filter> 
           IF-ID-1: br-423b1b769d7b state: down mac: <filter> 
           IF-ID-2: br-71e10443bc56 state: down mac: <filter> 
           IF-ID-3: br-7273d7b7eac3 state: down mac: <filter> 
           IF-ID-4: br-841c380a2a0c state: down mac: <filter> 
           IF-ID-5: br-a288ba8f1eea state: down mac: <filter> 
           IF-ID-6: br-c94f5c7b4ae9 state: down mac: <filter> 
           IF-ID-7: br-f810b38beeab state: down mac: <filter> 
           IF-ID-8: docker0 state: down mac: <filter> 
           IF-ID-9: virbr0 state: down mac: <filter> 
           IF-ID-10: virbr0-nic state: down mac: <filter> 
Drives:    Local Storage: total: 1.93 TiB used: 1.26 TiB (65.4%) 
           ID-1: /dev/sda vendor: Western Digital model: WD5000BEKT-00KA9T0 size: 465.76 GiB 
           ID-2: /dev/sdb vendor: Samsung model: SSD 850 EVO 250GB size: 232.89 GiB 
           ID-3: /dev/sdc vendor: Kingston model: SA400S37240G size: 223.57 GiB 
           ID-4: /dev/sdd type: USB vendor: Western Digital model: WD My Passport 0820 size: 931.48 GiB 
           ID-5: /dev/sde type: USB vendor: Samsung model: Flash Drive size: 119.51 GiB 
Partition: ID-1: / size: 58.81 GiB used: 53.38 GiB (90.8%) fs: ext4 dev: /dev/sdb3 
           ID-2: /home size: 158.60 GiB used: 135.31 GiB (85.3%) fs: ext4 dev: /dev/sdb4 
Swap:      ID-1: swap-1 type: partition size: 8.79 GiB used: 0 KiB (0.0%) dev: /dev/sdb2 
Sensors:   System Temperatures: cpu: 31.5 C mobo: 29.0 C gpu: nvidia temp: 39 C 
           Fan Speeds (RPM): cpu: 826 fan-1: 0 fan-3: 813 fan-4: 694 fan-5: 738 gpu: nvidia fan: 0% 
Info:      Processes: 233 Uptime: 40m Memory: 15.52 GiB used: 7.86 GiB (50.7%) Init: systemd Compilers: gcc: 10.2.0 
           clang: 10.0.1 Packages: 1875 Shell: Zsh v: 5.8 inxi: 3.1.08

❯ lsmod | grep i915
i915                 2641920  1
i2c_algo_bit           16384  1 i915
intel_gtt              24576  1 i915
drm_kms_helper        262144  2 nvidia_drm,i915
cec                    73728  2 drm_kms_helper,i915
drm                   589824  14 drm_kms_helper,nvidia_drm,i915

❯ mhwd
> 0000:01:00.0 (0300:10de:1401) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
    video-nvidia-455xx            2020.10.04               false            PCI
    video-nvidia-450xx            2020.10.04               false            PCI
    video-nvidia-440xx            2020.10.04               false            PCI
    video-nvidia-435xx            2020.10.04               false            PCI
    video-nvidia-430xx            2020.10.04               false            PCI
    video-nvidia-418xx            2020.10.04               false            PCI
    video-nvidia-390xx            2020.10.04               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:05:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:00:02.0 (0380:8086:0412) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI

❯ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 960/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 455.38
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 455.38
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 455.38
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

❯ xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080     60.00*+  59.94    50.00    60.00    50.04  
   1680x1050     59.95  
   1440x900      59.89  
   1440x576      50.00  
   1440x480      59.94  
   1280x1024     75.02    60.02  
   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    72.81    59.93    59.94  
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

My mother board: Overview Z97S SLI Krait Edition | MSI USA
My GPU: STRIX-GTX960-DC2OC-2GD5 | Graphics Cards | ASUS USA

I’m having some trouble getting a second monitor working on my iGPU over HDMI (using HDMI 2, not HDMI/DVI on a TV.) The screen seems to register but, it’s just black (with a touch of back light, if you will.)

In the MSI Bios settings I have Itegrated Graphis set to PEG (vs IGD), 64mb memory (I tried 128 and 512mb too) and dual monitor support enabled for both dGPU and iGPU (I forget this setting’s name.)

ETA: I set it to IGD in the bios and it does the same thing (the third setting for dual monitor support disappears), I get output from dGPU and black screen on iGPU.

I don’t currently have Hybrid Prime drivers showing up in the settings, although I recently tried upgrading to Kernal 5.9 and they showed up. Of course, I was running into some issues getting nvidia drivers working under 5.9 so, I removed it and reverted back to 5.8 (I saw a recent thread talking about the issue with nivdia and 5.9; The end of Nvidia proprietary Drivers on Linux !?!)

I’ve tried several things, including adding some i915 settings in /etc/default/grub, as well as creating a /etc/X11/xorg.conf.d/20-intel.conf file with variations of the following (changing Driver to video-linux etc.)

Section "Device"
 Identifier "Intel Graphics"
 Driver "intel"
 BusID "PCI:0:2:0"
 Option "AccelMethod" "uxa"
EndSection

I’m not sure how to address this and everything I’ve tried from forums here and arch don’t seem to be working. Also, I’m not sure why hybrid-prime drivers aren’t showing up on my system, unless on 5.9 but, either way, that seems like a setup for laptops, no?

Anyway, I’d appriciate any help on this.

Note: the TV works, aside from it always messing up my compositor when I enable it in the Display Settings, if I connect it to the DPI port (with HDMI adapter) on my dGPU (GTX 960.) It’s just not working with the integrated graphics.

Interesting. Looks like installing video-modesetting opens things up and I’m now able to see all the hybrid prime drivers:

❯ mhwd
> 0000:01:00.0 (0300:10de:1401) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-455xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-450xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-440xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-435xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-430xx-bumblebee            2020.10.04               false            PCI
video-hybrid-intel-nvidia-418xx-bumblebee            2020.10.04               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2020.10.04               false            PCI
    video-nvidia-455xx            2020.10.04               false            PCI
    video-nvidia-450xx            2020.10.04               false            PCI
    video-nvidia-440xx            2020.10.04               false            PCI
    video-nvidia-435xx            2020.10.04               false            PCI
    video-nvidia-430xx            2020.10.04               false            PCI
    video-nvidia-418xx            2020.10.04               false            PCI
    video-nvidia-390xx            2020.10.04               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:05:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:00:02.0 (0300:8086:0412) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-455xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-450xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-440xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-435xx-prime            2020.10.04               false            PCI
video-hybrid-intel-nvidia-430xx-bumblebee            2020.10.04               false            PCI
video-hybrid-intel-nvidia-418xx-bumblebee            2020.10.04               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2020.10.04               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

I’ll try to set that up and see what I’m able to do with hybrid prime…

I think you can do it without those.

You’ll need an Xorg configuration like the following (do not use it in conjunction with other display related Xorg configuration files):

Section "ServerLayout"
        Identifier "layout"
        Screen 0 "nvidia"
        Inactive "intel"
EndSection

Section "Device"
        Identifier "nvidia"
        Driver "nvidia"
        BusID "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "nvidia"
        Device "nvidia"
        Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
        Identifier "intel"
        Driver "modesetting"
        BusID "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "intel"
        Device "intel"
EndSection

You most probably need to run xrandr --setprovideroutputsource modesetting NVIDIA-0 after starting Xorg with the above configuration.

Thanks for the reply!

Funny, I just got it working with hybrid prime drivers and optimus-manager and optimus-manager-qt (nvidia and intel work, hybrid mode, whatever that does, was lagging really bad.) :smiley:

But this looks like what I’m after. I’ll revert the hybrid prime setup and give your suggestion a go and then report back shortly.

Thanks again…

What I described is basically what optimus-manager does in “nvidia” mode, so you might want to stick with that for convenience if you want.

Issues regarding using the nvidia gpu as an output sink are known.

Okay, thanks. I kept optimus, for now.

One more question, if I may:

Is there anyway to run both GPUs simultaneously (hybrid didn’t seem to work; not sure that’s what it’s suppose to do, however) or should I just run both displays off my video card, using the HDMI and the DPI to HDMI adapter like I was before?

And if that’s the best way do it, do you have any thoughts on why the compositor is getting messed up every time I turn on the second screen via Display settings by chance? Manually switching from OpenGL 2.0 to OpenGL 3.0 fixes the issue but, it’s silly (inconvenient) to have to do that each time.

I’m kind of thinking out load at this point but, using optimus-manager logs me off every time, which is fine but, not ideal. Point is, I’m trying to decide which route is the best route for me. I’m not on a laptop so, I’m not trying to save power or anything. Just trying to find the most convenient way to use a second screen.

Note that in “hybrid” and “nvidia” mode both GPUs are active and running. In “nvidia” mode, the intel GPU only forwards the images from the nvidia GPU to its outputs, the nvidia GPU does all the rendering. In “hybrid” mode, the intel GPU does all the rendering*, and the nvidia GPU just forwards the images to its outputs.

*: except for programs which are started with the prime-run script, because those are rendered by the nvidia GPU

I guess that’s up to you to determine which one is better: using only the nvidia GPU or using both the intel and nvidia GPU. Of course, if you only use the single nvidia GPU, there are fewer things that can go wrong.

I don’t see your compositor in the inxi output, and I have not experienced similar issues, so I cannot say anything. But I would be surprised if there wasn’t a way to configure it to use OpenGL 3.0

Yes, that’s needed because the X server needs to be restarted with a new configuration, unfortunately there is no better way at the moment that I am aware of. Since you’re not on a laptop, you could just leave optimus-manager set to “nvidia” mode. I don’t quite see why you would use the switching capability of it on a desktop PC. You can edit /etc/optimus-manager/optimus-manager.conf so that it says startup_mode=nvidia, in that case you’ll automatically be in nvidia mode when you start the system.

Thanks for the detailed explanation, @pobrn!

Now that I’ve gone down this rabbit hole, and have a better understanding of what’s down here, metaphorically speaking, I think I’m going to just use the video card at this point (I’ll keep trying to track down a fix for the compositor.) It’s probably better to use the video card for such things, either way.

But it’s good to know how to set this up for future reference, should I want to reenable for some reason or if I should pick up a laptop with Dual GPUs.

And now I don’t see the hybrid/prime drivers in the Settings anymore so, I’ll see if I can uninstall them using mhwd somehow. I’ll figure it out, I’m sure (Configure Graphics Cards - Manjaro - remove installed driver)

Anyway, I really appreciate your time on this and have a nice rest of your weekend…