swaywm / wlroots

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

DRM: decide what to do with outputs missing a CRTC #1242

Open emersion opened 6 years ago

emersion commented 6 years ago

Right now, they show up as disabled without a mode (and with a zero size). However I'm not sure this is the right thing to do.

Some backends don't support a mode, so outputs without a mode can be perfectly fine outputs.

Disabled outputs can be just turned off by the user (DPMS), they just don't emit frame events, but still show up as Wayland globals.

The issue is that outputs without a CRTC show up in the output layout and are exposed as a Wayland global. Some sway clients handle this poorly, and I don't think these outputs should be visible to clients anyway.

As said before, we still want these outputs to be visible to the compositor so it can modeset them and disable other outputs depending on the user configuration.

Possible solutions:

Note that we already have special cases for outputs that have modes anyway -- because those need a modeset immediately when created.


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

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

emersion commented 6 years ago

Note that the current wl_list_empty(&output->modes) checks are a little fragile: what happens if an EDID is malformed and DRM returns zero modes?

emersion commented 3 years ago

DRM returns zero modes

This should not happen with DRM, the kernel has a list of fallback modes.

emersion commented 3 years ago
 This should not happen with DRM, the kernel has a list of fallback modes.

Correction: this does happen with DRM when the driver prunes all modes. The fallback modes are used only when the EDID is busted.