I am trying to use a GeForce RTX 4070 Ti (AD104) with my Dell UP3218K monitor on Linux (NixOS 25.11):
This monitor uses 2 DisplayPort cables and internally consists of two tiles (3840x4320px each). This is similar to the popular LG 5K displays.
With i3 on X11, I have no trouble with this monitor: I can use it in the full native resolution of 7680x4320 (see the linked article for details if you’re curious).
But when using a wlroots-based Wayland compositor like sway (with the https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4154 patch to support the TILE property), I encountered a weird bug: the right half my monitor would stay black.
When using GNOME, which has a different Wayland compositor implementation, both tiles of the monitor work, but I have noticeable tearing between the tiles. (This should be fixed with https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4771 ).
I tracked down the problem to the following (with assistance from Claude Code Opus 4.5, so please forgive any inaccuracies; I did my best to verify all findings over a two-day debugging session): Apparently, the NVIDIA display engine shows only black pixels when scanning out from block-linear buffers at position SRC_X >= mode_width.
To understand, let’s first consider how sway sets up the scene graph:
┌─────────────────────────────────────────────────────────────────┐
│ COMPOSITOR'S SCENE │
│ ┌──────────┐ ┌──────────┐ │
│ │ Window A │ │ Window B │ │
│ └──────────┘ └──────────┘ │
│ ┌──────────┐ │
│ │ Window C │ │
│ │(spans │ │
│ │ both) │ │
│ └──────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
│ RENDER ONCE
▼
┌─────────────────────────────────────────────────────────────────┐
│ SHARED BUFFER (7680px wide) │
│ ┌──────────┐ │ ┌──────────┐ │
│ │ Window A │ │ │ Window B │ │
│ └──────────┘ │ └──────────┘ │
│ ┌────────┼────────┐ │
│ │ Window │ C │ │
│ │ │ │ │
│ └────────┼────────┘ │
│ x=0 x=3840 │ x=7680 │
└─────────────────────────────────────────────────────────────────┘
│ │
│ crop x=0..3839 │ crop x=3840..7679
▼ ▼
┌─────────────────────────┐ ┌─────────────────────────┐
│ DRM CONNECTOR │ │ DRM CONNECTOR │
│ (DP-2) │ │ (DP-3) │
│ SRC_X = 0 │ │ SRC_X = 3840 !!! │
│ SRC_Y = 0 │ │ SRC_Y = 0 │
└─────────────────────────┘ └─────────────────────────┘
│ │
▼ ▼
┌─────────┐ ┌─────────┐
│ LEFT │ │ RIGHT │ <-- BLACK!
│ TILE │ │ TILE │
└─────────┘ └─────────┘
When changing the SRC_X of the right tile to 0, I do see the contents of the left tile replicated on my monitor’s right half, so displaying things works in general. When I grab a screenshot using grim, I can see the right half being rendered, but not displayed.
I ultimately narrowed it down to a minimal reproducer program which is independent of sway/wlroots and directly uses DRM/KMS atomic modesetting to reproduce the problem through nvidia-drm.
I attached the reproducer (nvidia-scanout-bug.c, see comment for how to run) and also a version for intel GPUs (only difference is the LINEAR modifier instead of block-linear).
I have attached two video recordings of the reproducer program, the first one (2025-12-23-nvidia-reproducer.MOV) recorded when booted with the 4K monitor connected to the NVIDIA card. You can see the screen start red, then red+black, then black.
The second recording (2025-12-23-intel-reproducer.MOV) shows the expected behavior: the screen starts red, then red+green, then green.
Could an NVIDIA engineer please take a look at where this limitation / bug comes from? This would unblock tiled monitor support for users of wlroots based compositors (e.g. sway, hyprland, wayfire, …) who use NVIDIA graphics cards.
Thank you very much in advance!
nvidia-scanout-bug.c.gz (3.9 KB)
intel-scanout-test.c.gz (3.6 KB)