Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

After 713c166, output disconnection/reconnection doesn't work reliably #2499

Closed
luispabon opened this issue Nov 26, 2020 · 5 comments · Fixed by #2503
Closed

After 713c166, output disconnection/reconnection doesn't work reliably #2499

luispabon opened this issue Nov 26, 2020 · 5 comments · Fixed by #2503

Comments

@luispabon
Copy link

After updating past 713c166, sway seems to have trouble knowing when outputs have been disconnected or reconnected. I'm attaching a debug log of a sway session where:

  • Start sway
  • Open two terminals on different workspaces in different outputs
  • Disconnect my thunderbolt dock (2 displays on it, one on vga and another on hdmi): at this point, sway does not react to the disconnection. The workspace with the second terminal is still in a display that's not connected anymore. get_outputs still reports all 3 displays connected
  • Reconnect the dock: displays do not get reactivated

sway log: https://paste.ubuntu.com/p/HXMt3c8mVC/
get_outputs: https://paste.ubuntu.com/p/9yQPkrBPsV/

uname -a:

Linux luis-XPS-15-9560 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

i7-7700HQ & intel graphics hd630

wlroots: 6485fad
sway: sway version 1.5-32b93ef6 (Nov 26 2020, branch 'master')

Rolling back my wlroots version to 154fe86 fixes the issue for me.

@emersion
Copy link
Member

00:00:12.133 [ERROR] [backend/drm/atomic.c:36] DP-9: Atomic commit failed (pageflip): Invalid argument

Can you obtain DRM debug logs? See https://github.com/swaywm/wlroots/wiki/DRM-Debugging

@luispabon
Copy link
Author

luispabon commented Nov 26, 2020

Of course:

dmesg: https://paste.ubuntu.com/p/srPqWBh6Jr/
sway.log: https://paste.ubuntu.com/p/WmBxZsnZpm/

Start sway, wait a few seconds for it to settle, disconnect thunderbolt dock, wait a few seconds for it to settle, reconnect, wait a few seconds for it to settle and log out of sway when it became apparent the displays weren't coming back.

@luispabon
Copy link
Author

Another thing to note. If I use just the HDMI display and I connect it straight into the connector on the laptop the issue does not happen.

@synaptiko
Copy link

I also started having troubles after 713c166

My external monitor is connected over HDMI over USB-C dock. Its highest resolution is 2560x1440. Previously it worked fine but after that commit, I only get 1920x1080 resolution.

I followed the suggestion to use echo detect | sudo tee /sys/class/drm/card0-DP-1/status and it fixed it, I have it in my zlogin file before I start sway but it's a bit annoying as I either need to provide my password twice or I need to update sudoerrs to not require password for this command.

emersion added a commit to emersion/wlroots that referenced this issue Nov 30, 2020
This reverts commit 713c166.

It turns out we do need to force-probe on startup and on hotplug [1].
This is unfortunate, but that's just how the uAPI works. Fixing this
would require patching the kernel.

[1]: https://lists.freedesktop.org/archives/dri-devel/2020-November/289506.html

Closes: swaywm#2499
emersion added a commit that referenced this issue Dec 1, 2020
This reverts commit 713c166.

It turns out we do need to force-probe on startup and on hotplug [1].
This is unfortunate, but that's just how the uAPI works. Fixing this
would require patching the kernel.

[1]: https://lists.freedesktop.org/archives/dri-devel/2020-November/289506.html

Closes: #2499
@luispabon
Copy link
Author

Thank you 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants