swaywm / wlroots

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

Re-allocate buffers for currently enabled outputs on EINVAL #1873

Open emersion opened 5 years ago

emersion commented 5 years ago

Right now we allocate output buffers with modifiers, and fallback to no modifiers when that fails. With global bandwidth limitations (like on Intel), it's possible that on hotplug we need to de-allocate buffers for currently enabled outputs and re-allocate them without the faulty modifier to be able to enable the new output.

This is only a theoretical issue right now, would be nice to see if it happens in practice. It does. The typical error message is:

[22975.180772] [drm:skl_allocate_pipe_ddb [i915]] Requested display configuration exceeds system DDB limitations
[22975.180782] [drm:skl_allocate_pipe_ddb [i915]] minimum required 482/425

There exists a workaround: disable modifiers globally with WLR_DRM_NO_MODIFIERS=1.

References: https://github.com/swaywm/wlroots/issues/1852 References: https://github.com/swaywm/wlroots/issues/1877


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

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

KenMacD commented 3 years ago

To add more to the workaround list with this issue, here's steps I take to make two external monitors work:

This works most of the time. When it doesn't there will be one monitor which doesn't show up in wdisplays even though it has some output still being displayed. Some combination of unchecking Enabled usually works in that case.

Although my monitors often show up as DP-3 and DP-4 they're not consistent, so I've given up trying to get an output DP-X position config to work (I've seen up to DP-7).

Also of note, some games (and maybe apps) do not display correctly if there is no monitor at position 0,0. When the external monitors are unplugged eDP-1 is not automatically moved to position 0,0 so I use wdisplays to move it back to this locations.

WhyNotHugo commented 3 years ago

I've had this issue happen again even with WLR_DRM_NO_MODIFIERS=1.

I switched to a VT, and used swaymsg to inspect the running sway instance. It only lists the built-in monitor (as expected), but activating it yields the same error again.

emersion commented 3 years ago

even with WLR_DRM_NO_MODIFIERS=1

Likely a separate issue then. Please open a separate bug report with new Sway + DRM logs.