Closed alex-courtis closed 1 year ago
Attaching another log with this problem, this time with debug flag enabled.
Opened lid immediately after disconnecting laptop (few seconds max), and for some amount of time, I am unable to even switch to non-graphical console (ctrl+alt+F2), it seems the laptop is completely hung. However, after repeated trying, I am able to switch to console, and from then, switching works every time. There have also been instances when I am unable to switch back at all. Process list indicates way-displays as well as Sway is running. Log ends when I kill Sway process manually. way-displays.debug.unplug-closed.log
Another different scenario, simulating normal day-to-day workflow with laptop/dock operation. I have been able to repeat this twice.
Start with freshly launched Sway/way-displays, laptop unplugged, lid open.
s2idle
suspend)s2idle
at this point.Opened lid immediately after disconnecting laptop
That's fantastic - exactly what I was after!
[15:08:26] eDP-1 Changing:
is the key: we are not getting any response for that operation until [15:08:38] [src/listener_output_configuration.c:51] Output Configuration cancelled 0xb5e
which occurs after the unplug of the external displays. It may be a sway/wlroots failure which results in the response not being sent.
This can be worked around / fixed but will require some thought. See #38
2. However, the closed laptop display seems to still be active
That can be fixed now: incoming. The event logging shows that changes may be aggressively retried following a cancellation.
4. Looking at the log, it seems that when laptop wakes after opening the lid, way-displays detects the lid open event, but still consider the (now long gone) external displays to be attached, and attempts to rearrange them, only later registering the "Departed" events.
The delayed processing until the lid is opened will be resolved with the above fix.
The arrive/depart/arrive is "normal" finnicky monitor behaviour. That is not a problem however the failure during that behaviour is, and will be investigated/fixed. #39
Fix: aggressively retry after cancellation, as there are no other update/change events in flight. If there are, subsequent retries will handle the situation, as they will operate on the updated information.
This seems to be fixed.
Laptop display is off. Plugging other displays does nothing. User can successfully switch to a console however the compositor session remains off when switched to.
Possible sway/wlroots issue. #31 with some automation may be a solution.
See https://github.com/alex-courtis/way-displays/issues/33#issuecomment-1093960493 for logs.