swaywm / wlroots

A modular Wayland compositor library
https://gitlab.freedesktop.org/wlroots/wlroots/
MIT License
2.15k stars 342 forks source link

"Atomic commit failed" when resolution is too high #1866

Open bhearsum opened 4 years ago

bhearsum commented 4 years ago

When I try to use all of my displays at their full resolutions (3840x2160, 2560x1440, 3840x2160) I get the following error:

2019-10-21 11:39:07 - [backend/drm/drm.c:503] Starting renderer on output 'DP-4'
2019-10-21 11:39:07 - [backend/drm/atomic.c:56] DP-4: Atomic commit failed (modeset): No space left on device
2019-10-21 11:39:07 - [backend/drm/drm.c:950] DP-4: Retrying pageflip

...and I end up with one display that will only render a cursor, while the others operate as expected.

If I drop the resolution of one of the 3840x2160 displays to 2560x1440, everything works fine with no errors.

The hardware is an X1 Carbon with a built-in Intel adapter (512M of vram per the BIOS), and both 3840x2160 displays are going through USB-C, if any of that matters.


wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1866

ascent12 commented 4 years ago

I think this is a hardware limitation. There is only so much memory bandwidth we can use on that hardware, and I'm sure two 2160p monitors and a 1440p monitor goes over it. Does weston or X11 operate correctly at these resolutions?

We can definitely do better to gracefully fallback in these kinds of situations, though.

emersion commented 4 years ago

Possibly related to modifiers hitting the bw limit.

bhearsum commented 4 years ago

I think this is a hardware limitation. There is only so much memory bandwidth we can use on that hardware, and I'm sure two 2160p monitors and a 1440p monitor goes over it. Does weston or X11 operate correctly at these resolutions?

We can definitely do better to gracefully fallback in these kinds of situations, though.

Haven't tried weston, and X doesn't allow for more than 8192 pixels on one axis, so I'm not sure.

If I can find something with more vram to test with, would that verify it?

progandy commented 4 years ago

and X doesn't allow for more than 8192 pixels on one axis, so I'm not sure.

Then arrange one screen above or below the other two?

ossimoi commented 3 years ago

X1 Carbon 5th gen here. Intel HD 620. Running three monitor setup, internal (2560x1440) and two external (2560x1440 + 3840x2160).

There seems to be issues when both external monitors are connected through a dock. If I move the 4K display from dock to laptops HDMI port, then it works even when the other display is set to 120Hz.

eDP-1: 2560x1440@60Hz DP-4: 2560x1440@120Hz HDMI-A-1: 3840x2160@24Hz

Moving the 4K display from HDMI to DP (dock) gives atomic commit failed (no space left on device), lowering primary monitors refresh rate from 120 to 60 has no effect. Also tried this on latest Ubuntu live and it seems to work without problems through the dock so it shouldn't be hardware limitation.

DRM debug logs

emersion commented 3 years ago

Your log contains

[  510.647397] i915 0000:00:02.0: [drm:skl_allocate_pipe_ddb [i915]] Requested display configuration exceeds system DDB limitations
[  510.647405] i915 0000:00:02.0: [drm:skl_allocate_pipe_ddb [i915]] minimum required 322/264

which means the driver says it's a hw limitation. Have you tried WLR_DRM_NO_MODIFIERS=1?

ossimoi commented 3 years ago

Yes, WLR_DRM_NO_MODIFIERS=1 has no effect.

I've also tried with 512MB vram and disabling eDP-1 entirely and running only two monitors but still no go.

emersion commented 3 years ago

Hm. Actually, the DDB limitations line is a red herring: wlroots tries to use modifiers, but then properly falls back to no modifiers.

The actually interesting line is:

[  510.768108] [drm:drm_dp_mst_atomic_check] [MST PORT:00000000a5e72ee8] requires 22 vcpi slots
[  510.768109] [drm:drm_dp_mst_atomic_check] [MST PORT:00000000e41cb89d] requires 47 vcpi slots
[  510.768110] [drm:drm_dp_mst_atomic_check] [MST PORT:00000000e41cb89d] not enough VCPI slots in mst state 0000000075bdddf9 (avail=41)
[  510.768126] i915 0000:00:02.0: [drm:intel_dump_pipe_config [i915]] [CRTC:93:pipe C] enable: yes [failed]

So it sounds like your DP-MST setup doesn't support this configuration.