Xorg config for for two-head machine

Hello all, I have a problem configuring X on two-head laptop with embedded Intel 915 video and discrete Nvidia 1050. They both worked good with Nouveau driver but with proprietary Nvidia driver only Nvidia card does. As far as both heads work under Wayland, so problem obviously in Xorg config. And /etc/X11/xorg.conf (created by nv-config most likely) definitely confirms it as it contains nothing about Intel. I tried to create new config with Xorf -config and include lost Intel-related part into working Nvidia-generated config, but X session failed to start with no obvious (for me at least) reason. Xorg.0.log contains no obvious errors. messages log contains strange

2024-12-28T21:33:05.290547+03:00 localhost kded5[2478]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
2024-12-28T21:33:05.290699+03:00 localhost kded5[2478]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.#012#012Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

So the question is: what’s the problem and how to fix it? Thank you.
lspci | grep VGA

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)

Now working Xorg.conf:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 550.100

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

Section "Files"
EndSection

Section "InputDevice"
    # generated from data in "/etc/sysconfig/mouse"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "IMPS/2"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "yes"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

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

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

xorg.conf supposed to work, merged from the original one above and Xorg -configure result:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 550.100

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

Section "Files"
        ModulePath   "/usr/lib64/xorg/modules"
#        FontPath     "/usr/share/fonts/misc:unscaled"
#        FontPath     "/usr/share/fonts/Type1/"
#        FontPath     "/usr/share/fonts/100dpi:unscaled"
#        FontPath     "/usr/share/fonts/75dpi:unscaled"
#        FontPath     "/usr/share/fonts/ghostscript/"
#        FontPath     "/usr/share/fonts/cyrillic:unscaled"
#        FontPath     "/usr/share/fonts/misc/sgi:unscaled"
#        FontPath     "/usr/share/fonts/truetype/"
#        FontPath     "built-ins"
EndSection


Section "Module"
        Load  "glx"
        Load  "vnc"
#        Load  "glxserver_nvidia"
EndSection

Section "InputDevice"
    # generated from data in "/etc/sysconfig/mouse"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "IMPS/2"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "yes"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Samsung"
    ModelName      "External"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Acer"
    ModelName      "Builtin"
#    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
#    Driver         "intel"
	Driver         "modesetting"
    VendorName     "Intel Corporation"
    BusID          "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    SubSection "Display"
    Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

This is a laptop with hybrid graphics? I’m not sure that you can treat the graphics chipsets separately as you’ve described. I don’t have this hardware, but there are others on this forum who do that may be able to advise further here. Please show the results from
xrandr --listproviders
xrandr --listmonitors

Have a read of these guides…
https://en.opensuse.org/SDB:NVIDIA_SUSE_Prime
https://en.opensuse.org/SDB:NVIDIA_Switcheroo_Control

This topic may also be of interest to you.

1 Like

What happens if you remove Xorg.conf?

xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x1b7; cap: 0x1 (Source Output); crtcs: 4; outputs: 1; associated providers: 0; name: NVIDIA-0
    output HDMI-0

xrandr --listmonitors
Monitors: 1
 0: +*HDMI-0 2560/700x1440/400+0+0  HDMI-0

and it’s the expected result, AFAIK, xrandr is the X stuff and it doesn’t see hardware lost in xorg.conf.

Well, they definitely deserve to be read again, but they both talk about switching. My aim is to get both cards (both monitors at least) working simultaneously as they did off-the-shelf with Nouveau after 15.4 installation and 15.6 upgrade. Sorry, looks like I forgot to say my laptop has built-in display connected to eDP port to Intel card and external display connected to HDMI port to Nvidia card.

Both monitors is working as expected.
Bingo! Thank you very much!

Can you post Xorg.log for comparison?

Here it is

Well, the autoconfiguration creates the single X11 screen (do not confuse it with a physical output device) spanning multiple monitors. That is what XRandR is working with. You tried to create multiple X11 screens. Each screen is (originally) almost completely independent. You can move mouse between screens, but you can neither move windows between screens nor create windows spanning multiple screens.

It is possible to combine multiple screens similar to how XRandR combines multiple monitors using Xinerama extension. It needs to be explicitly enabled. I have no idea in which state the support for it is in various toolkits and drivers (given that the world mostly switched to XRandR long ago). In particular NVIDIA only supports Xinerama between its own GPUs:

  • The NVIDIA X driver must be used for all X screens in the server.

Thank you very much for explanation, I should dig into X principles a bit deeper myself, but was too lazy to. Now I have no reasons to build multiple X screens as explained, as far as two physical ones are working as expected. But your explanation definitely makes a sense

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.