Can I use 2 gpus for the desktop?

I’m a complete noob to Linux so bear with me, I’ve installed manjaro KDE and everything is going fine except my multi-monitor setup. I have 2 gpus, a 2070S and a 1060 3GB, and it sees both of them fine and drivers are installed fine (proprietary obviously) but only the monitors I have the 2070S hooked up to are actually showing anything. Contrary to my windows setup, I have 2 gpus because I have 5 monitors (2070S can only physically output to 4, 1060 is connected to the 5th), is this possible in manjaro? I don’t really care if I won’t be able to drag windows from the 2070S monitors and vice versa, just as long as I can use it. I’ve been trying to create a new X screen with nvidia-settings, but it either doesn’t save (I’ve tried saving it to both xorg.conf and the nvidia.conf, with sudo of course) or the other monitor will turn on after restart, but the actual screen will be displayed on my main monitor in like a corner along with the main one, which is super bizarre (it will just fix itself upon log in and the other monitor will turn off again). I’ve been looking everywhere but there doesn’t seem to be a clear answer.

Here’s more specs if it is necessary: MB: Aorus pro wifi b450
CPU: 5600x
RAM: 32gb
GPU1: RTX 2070S
GPU2: GTX 10603GB

Even 3 GPUs can work

Only nvidia.conf is a valid file, and if you kept both, it will fail. Also, you should share that file so we know what you did, and together with that more info about your system as described here: [HowTo] Provide System Information

Ok heres more system information I got from that post:

System:
  Kernel: 5.15.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=39ec9f28-5406-461b-9efe-67ea5b287989 rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: B450 AORUS PRO WIFI v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: B450 AORUS PRO WIFI-CF v: x.x
    serial: <superuser required> UEFI: American Megatrends LLC. v: F62b
    date: 09/06/2021
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 31.35 GiB used: 2.79 GiB (8.9%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 5 5600X bits: 64 type: MT MCP arch: Zen 3
    family: 0x19 (25) model-id: 0x21 (33) stepping: 0 microcode: 0xA201016
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 32 MiB desc: 1x32 MiB
  Speed (MHz): avg: 3109 high: 3599 min/max: 2200/4650 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 3512 2: 2875
    3: 2875 4: 3595 5: 3593 6: 2873 7: 3599 8: 2874 9: 2878 10: 2900 11: 2867
    12: 2878 bogomips: 88844
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists erms extapic
    extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht
    hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq
    pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt
    pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni
    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor
    svm svm_lock syscall tce topoext tsc tsc_scale umip v_spec_ctrl
    v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt
    xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Use of uninitialized value in numeric eq (==) at /usr/bin/inxi line 15503.
Use of uninitialized value in numeric eq (==) at /usr/bin/inxi line 15511.
Graphics:
  Device-1: NVIDIA GP106 [GeForce GTX 1060 3GB] vendor: PNY driver: nvidia
    v: 470.103.01 alternate: nouveau,nvidia_drm pcie: gen: 1 speed: 2.5 GT/s
    lanes: 4 link-max: gen: 2 speed: 5 GT/s lanes: 16 bus-ID: 06:00.0
    chip-ID: 10de:1c02 class-ID: 0300
  Device-2: NVIDIA TU104 [GeForce RTX 2070 SUPER] vendor: Gigabyte
    driver: nvidia v: 470.103.01 alternate: nouveau,nvidia_drm pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 08:00.0 chip-ID: 10de:1e84 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.3 with: Xwayland v: 22.1.1
    compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia,nvidia
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 9600x3240 s-dpi: 162 s-size: 1505x511mm (59.25x20.12")
    s-diag: 1589mm (62.57")
  Monitor-1: DP-0 pos: primary,2-2 res: 3840x2160 hz: 60 dpi: 163
    size: 600x340mm (23.62x13.39") diag: 690mm (27.15") modes: N/A
  Monitor-2: DP-2 pos: 2-1 res: 3840x2160 hz: 60 dpi: 157
    size: 621x341mm (24.45x13.43") diag: 708mm (27.89") modes: N/A
  Monitor-3: DP-4 pos: 3-4 res: 1920x1080 hz: 60 dpi: 92
    size: 531x299mm (20.91x11.77") diag: 609mm (23.99") modes: N/A
  Monitor-4: HDMI-0 pos: 1-3 res: 1920x1080 hz: 60 dpi: 82
    size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A
  Monitor-5: HDMI-1-0 pos: 1-1 size-res: N/A modes: N/A
  OpenGL: renderer: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2
    v: 4.6.0 NVIDIA 470.103.01 direct render: Yes
Audio:
  Device-1: NVIDIA GP106 High Definition Audio vendor: PNY
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 4
    link-max: gen: 2 speed: 5 GT/s lanes: 16 bus-ID: 06:00.1
    chip-ID: 10de:10f1 class-ID: 0403
  Device-2: NVIDIA TU104 HD Audio vendor: Gigabyte driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 08:00.1
    chip-ID: 10de:10f8 class-ID: 0403
  Device-3: AMD Starship/Matisse HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 0a:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-4: Focusrite-Novation Focusrite Scarlett 2i2 type: USB
    driver: snd-usb-audio bus-ID: 1-7:4 chip-ID: 1235:8006 class-ID: fe01
  Sound Server-1: ALSA v: k5.15.32-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.49 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 04:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 05:00.0
    chip-ID: 8086:24fb class-ID: 0280
  IF: wlp5s0 state: down mac: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 1-5:3 chip-ID: 8087:0aa7 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 4.12 TiB used: 2.98 TiB (72.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:3 vendor: Samsung
    model: SSD 970 EVO Plus 500GB size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 37.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: HP model: SSD EX920 1TB
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 42A0S63C temp: 30.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD10EZEX-60M2NA0 size: 931.51 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: 1A01 scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 EVO 2TB
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 4B6Q scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 953.57 GiB size: 937.53 GiB (98.32%)
    used: 47.92 GiB (5.1%) fs: ext4 dev: /dev/nvme1n1p2 maj-min: 259:2
    label: N/A uuid: 39ec9f28-5406-461b-9efe-67ea5b287989
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:1
    label: NO_LABEL uuid: 4980-6A20
  ID-3: /media/gamedisk raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
    used: 1.75 TiB (96.0%) fs: ntfs dev: /dev/sdb2 maj-min: 8:18 label: SSD2
    uuid: 448644D88644CC5C
  ID-4: /run/media/joeyr/Disk 1 raw-size: 931.39 GiB
    size: 931.39 GiB (100.00%) used: 844.72 GiB (90.7%) fs: ntfs dev: /dev/sda2
    maj-min: 8:2 label: Disk 1 uuid: 007838D57838CAE4
  ID-5: /run/media/joeyr/SSD raw-size: 465.13 GiB size: 465.13 GiB (100.00%)
    used: 371.11 GiB (79.8%) fs: ntfs dev: /dev/nvme0n1p4 maj-min: 259:7
    label: SSD uuid: FCF4CDC3F4CD7FFE
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:4 size: 529 MiB fs: ntfs label: Recovery
    uuid: 02CCCCA0CCCC8F7B
  ID-2: /dev/nvme0n1p2 maj-min: 259:5 size: 99 MiB fs: vfat label: N/A
    uuid: 48CC-E1B4
  ID-3: /dev/nvme0n1p3 maj-min: 259:6 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-4: /dev/sda1 maj-min: 8:1 size: 128 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-5: /dev/sdb1 maj-min: 8:17 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:2 info: Valve Wireless Steam Controller type: Keyboard,HID
    driver: hid-steam,usbhid interfaces: 5 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 28de:1142 class-ID: 0300
  Device-2: 1-5:3 info: Intel Wireless-AC 3168 Bluetooth type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 8087:0aa7 class-ID: e001
  Device-3: 1-7:4 info: Focusrite-Novation Focusrite Scarlett 2i2
    type: Audio driver: snd-usb-audio interfaces: 4 rev: 2.0 speed: 480 Mb/s
    power: 500mA chip-ID: 1235:8006 class-ID: fe01
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 4-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-5: 5-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 5-2:2 info: Corsair K95 RGB Platinum Keyboard [RGP0056]
    type: Keyboard,HID driver: usbfs interfaces: 2 rev: 2.0 speed: 12 Mb/s
    power: 500mA chip-ID: 1b1c:1b2d class-ID: 0300 serial: <filter>
  Device-2: 5-4:3 info: Corsair SCIMITAR RGB ELITE Gaming Mouse
    type: Mouse,HID driver: usbfs interfaces: 2 rev: 2.0 speed: 12 Mb/s
    power: 300mA chip-ID: 1b1c:1b8b class-ID: 0300 serial: <filter>
  Hub-6: 6-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 57 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 33%
Info:
  Processes: 329 Uptime: 27m wakeups: 0 Init: systemd v: 250 tool: systemctl
  Compilers: gcc: 11.2.0 clang: 13.0.1 Packages: 1308 pacman: 1290 lib: 384
  flatpak: 14 snap: 4 Shell: Zsh v: 5.8.1 default: Bash v: 5.1.16
  running-in: konsole inxi: 3.3.15

And heres the nvidia.conf file:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 470.103.01

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

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

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

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

Section "InputClass"
    Identifier         "Keyboard Defaults"
    MatchIsKeyboard    "yes"
    Option         "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics LG HDR 4K"
    HorizSync       135.0 - 135.0
    VertRefresh     40.0 - 61.0
    Option         "DPMS"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Ancor Communications Inc VH203"
    HorizSync       29.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 2070 SUPER"
    Option         "NoLogo" "1"
    BusID          "PCI:8:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1060 3GB"
    Option         "NoLogo" "1"
    BusID          "PCI:6:0:0"
EndSection

Section "Screen"

# Removed Option "metamodes" "DP-0: nvidia-auto-select +3840+1080, HDMI-0: nvidia-auto-select +4925+0, DP-2: nvidia-auto-select +0+1080, DP-4: nvidia-auto-select +7680+1620"
# Removed Option "metamodes" "DP-0: nvidia-auto-select @5760x2160 +3840+1080, HDMI-0: nvidia-auto-select +4792+0, DP-2: nvidia-auto-select +0+1080, DP-4: nvidia-auto-select +7680+1620"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DP-0: nvidia-auto-select +3840+1080, HDMI-0: nvidia-auto-select +4792+0, DP-2: nvidia-auto-select +0+1080, DP-4: nvidia-auto-select +7680+1620"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "nvidia-auto-select +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

All im doing is setting a new X screen in nvidia-settings, as shown here:

But then when I restart, it just goes back to disabled:

are you saying i should delete xorg.conf entirely? Like it said it seems to be kind of working, as the monitor turns on at the login screen, but nothing shows up, then turns back off when I log in.

also, as a side note, it would also be great if i can have separate dpi scaling per monitor, as I have 2 2160p’s and 2 1080p’s. I know it may be possible using a bunch of xrandr commands and whatnot, but is this possible in the gui?

Looks like only 1 physical monitor is connected here, which as you said shutoff on login. Plus it is the second device. I assume the “metamodes” of nvidia disable device1, while device0 stays.

I guess in your case it is not fully possible at the gui. You need to customize it by hand.

So instead of auto selecting by metamodes, you need to set a monitor for every physical monitor and combine them into one screen.

It could be a bit complicated to a newbie.

Why did you disable Xinerama? It combines both screens to one.

Chapter 13. Configuring GLX in Xinerama

I actually heard that using this is pretty outdated (maybe I got the wrong information idk) but I have tried enabling it, it didn’t really seem to make any difference.

Also I had some weird behavior where mousing over to the right monitor would pan the main screen to the left making the right screen also visible on the main screen which was very odd. This might be intended maybe, but not the way I want to use it lol.

Damn ok, I had a feeling. Is there any resources you can point me to perhaps?

Over the years, the man page has become very verbose, but should contain almost everything: xorg.conf(5): config files for Xorg X server - Linux man page

Multihead - ArchWiki
Chapter 12. Configuring Multiple Display Devices on One X Screen
Chapter 14. Configuring Multiple X Screens on One Card

So just to sum up:

  1. You need to 1 device section for each gpu.
  2. Create a Monitor Section for each physical monitor.
  3. Create a Screen Section for each Monitor Section.
  4. Create a ServerLayout Section to set screens in the correct position.
  5. Use individual identifiers like RTX 2070 for each device, monitor and screen section, which is needed to connect sections between Monitor, Screen and Device. That makes it more readable.

:notebook: With randr 1.2 support, it possible to position the monitor at the monitor section, without a ServerLayout.