Simultaneous output on iGPU and discrete GPU

Dear all,

I have just installed Clear Linux and stumbled upon a problem with my display output. I have a desktop PC with an integrated Intel GPU (iGPU) and a discrete Nvidia GPU (dGPU). I have two displays. One is connected to the iGPU through VGA and the other one to the dGPU through HDMI. At the login screen, main login screen is shown on the dGPU and both displays are active. After logging in, desktop is only shown on the dGPU and the iGPU does not give any output anymore. Primary display is set to AUTO in UEFI. If I set it to the iGPU, the login screen is still presented on the dGPU, but desktop is only shown on the iGPU after logging in. Only one display is always shown in settings.

What should I do to get output to both screens?

Thanks for all the help.

Assume that you won’t install NVIDIA proprietary driver, you can try to manually specify your monitors, screens, and gpus with Xorg config file.

Sometimes, believe it or not, just unplugging then replugging one of the monitor cables will fix the problem.

Thank you for replying on such a short notice.

Unplugging and plugging in again does not have any effect.

Default xorg.conf file did not exist, so I tried configuring Xorg by creating new as per manual. Unfortunately to no avail. I have tried putting it into ‘/etc/X11/’ and ‘/usr/share/X11/’ folders.

Do you think it would help if I install Nvidia drivers?

My xorg.conf file contents are.

Section “ServerLayout”
Identifier “X.org Configured”
Screen 0 “screen_nvidia”
Screen 1 “screen_intel” RightOf “screen_nvidia”
EndSection

Section “Device”
Identifier “card_nvidia”
Driver “noveau”
BusID “PCI:01:00.0”
EndSection

Section “Device”
Identifier “card_intel”
Driver “modesetting”
BusID “PCI:00:02.0”
EndSection

Section “Screen”
Identifier “screen_nvidia”
Device “card_nvidia”
EndSection

Section “Screen”
Identifier “screen_intel”
Device “card_intel”
EndSection

And ‘lspci’ command outputs.

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Desktop)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0)
00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #5 (rev f0)
00:1c.5 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #6 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a308 (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)
04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)

Ok, it seems I am getting somewhere.

I tried.

xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x48 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 6 associated providers: 1 name:modesetting
Provider 1: id: 0x8b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 2 associated providers: 1 name:modesetting

And set xrandr to.

xrandr --setprovideroutputsource 0x8b modesetting

After running a second command more inputs appeared in xrandr and setings. Now I have multiple screens, but I have to do this each time I log in. Any idea how to make this permanent?

you could save it in a little script somewhere in your home dir and register in System / Preferences / Startup Applications in gnome settings. Alternatively you could use gnome terminal gnome-terminal --tab-with-profile=DUAL_MONITOR or similar.

Installing NVIDIA driver will disable the onboard GPU so that’s surely not the way to go.

You can try to put that xrandr command in ~/.xsession file.

I tried installing NVIDIA drivers. Of course it did not help, but everything became smoother at 4K resolution.

The solution was very similar. I created ‘.xprofile’ file in the home directory with following line:

xrandr --setprovideroutputsource 1 0

Now I get both screens immediately when logging in.

Thank you for all your help.

If I set the integrated GPU as a primary graphic device I get the ‘Oh no’ problem.

I can remedy this by putting ‘xorg.conf’ file into ‘/usr/shared/X11/xorg.conf.d’ directory with the following contents.

Section “ServerLayout”
Identifier “Layout0”
Screen “screen_0”
EndSection

Section “Device”
Identifier “GeForce GT 1030”
Driver “nvidia”
BusID “PCI:01:00:0”
EndSection

Section “Device”
Identifier “Intel UHD 630”
Driver “modesetting”
BusID “PCI:00:02:0”
EndSection

Section “Screen”
Identifier “screen_0”
Device “GeForce GT 1030”
EndSection

  • /usr directory should not be modified because swupd will discard your changes when a file is updated.
  • you should use /etc/X11/xorg.conf.d
  • Your setting essentially tells Xorg to use your discrete GPU for your display.

Any additional comments are very appreciated.

Fine. I will move everything to ‘etc’ and try again.

Yes, it was my intention to force rendering on discrete GPU, otherwise I get white screen. I need my integrated GPU to stay as primary in the UEFI settings for some other reasons. It would be great though if I could avoid that white error screen by not rendering everything on discrete GPU and allowing to also show login screen on the other display, which is connected to integrated GPU.

It’s theoretically possible.
You can have your iGPU render the normal display and only pass certain heavy works to NVIDIA GPU. It’s called offloading and can be found in NVIDIA proprietary driver’s manual.

https://download.nvidia.com/XFree86/Linux-x86_64/455.38/README/randr14.html

The issue is this is really hard to achieve and I’m not aware of any successful attempts on CL.