sway: Plugging in an external monitor causes all clients to exit

Steps to reproduce:

  • Start sway.
  • Plug in external monitor.
  • After a few seconds, both internal & external monitors show a gray background.
  • Reloading the sway config (cmd + shift + c for me) causes swaybar to show up again.
  • All apps have exited.

This is probably something related to restarting xwayland. If I have no apps running, hotplugging monitors works fine (swaybar stays running). If I have a few apps running (such as gnome-terminal), it happens almost 100% of the time.

  • Sway Version:

sway version 1.0-rc1-36-gf00fbe68 (Feb 7 2019, branch 'master')

  • Debug Log:

This gist contains two logs of the bug. One with verbose logging and one with debug logging.: https://gist.github.com/ggreer/120d530e5b034dcac6fd1f87878ea89e

  • Configuration File:

https://github.com/ggreer/dotfiles/blob/master/home/.config/sway/config

Lastly, this used to not be a problem with an earlier version of sway + wlroots. I’m pretty sure the version of both from January 14th worked fine for me on the same hardware.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (17 by maintainers)

Commits related to this issue

Most upvoted comments

I’m able to reproduce this reliably by having a Chamelium device simulate a bad DisplayPort link and trigger a link training failure. dmesg shows:

[141069.674604] [drm:intel_dp_get_link_train_fallback_values [i915]] *ERROR* Link Training Unsuccessful

and all sway clients exit. I believe the driver triggers one hotplug event to advertise the connection, then another to prune modes.