alex-courtis / way-displays

way-displays: Auto Manage Your Wayland Displays
MIT License
241 stars 12 forks source link

Layout Changes Failed After Successful Modeset #38

Closed alex-courtis closed 1 year ago

alex-courtis commented 2 years ago

G1LMQS094673 plugged into Dell 5xxx via "4K" HDMI cable. Start way-displays with sway or after. b2b31c5

G1LMQS094673 is functional, laptop display is not.

MODE:
  - NAME_DESC: Ancor Communications Inc ROG PG27AQ G1LMQS094673
    WIDTH: 3840
    HEIGHT: 2160
LOG_THRESHOLD: DEBUG

sway.1.acourtis.log way-displays.1.acourtis.log

alex-courtis commented 2 years ago

This is a sway problem.

swaymsg -t command output DP-3 mode 3840x2160@24Hz results in the same. sway.1.acourtis.smc.log

alex-courtis commented 2 years ago

When falling back after the initial unsuccessful modeset, output_create_swapchain sets the format to DRM_FORMAT_MOD_INVALID which appears incorrect. Setting to DRM_FORMAT_MOD_NONE resolves the issue.

Documented workaround: https://github.com/alex-courtis/way-displays#known-issues-with-workarounds

alex-courtis commented 2 years ago

Raised at wlroots: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3431

alex-courtis commented 1 year ago

There have been extensive way-displays rewrites of mode setting (it's now atomic), along with success/fail/cancel case handling for sway and river.

There have also been many bug fixes and updates for wlroots, sway and river around display handling.

Closing this as I can no longer reproduce any such errors.