Xorg multi-monitor setup truncated at 16384 pixels

Bug #2017323 reported by Eugene Kim
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Opinion
Undecided
Unassigned
mutter (Ubuntu)
Invalid
Low
Unassigned
xorg-server (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I have three monitors arranged horizontally left-to-right, with fractional scaling enabled in Xorg mode (not Wayland):

#1: laptop, 3840x2400 native, scaled at 225%
#2: external monitor 1, 3840x2160 native, scaled at 150% (main display)
#3: external monitor 2, 3840x2160 native, scaled at 150%

In this setup, a little more than half of the rightmost monitor is truncated black.

I suspect it is caused by oversampled screens (fractional scaling) not fitting into the maximum framebuffer size of 16384x16384, as evidenced by the following xrandr(1):

$ xrandr | awk '/^[^ ]/ && $2 != "disconnected"'
Screen 0: minimum 320 x 200, current 16384 x 4320, maximum 16384 x 16384
eDP-1 connected 5112x3195+0+0 (normal left inverted right x axis y axis) 366mm x 229mm
DP-2 connected primary 7680x4320+5112+0 (normal left inverted right x axis y axis) 597mm x 336mm
DP-3 connected 7680x4320+12792+0 (normal left inverted right x axis y axis) 597mm x 336mm

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: xserver-xorg 1:7.7+23ubuntu2
ProcVersionSignature: Ubuntu 6.2.0-20.20-generic 6.2.6
Uname: Linux 6.2.0-20-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia zfs zunicode zavl icp zcommon znvpair
.proc.driver.nvidia.capabilities.gpu0: Error: path was not a regular file.
.proc.driver.nvidia.capabilities.mig: Error: path was not a regular file.
.proc.driver.nvidia.gpus.0000.01.00.0: Error: path was not a regular file.
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.suspend: suspend hibernate resume
.proc.driver.nvidia.suspend_depth: default modeset uvm
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 525.105.17 Tue Mar 28 18:02:59 UTC 2023
 GCC version:
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 21 18:51:29 2023
DistUpgraded: 2023-04-20 13:31:05,017 DEBUG Running PostInstallScript: '/usr/lib/ubuntu-advantage/upgrade_lts_contract.py'
DistroCodename: lunar
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, including running git bisection searches
GraphicsCard:
 Intel Corporation Alder Lake-P Integrated Graphics Controller [8086:46a6] (rev 0c) (prog-if 00 [VGA controller])
   Subsystem: Dell Alder Lake-P Integrated Graphics Controller [1028:0aff]
 NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2520] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Dell GA106M [GeForce RTX 3060 Mobile / Max-Q] [1028:0aff]
MachineType: Dell Inc. XPS 17 9720
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 XDG_RUNTIME_DIR=<set>
ProcKernelCmdLine: BOOT_IMAGE=/BOOT/ubuntu_bm2y56@/vmlinuz-6.2.0-20-generic root=ZFS=rpool/ROOT/ubuntu_bm2y56 ro init_on_alloc=0 i915.enable_psr2_sel_fetch=0
SourcePackage: xorg
UpgradeStatus: Upgraded to lunar on 2023-04-20 (1 days ago)
dmi.bios.date: 03/20/2023
dmi.bios.release: 1.15
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.15.1
dmi.board.name: 0W7GHH
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.15.1:bd03/20/2023:br1.15:svnDellInc.:pnXPS179720:pvr:rvnDellInc.:rn0W7GHH:rvrA00:cvnDellInc.:ct10:cvr:sku0AFF:
dmi.product.family: XPS
dmi.product.name: XPS 17 9720
dmi.product.sku: 0AFF
dmi.sys.vendor: Dell Inc.
mtime.conffile..etc.logrotate.d.apport: 2023-01-31T20:57:54.273339
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.114-1
version.libgl1-mesa-dri: libgl1-mesa-dri 23.0.2-1ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 23.0.2-1ubuntu1
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:21.1.7-1ubuntu3
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-3
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20210115-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-2build1

Revision history for this message
Eugene Kim (karma3ek) wrote :
tags: added: xrandr-scaling
affects: xorg (Ubuntu) → mutter (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This might be related to bug 1875285 but your analysis of cropping at the 16384 boundary sounds more likely.

For other related bugs, please refer to this list:

  https://bugs.launchpad.net/ubuntu/+bugs?field.tag=xrandr-scaling

but realistically for a desktop bigger than 16K I think the only way forward is Wayland. Unfortunately Nvidia has a few problems with Wayland at the moment which is why it's not the default:

  https://bugs.launchpad.net/ubuntu/+bugs?field.tag=nvidia-wayland

Changed in mutter (Ubuntu):
importance: Undecided → Low
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please check to see if the log messages from bug 2004533 appear in your logs.

Changed in mutter (Ubuntu):
status: New → Incomplete
Revision history for this message
Eugene Kim (karma3ek) wrote :

Yes, I see those messages.

Revision history for this message
Eugene Kim (karma3ek) wrote :

I can't use Wayland yet due to an app compatibility issue: JetBrains IDEs (ex: IntelliJ) text is blurry, hurts eyes (https://youtrack.jetbrains.com/issue/IDEA-218458).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The blurry text issue is tracked in:

https://gitlab.gnome.org/GNOME/mutter/-/issues/1787
https://gitlab.gnome.org/GNOME/mutter/-/issues/2328

I hope to reattempt a fix for it this year.

Changed in mutter (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I've tracked down the origin of the 16384 limit. It's a combination of:

 * Xorg treating all monitors as a single framebuffer; and
 * The modesetting driver getting the maximum dimensions from the kernel via drmModeResPtr; and
 * The Intel kernel graphics driver limiting framebuffer sizes to 16384. This Intel limitation is unavoidable if you want to use the laptop screen as part of your desktop.

You can also see it in the log:

  modeset(0): Allocate new frame buffer 16384x...

So I have a couple of suggestions for getting around it:

 * Use a lower scaling factor or the default of 100%; or
 * Remove one monitor from the system

Changed in mutter (Ubuntu):
status: New → Invalid
Changed in xorg-server (Ubuntu):
status: New → Won't Fix
Changed in linux (Ubuntu):
status: New → Opinion
summary: - Triple 4K monitor setup with fractional scaling truncated
+ Xorg Triple 4K monitor setup with fractional scaling truncated at 16384
+ pixels
summary: - Xorg Triple 4K monitor setup with fractional scaling truncated at 16384
- pixels
+ Xorg multi-monitor setup truncated at 16384 pixels
tags: added: multimonitor
tags: added: hybrid i915 nvidia
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

mutter = Invalid because there's nothing mutter or gnome-shell is doing to cause this.

xorg-server = Won't Fix because it's legacy software and is never going to be redesigned to avoid this limitation.

linux (kernel) = Opinion because it is the source of the 16384 limitation but that might be a hardware limit so can never be improved.

Long term we're just waiting for Wayland support to be improved for the Nvidia driver:
https://bugs.launchpad.net/ubuntu/+bugs?field.tag=nvidia-wayland

I'm hopeful the main blockers will be fully resolved within a year.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If the BIOS allows you to switch to discrete graphics only (use dGPU for everything and disable the iGPU) then you would be able to use the Nvidia driver for all displays and that would avoid the bug.

Revision history for this message
Eugene Kim (karma3ek) wrote :

Thank you for your investigation and workaround! I'll see if I can disable the iGPU.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.