Creating xorg.conf file to support dual monitors


I’ve been trying to configure my second monitor to work correctly. I’ve tried many things in the last couple of weeks (including the wiki) but nothing worked. Today I tried installing the driver which I got directly from nvidia’s website, and the second monitor worked for the first time!
However, ONLY the second monitor worked. The laptop’s screen did not work after the installing driver.
I figured out the issue could be the xorg.conf file that the installation created, since I’m pretty sure I didn’t have that before. The created file has the following:

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

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

Section "Files"

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"

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

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

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"

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

When I remove that file and restart, the laptop screen works, but the second monitor doesn’t.
I’ve searched around a lot and tried quite a few config files, but nothing works correctly.

Please note that I’m not 100% sure that only the xorg.conf file is to blame! I might’ve missed something.

My graphics card is NVIDIA GTX1650, and the processor is intel.

Any help would be very appreciated :slight_smile:

p.s. I’m sorry for the lack of information, but I don’t know what would be useful in this context.

Hi and welcome to the Forum :slight_smile:
If it’s a laptop, I suspect you have dual graphics, which requires additional tweaking with suse-prime…

Can you post the output from;

/sbin/lspci -nnk | egrep -A3 "VGA|Display|3D"
xrandr --listproviders
xrandr --listmonitors

Here they are:

max@max-os:~> /sbin/lspci -nnk | egrep -A3 "VGA|Display|3D"
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 630 (Mobile) [8086:3e9b]
        Subsystem: QUANTA Computer Inc Device [152d:1199]
        Kernel driver in use: i915
        Kernel modules: i915
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] [10de:1f91] (rev a1)
        Subsystem: QUANTA Computer Inc Device [152d:1235]
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia

max@max-os:~> xrandr --listproviders
Providers: number : 1
Provider  0: id: 0x47; cap: 0xb (Source Output, Sink Output, Sink Offload);  crtcs: 4; outputs: 4; associated providers: 0; name: Intel
    output eDP1
    output DP1
    output HDMI1
    output VIRTUAL1

max@max-os:~> xrandr --listmonitors
Monitors: 1
 0: +*eDP1 1920/340x1080/190+0+0  eDP1

Have a read here since your on Leap 15.1;

But I would suggest using SUSE_Prime (available on Leap 15.1) instead as Bumblebee is somewhat deprecated going forward;

OH MY GOD! Solved!
I’ve tried Bumblebee like 10 times, with slightly different steps and configs each time, and it always corrupts many things and I had to roll back to a previous snapshot.

Installing SUSE_Prime works like a charm!

Many thanks!:slight_smile: