Page 1 of 1

dual screens fail [SOLVED]

Posted: 2020/01/16 16:00:43
by stressedTree
I have a new (Dell G3 15) laptop with the dual GPU setup: Intel UHD 630 (mobile) integrated and NVIDIA GeForce GTX 1050 Ti M dedicated cards. My problem is that I can't get CentOS 8 (kernel 4.18.0-80.11.2.el8_0.x86_64) working on both the integrated monitor and one connected via HDMI at the same time. That was a surprise, as my old laptop did it fine with a similar setup (Centos7, older versions of the Intel and NVIDIA cards, same external monitor), although I guess I did use quite an old kernel version on that. Relevant output from lspci on the new one is:

Code: Select all

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile) (prog-if 00 [VGA controller])
	Subsystem: Dell Device 086f
	Flags: bus master, fast devsel, latency 0, IRQ 129
	Memory at a2000000 (64-bit, non-prefetchable) [size=16M]
	Memory at 80000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 5000 [size=64]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [40] Vendor Specific Information: Len=0c <?>
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [100] Process Address Space ID (PASID)
	Capabilities: [200] Address Translation Service (ATS)
	Capabilities: [300] Page Request Interface (PRI)
	Kernel driver in use: i915
	Kernel modules: i915

01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
	Subsystem: Dell Device 086f
	Flags: bus master, fast devsel, latency 0, IRQ 158
	Memory at a3000000 (32-bit, non-prefetchable) [size=16M]
	Memory at 90000000 (64-bit, prefetchable) [size=256M]
	Memory at a0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 4000 [size=128]
	[virtual] Expansion ROM at a4000000 [disabled] [size=512K]
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [250] Latency Tolerance Reporting
	Capabilities: [258] L1 PM Substates
	Capabilities: [128] Power Budgeting <?>
	Capabilities: [420] Advanced Error Reporting
	Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Capabilities: [900] #19
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia
I've gone around various forums and seen different solutions working (on other distros) and after installing the nvidia driver I have tried repeatedly to edit the xorg.conf file. The most promising version so far contains the following

Code: Select all

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Module"
	Load  "glxserver_nvidia"
	Load  "glx"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS" "true"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "SAMSUNG"
    ModelName      "S22C450"
    Option         "DPMS" "true"
EndSection

Section "Device"
    Identifier	   "Card0"
    Driver         "intel"
    BusID          "PCI:0:2:0"
    VendorName     "Intel Corporation"
    BoardName	   "UHD Graphics 630 (Mobile)"
EndSection

Section "Device"
    Identifier     "Card1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName	   "GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)"
    BusID	   "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	Option     "TwinView" "1"
EndSection

When booted with this xorfg.conf file, centos shows up only on the native laptop monitor, the other monitor is receiving data, but it's all dark except that my cursor can move into it, although it becomes an X and no kind of clicking has any effect. The output of xrandr is:

Code: Select all

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080     60.00*+  59.93    48.00  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      60.00    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1368x768      60.00    59.88    59.85  
   1280x800      59.81    59.91  
   1280x720      59.86    60.00    59.74  
   1024x768      60.00  
   1024x576      60.00    59.90    59.82  
   960x540       60.00    59.63    59.82  
   800x600       60.32    56.25  
   864x486       60.00    59.92    59.57  
   640x480       59.94  
   720x405       59.51    60.00    58.99  
   640x360       59.84    59.32    60.00  
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Showing that only the internal monitor is recognised, presumably only the Intel card. The Xorg.0.log contains:

Code: Select all

X.Org X Server 1.20.3
X Protocol Version 11, Revision 0
[     6.141] Build Operating System:  4.19.34-300.el7.x86_64 
[     6.141] Current Operating System: Linux localhost.localdomain 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64
[     6.141] Kernel command line: BOOT_IMAGE=(hd0,gpt7)/vmlinuz-4.18.0-80.11.2.el8_0.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto resume=/dev/mapper/cl-swap rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet nouveau.modeset=0
[     6.141] Build Date: 03 August 2019  06:04:20PM
[     6.141] Build ID: xorg-x11-server 1.20.3-5.2.el8_0 
[     6.141] Current version of pixman: 0.36.0
[     6.141] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[     6.141] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     6.141] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jan 16 15:54:06 2020
[     6.143] (==) Using config file: "/etc/X11/xorg.conf"
[     6.143] (==) Using config directory: "/etc/X11/xorg.conf.d"
[     6.143] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     6.144] (==) ServerLayout "Layout0"
[     6.144] (**) |-->Screen "Screen0" (0)
[     6.144] (**) |   |-->Monitor "Monitor0"
[     6.144] (**) |   |-->Device "Card0"
[     6.144] (**) |-->Screen "Screen1" (1)
[     6.144] (**) |   |-->Monitor "Monitor1"
[     6.145] (**) |   |-->Device "Card1"
[     6.145] (**) |-->Input Device "Keyboard0"
[     6.145] (**) |-->Input Device "Mouse0"
[     6.145] (**) Option "Xinerama" "0"
[     6.145] (==) Automatically adding devices
[     6.145] (==) Automatically enabling devices
[     6.145] (==) Automatically adding GPU devices
[     6.145] (==) Automatically binding GPU devices
[     6.145] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     6.145] (**) FontPath set to:
	catalogue:/etc/X11/fontpath.d,
	built-ins,
	catalogue:/etc/X11/fontpath.d,
	built-ins
[     6.145] (**) ModulePath set to "/usr/lib64/xorg/modules"
[     6.145] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[     6.145] (WW) Disabling Keyboard0
[     6.145] (WW) Disabling Mouse0
[     6.145] (II) Loader magic: 0x5576d59df020
[     6.145] (II) Module ABI versions:
[     6.145] 	X.Org ANSI C Emulation: 0.4
[     6.145] 	X.Org Video Driver: 24.0
[     6.145] 	X.Org XInput driver : 24.1
[     6.145] 	X.Org Server Extension : 10.0
[     6.146] (++) using VT number 1

[     6.148] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[     6.149] (II) xfree86: Adding drm device (/dev/dri/card1)
[     6.149] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
[     6.150] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 12 paused 0
[     6.150] (II) xfree86: Adding drm device (/dev/dri/card0)
[     6.150] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[     6.151] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 13 paused 0
[     6.154] (--) PCI:*(0@0:2:0) 8086:3e9b:1028:086f rev 0, Mem @ 0xa2000000/16777216, 0x80000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/131072
[     6.154] (--) PCI: (1@0:0:0) 10de:1c8c:1028:086f rev 161, Mem @ 0xa3000000/16777216, 0x90000000/268435456, 0xa0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[     6.154] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[     6.154] (II) LoadModule: "glxservernvidia"
[     6.155] (WW) Warning, couldn't open module glxservernvidia
[     6.155] (EE) Failed to load module "glxservernvidia" (module does not exist, 0)
[     6.155] (II) LoadModule: "glx"
[     6.155] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[     6.159] (II) Module glx: vendor="X.Org Foundation"
[     6.159] 	compiled for 1.20.3, module version = 1.0.0
[     6.159] 	ABI class: X.Org Server Extension, version 10.0
[     6.159] (II) LoadModule: "extmod"
[     6.159] (II) Module "extmod" already built-in
[     6.159] (II) LoadModule: "intel"
[     6.160] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[     6.162] (II) Module intel: vendor="X.Org Foundation"
[     6.162] 	compiled for 1.20.3, module version = 2.99.917
[     6.162] 	Module class: X.Org Video Driver
[     6.162] 	ABI class: X.Org Video Driver, version 24.0
[     6.162] (II) LoadModule: "nvidia"
[     6.162] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[     6.166] (II) Module nvidia: vendor="NVIDIA Corporation"
[     6.166] 	compiled for 1.6.99.901, module version = 1.0.0
[     6.166] 	Module class: X.Org Video Driver
[     6.166] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
	i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
	915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
	Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
	GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[     6.166] (II) intel: Driver for Intel(R) HD Graphics
[     6.166] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[     6.166] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[     6.166] (II) NVIDIA dlloader X Driver  440.44  Sun Dec  8 03:38:31 UTC 2019
[     6.166] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[     6.166] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[     6.166] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20180514
[     6.167] (II) systemd-logind: releasing fd for 226:1
[     6.168] (II) Loading sub module "fb"
[     6.168] (II) LoadModule: "fb"
[     6.168] (II) Loading /usr/lib64/xorg/modules/libfb.so
[     6.169] (II) Module fb: vendor="X.Org Foundation"
[     6.169] 	compiled for 1.20.3, module version = 1.0.0
[     6.169] 	ABI class: X.Org ANSI C Emulation, version 0.4
[     6.169] (II) Loading sub module "wfb"
[     6.169] (II) LoadModule: "wfb"
[     6.169] (II) Loading /usr/lib64/xorg/modules/libwfb.so
[     6.170] (II) Module wfb: vendor="X.Org Foundation"
[     6.170] 	compiled for 1.20.3, module version = 1.0.0
[     6.170] 	ABI class: X.Org ANSI C Emulation, version 0.4
[     6.170] (II) Loading sub module "ramdac"
[     6.170] (II) LoadModule: "ramdac"
[     6.170] (II) Module "ramdac" already built-in
[     6.171] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics
[     6.171] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2; using a maximum of 6 threads
[     6.171] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[     6.171] (==) intel(0): RGB weight 888
[     6.171] (==) intel(0): Default visual is TrueColor
[     6.171] (II) intel(0): Output eDP1 using monitor section Monitor0
[     6.172] (**) intel(0): Found backlight control interface intel_backlight (type 'raw') for output eDP1
[     6.172] (II) intel(0): Enabled output eDP1
[     6.172] (II) intel(0): Output DP1 has no monitor section
[     6.172] (II) intel(0): Enabled output DP1
[     6.172] (II) intel(0): Output HDMI1 has no monitor section
[     6.172] (II) intel(0): Enabled output HDMI1
[     6.172] (--) intel(0): Using a maximum size of 256x256 for hardware cursors
[     6.172] (II) intel(0): Output VIRTUAL1 has no monitor section
[     6.172] (II) intel(0): Enabled output VIRTUAL1
[     6.172] (--) intel(0): Output eDP1 using initial mode 1920x1080 on pipe 0
[     6.172] (==) intel(0): TearFree enabled
[     6.172] (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
[     6.172] (==) intel(0): DPI set to (96, 96)
[     6.172] (II) Loading sub module "dri3"
[     6.172] (II) LoadModule: "dri3"
[     6.172] (II) Module "dri3" already built-in
[     6.172] (II) Loading sub module "dri2"
[     6.172] (II) LoadModule: "dri2"
[     6.172] (II) Module "dri2" already built-in
[     6.172] (II) Loading sub module "present"
[     6.172] (II) LoadModule: "present"
[     6.172] (II) Module "present" already built-in
[     6.172] (==) NVIDIA(1): Depth 24, (==) framebuffer bpp 32
[     6.172] (==) NVIDIA(1): RGB weight 888
[     6.172] (==) NVIDIA(1): Default visual is TrueColor
[     6.172] (==) NVIDIA(1): Using gamma correction (1.0, 1.0, 1.0)
[     6.172] (**) NVIDIA(1): Enabling 2D acceleration
[     6.172] (II) Loading sub module "glxserver_nvidia"
[     6.172] (II) LoadModule: "glxserver_nvidia"
[     6.173] (II) Loading /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so
[     6.206] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[     6.206] 	compiled for 1.6.99.901, module version = 1.0.0
[     6.206] 	Module class: X.Org Server Extension
[     6.206] (II) NVIDIA GLX Module  440.44  Sun Dec  8 03:36:07 UTC 2019
[     6.206] (II) NVIDIA: The X server does not support PRIME Render Offload.
[     6.989] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[     6.989] (--) NVIDIA(0):     DFP-0 (boot)
[     6.989] (II) NVIDIA(1): NVIDIA GPU GeForce GTX 1050 Ti (GP107-A) at PCI:1:0:0 (GPU-0)
[     6.989] (--) NVIDIA(1): Memory: 4194304 kBytes
[     6.989] (--) NVIDIA(1): VideoBIOS: 86.07.63.00.63
[     6.989] (II) NVIDIA(1): Detected PCI Express Link width: 16X
[     7.019] (--) NVIDIA(GPU-0): Samsung S22C450 (DFP-0): connected
[     7.019] (--) NVIDIA(GPU-0): Samsung S22C450 (DFP-0): Internal TMDS
[     7.019] (--) NVIDIA(GPU-0): Samsung S22C450 (DFP-0): 600.0 MHz maximum pixel clock
[     7.019] (--) NVIDIA(GPU-0): 
[     7.024] (==) NVIDIA(1): 
[     7.024] (==) NVIDIA(1): No modes were requested; the default mode "nvidia-auto-select"
[     7.024] (==) NVIDIA(1):     will be used as the requested mode.
[     7.024] (==) NVIDIA(1): 
[     7.024] (II) NVIDIA(1): Validated MetaModes:
[     7.024] (II) NVIDIA(1):     "DFP-0:nvidia-auto-select"
[     7.024] (II) NVIDIA(1): Virtual screen size determined to be 1680 x 1050
[     7.030] (--) NVIDIA(1): DPI set to (90, 91); computed from "UseEdidDpi" X config
[     7.030] (--) NVIDIA(1):     option
[     7.031] (II) intel(0): SNA initialized with Coffeelake (gen9) backend
[     7.031] (==) intel(0): Backing store enabled
[     7.031] (==) intel(0): Silken mouse enabled
[     7.031] (II) intel(0): HW Cursor enabled
[     7.031] (**) intel(0): DPMS enabled
[     7.032] (==) intel(0): Display hotplug detection enabled
[     7.032] (II) intel(0): [DRI2] Setup complete
[     7.032] (II) intel(0): [DRI2]   DRI driver: i965
[     7.032] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[     7.032] (II) intel(0): direct rendering: DRI2 DRI3 enabled
[     7.032] (II) intel(0): hardware support for Present enabled
[     7.033] (II) NVIDIA: Using 24576.00 MB of virtual memory for indirect memory
[     7.033] (II) NVIDIA:     access.
[     7.037] (II) NVIDIA(1): ACPI: failed to connect to the ACPI event daemon; the daemon
[     7.037] (II) NVIDIA(1):     may not be running or the "AcpidSocketPath" X
[     7.037] (II) NVIDIA(1):     configuration option may not be set correctly.  When the
[     7.037] (II) NVIDIA(1):     ACPI event daemon is available, the NVIDIA X driver will
[     7.037] (II) NVIDIA(1):     try to use it to receive ACPI event notifications.  For
[     7.037] (II) NVIDIA(1):     details, please see the "ConnectToAcpid" and
[     7.037] (II) NVIDIA(1):     "AcpidSocketPath" X configuration options in Appendix B: X
[     7.037] (II) NVIDIA(1):     Config Options in the README.
[     7.051] (II) NVIDIA(1): Setting mode "DFP-0:nvidia-auto-select"
[     7.077] (==) NVIDIA(1): Disabling shared memory pixmaps
[     7.077] (==) NVIDIA(1): Backing store enabled
[     7.077] (==) NVIDIA(1): Silken mouse enabled
[     7.077] (**) NVIDIA(1): DPMS enabled
[     7.078] (WW) NVIDIA(1): Option "TwinView" is not used
[     7.078] (II) Loading sub module "dri2"
[     7.078] (II) LoadModule: "dri2"
[     7.078] (II) Module "dri2" already built-in
[     7.078] (II) NVIDIA(1): [DRI2] Setup complete
[     7.078] (II) NVIDIA(1): [DRI2]   VDPAU driver: nvidia
There are some potentially interesting lines in there, including "Failed to load module "glxservernvidia" (module does not exist, 0)", although I'm not sure it's relevant.

In brief, I can also achieve other results by manipulating the xorg.conf file, although xrandr commands I've tried have had no effect on the displays:
  • If I simply switch screen0 and 1 labels in the present file, then the behaviour of monitors is reversed (internal monitor is dark, external one works). [Am I correct in thinking the X server sees both monitors just fine, but gnome or gdm refuses to use both for some reason?]
  • If I try link both screens to card0 (Intel), only internal monitor works, HDMI one is dead, xrandr output very similar.
  • If I try link both screens to card1 (NVIDIA), only HDMI monitor works, internal one is dead, xrandr output changes correspondigly.
  • without xorg.conf file, only the integrated GPU and internal monitor are used.
  • a number of other things I tried result in neither screen showing anything useful once X server starts.
I can reproduce the logs etc. for these other situations if useful.

Anyway, from what I've read, the HDMI port is connected to the NVIDIA card and the internal monitor to the Intel card. My outcomes are certainly consistent with that. The laptop is a dual boot; needless to say, Windows 10 has no trouble extending screens to the external monitor.

My preferred outcome would be to use only the integrated GPU (Intel) to drive both screens in Linux (NVIDIA card could then be dedicated to GPU calculations). Second best: any other way to get dual monitors on Linux (use only NVIDIA card, use both, whatever). While I prefer to stick with CentOS (I first got it to develop in the same environment that my code later runs in, which has served me well), I would consider a different distro if there is no other solution.

Any advice/help is much appreciated!

Re: dual screens fail

Posted: 2020/01/16 16:04:02
by TrevorH
CentOS 8.1 was released yesterday so you might want to try updating as a first step and see if whatever the problem is has already been fixed.

Re: dual screens fail

Posted: 2020/01/16 16:39:57
by stressedTree
Thanks, reasonable idea. lspci shows that the main effect is that nouveau has once again replaced the nvidia driver in controlling the NVIDIA card. The external monitor no longer recognised at all, with or without that xorg.conf file. I guess nouveau is not supported by the NVIDIA card and I'll have to replace it by the nvidia driver again.... can't even find it on there now. So, may need to reinstall that.

Re: dual screens fail

Posted: 2020/01/16 18:58:53
by TrevorH
Every time there is an update to the kernel you will need to reinstall the nvidia driver from its .run file or switch to a packaged version of the drivers that survives kernel updates.

Re: dual screens fail

Posted: 2020/01/17 11:57:38
by stressedTree
I see, thank you. Well, reinstalling the nvidia driver just gets me back to the state reflected in the original post.

Any other help/advice would be appreciated.

Re: dual screens fail

Posted: 2020/01/21 09:12:12
by stressedTree
Sadly, the only solution to this that I was able to find in the end was to replace CentOS with Manjaro (KDE) and follow the guide here: https://forum.manjaro.org/t/guide-insta ... idia/92196. In case this is ever useful to anyone, after the steps in that guide (including driver update) I get the second monitor to show up as HDMI-0 when I switch to nvidia GPU. Initially, the desktop (background) only showed up on the external monitor although I was able to pull open windows over to the integrated one. Once I got the taskbar to align to the right, I get the full desktop (most of the time, still a bit buggy).

Not sure if there was a way to do this in CentOS, which I would have preferred, but I had to get a solution sooner, rather than later.