Multi-monitor lag with different refresh rates

I have two different displays (144hz and 60Hz) connected to a single NVIDIA GPU. While both displays work, I get terrible lag when performing tasks and severe frame drops when streaming video. This happens in multiple desktop environments. This issue does not occur with a single monitor.

I've investigated a few options:

https://wiki.archlinux.org/title/NVIDIA#TwinView

In addition, i tested various desktop environments, as well as manually setting each screen to 60hz with no improvement.

I have both these monitors configured as a single X screen. I ran into other issues when trying to configure it as a separate x screens. Should i investigate this approach instead?

This is my x configuration:

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

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

Section "ServerLayout"

# Removed Option "Xinerama" "0"
# Removed Option "Xinerama" "1"
# Removed Option "Xinerama" "0"
# Removed Option "Xinerama" "1"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    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 "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics 27GL850"
    HorizSync       230.0 - 230.0
    VertRefresh     48.0 - 144.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "LG Electronics 23EA63"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 61.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1080"
    BusID          "PCI:45:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1080"
    BusID          "PCI:45:0:0"
    Screen          1
EndSection

Section "Screen"

# Removed Option "metamodes" "DP-2: nvidia-auto-select +0+0, HDMI-0: nvidia-auto-select +2560+360"
# Removed Option "metamodes" "DP-2: nvidia-auto-select +0+0"
# Removed Option "metamodes" "DP-2: nvidia-auto-select +0+0, HDMI-0: nvidia-auto-select +2560+0"
# Removed Option "metamodes" "DP-2: 2560x1440_144 +0+0, HDMI-0: 1920x1080_50 +2560+360"
# Removed Option "metamodes" "DP-2: 2560x1440_60 +0+0, HDMI-0: 1920x1080_60 +2560+360"
# Removed Option "metamodes" "DP-2: 2560x1440 +0+0, HDMI-0: 1920x1080 +2560+360"
# Removed Option "metamodes" "DP-2: 2560x1440 +0+0"
# Removed Option "metamodes" "DP-2: 2560x1440 +0+0, HDMI-0: 1920x1080 +2560+360"
# Removed Option "metamodes" "DP-2: 2560x1440 +0+0"
# Removed Option "metamodes" "DP-2: 2560x1440 +0+0 {ForceCompositionPipeline=On}"
# Removed Option "metamodes" "DP-2: 2560x1440_144 +0+0 {ForceCompositionPipeline=On}"
# Removed Option "metamodes" "DP-2: 2560x1440_144 +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +2560+0"
# Removed Option "metamodes" "DP-2: 2560x1440_144 +0+0 {ForceCompositionPipeline=On}, HDMI-0: 1920x1080_60 +2560+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "metamodes" "DP-2: 2560x1440_144 +0+0 {ForceCompositionPipeline=On}, HDMI-0: 1920x1080_60 +2560+360"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"

# Removed Option "metamodes" "HDMI-0: nvidia-auto-select +0+0 {AllowGSYNC=Off}"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


This is my system information:

System:
  Kernel: 5.16.2-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=052b08b6-4b04-4770-b2cb-31b98943efb3 rw [email protected]
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    systemd.unified_cgroup_hierarchy=1
    resume=UUID=dc95f6f1-c463-4373-8178-702b16ab719e loglevel=3
  Desktop: N/A wm: LG3D vt: 1 dm: GDM 41.3, SDDM Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Desktop Mobo: Micro-Star model: MPG X570 GAMING PLUS (MS-7C37) v: 2.0
    serial: <superuser required> UEFI-[Legacy]: American Megatrends v: A.40
    date: 09/10/2019
CPU:
  Info: model: AMD Ryzen 5 3600X bits: 64 type: MT MCP arch: Zen 2
    family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701013
  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: 2x16 MiB
  Speed (MHz): avg: 3856 high: 4307 min/max: N/A cores: 1: 3800 2: 3800
    3: 3967 4: 4307 5: 3800 6: 3800 7: 3800 8: 3800 9: 3800 10: 3800 11: 3800
    12: 3800 bogomips: 91194
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  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
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
    STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: eVga.com. driver: nvidia
    v: 495.46 alternate: nouveau,nvidia_drm bus-ID: 2d:00.0 chip-ID: 10de:1b80
    class-ID: 0300
  Device-2: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 5-1.2:3 chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org 1.21.1.3 compositor: picom v: git-c4107
    driver: loaded: nvidia note: n/a (using device driver) - try sudo/root
    unloaded: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 4480x1440 s-dpi: 95 s-size: 1198x389mm (47.2x15.3")
    s-diag: 1260mm (49.6")
  Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 96
    size: 510x290mm (20.1x11.4") diag: 587mm (23.1")
  Monitor-2: DP-2 res: 2560x1440 hz: 144 dpi: 109
    size: 597x336mm (23.5x13.2") diag: 685mm (27")
  OpenGL: renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2
    v: 4.6.0 NVIDIA 495.46 direct render: Yes
Audio:
  Device-1: NVIDIA GP104 High Definition Audio vendor: eVga.com.
    driver: snd_hda_intel v: kernel bus-ID: 2d:00.1 chip-ID: 10de:10f0
    class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 2f:00.4 chip-ID: 1022:1487
    class-ID: 0403
  Device-3: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 5-1.2:3 chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
  Sound Server-1: ALSA v: k5.16.2-zen1-1-zen running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.43 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI X570-A PRO driver: r8169 v: kernel port: d000
    bus-ID: 27:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp39s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Broadcom BCM20702A0 Bluetooth 4.0 type: USB driver: btusb v: 0.8
    bus-ID: 3-6.4:4 chip-ID: 0a5c:21e8 class-ID: fe01 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 6.38 TiB used: 345.48 GiB (5.3%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO Plus 2TB size: 1.82 TiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 34.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:5 vendor: Samsung
    model: SSD 970 EVO 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: 2B2QEXE7 temp: 31.9 C scheme: MBR
  ID-3: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 850 PRO 512GB
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 2B6Q scheme: MBR
  ID-4: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD4000FYYZ-01UL1B2 size: 3.64 TiB block-size: physical: 512 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: 1K03 scheme: MBR
Partition:
  ID-1: / raw-size: 431.26 GiB size: 431.26 GiB (100.00%)
    used: 345.48 GiB (80.1%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:6
  ID-2: /home raw-size: 431.26 GiB size: 431.26 GiB (100.00%)
    used: 345.48 GiB (80.1%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:6
  ID-3: /var/log raw-size: 431.26 GiB size: 431.26 GiB (100.00%)
    used: 345.48 GiB (80.1%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:6
  ID-4: /var/tmp raw-size: 431.26 GiB size: 431.26 GiB (100.00%)
    used: 345.48 GiB (80.1%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:6
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 34.5 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-2: swap-2 type: zram size: 31.36 GiB used: 4.5 MiB (0.0%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 51 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 4%
Info:
  Processes: 319 Uptime: 58m wakeups: 0 Memory: 31.36 GiB
  used: 3.49 GiB (11.1%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.1.0 Packages: pacman: 1831 lib: 455 Shell: fish v: 3.3.1
  default: Bash v: 5.1.16 running-in: alacritty inxi: 3.3.12

Found the fix in the Nvidia Drivers:

sudo nvidia-settings
  1. Configure the Monitors as a single X screen configuration under X server display configuration.
  2. Enable Force full composition pipeline on each monitor under the advanced options.
1 Like

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