Open JordanL2 opened 3 years ago
Weird, we get unplug signals from DRM right after doing the modesets.
Yeah, that normally happens for me for some reason but then it immediately reconnects. But now it's not reconnecting either. The backed-out wlroots change that stopped force-probing connectors (https://github.com/swaywm/wlroots/commit/713c1661b742f93a7d2167321837c0d99541ca87) stopped the disconnect/reconnect happening.
So it didn't work before 713c166?
I don't think we can do much about this. Please report a kernel bug for the driver you're using.
It "worked" in that the monitors would reconnect again after disconnecting, that patch stopped it disconnecting at all.
I raised a kernel bug a few weeks ago, no activity yet. (https://bugzilla.kernel.org/show_bug.cgi?id=210429)
Does running drm_info
fix it?
I raised a kernel bug a few weeks ago, no activity yet. (https://bugzilla.kernel.org/show_bug.cgi?id=210429)
The kernel bugzilla is not and unfortunately was never used by the AMD DRM people, they used the freedesktop bugzilla before switching over to gitlab, please re-raise your issue there.
Does running
drm_info
fix it?
Do you mean running it after wakeup while the screens are still disconnected? It didn't fix it, I left it running in a loop in a terminal.
I raised a kernel bug a few weeks ago, no activity yet. (https://bugzilla.kernel.org/show_bug.cgi?id=210429)
The kernel bugzilla is not and unfortunately was never used by the AMD DRM people, they used the freedesktop bugzilla before switching over to gitlab, please re-raise your issue there.
Oh thank you, will raise it there.
Do you mean running it after wakeup while the screens are still disconnected? It didn't fix it, I left it running in a loop in a terminal.
OK. Does it show the connectors as being disconnected as well, or connected?
Connected.
OK, not detecting the monitors as connected really sounds like a wlroots bug. If I had to guess, probably caused by https://github.com/swaywm/wlroots/pull/2531.
Since I can't reproduce locally, I can't easily figure out what's going on. Can you provide full debug logs as a start?
Sure, logs starting from boot? Setting Wayfire to debug produces all possibly logs, right? There's no environment var or something for wlroots debug logs?
logs starting from boot?
Logs starting from when your compositor is launched.
Setting Wayfire to debug produces all possibly logs, right? There's no environment var or something for wlroots debug logs?
Yeah, I think so.
This is odd, I started wayfire with -d and redirected all output to this log file, and now I'm not seeing the backend/drm logs saying the output is disconnected.
EDIT: The actual behaviour is the same though.
Exactly the same steps, but now the backend/drm logs are saying the outputs are disconnected. Looking at the wayfire logs it really looks like wlroots actually saw the outputs as connected in the first logs - but the behaviour was the same, the screens were still off.
Can you pull the latest wlroots commit, apply this patch, and post debug logs again?
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index d1e6cc5da33e..94eda49d6051 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1290,6 +1290,8 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
seen[index] = true;
}
+ wlr_log(WLR_DEBUG, "DEBUG %s: drm_state=%d wlr_state=%d", wlr_conn->name, drm_conn->connection, wlr_conn->state);
+
if (curr_enc) {
for (size_t i = 0; i < drm->num_crtcs; ++i) {
if (drm->crtcs[i].id == curr_enc->crtc_id) {
(Also, please try git-bisect to figure out the exact commit causing issues.)
Will do. Yesterday when testing, I had it disconnect and then successfully reconnect the outputs after DPMS twice, and then fail to reconnect on the third time. So, this is pretty random, seems there's three things that can happen.
Reproduced with the debug line. Sleep occurs at 13:02:02, wakeup at 13:02:14.
Also, I've found a pattern. The wakeup works perfectly if I have no windows open. Only if I have one or more windows open does this issue happen. I wonder if this is anything to do with Wayfire creating a NOOP output to move windows to when there are no outputs.
EDIT: wayfire-logs-3.txt
Logs when DPMS happens when no windows open, for comparison. Sleep occurs at 13:11:50, wakeup at 13:12:04. The outputs disconnect after wakeup, but then reconnect.
Finished bisecting, apparently the first bad commit is this:
https://github.com/swaywm/wlroots/commit/768131e4883ed8b04ced6b453721fc28dbf61577
EDIT: I just took the latest master and re-added this line back into types/wlr_output.c
and it works now:
output->frame_pending = true;
Hm, thanks, that's definitely helpful. That's pretty weird because at this revision, wlr_output_init
is only executed when the connector is found the first time, not when it's connected/disconnected. So this doesn't really make sense to me.
Since getting new monitors this issue is no longer reproducible, so it seems to be an issue specific to a quirk of the model of monitors I had previously (which I bought in 2015). Since it only apparently affected me and I can no longer reproduce it I guess this issue could be closed.
Since getting new monitors this issue is no longer reproducible, so it seems to be an issue specific to a quirk of the model of monitors I had previously (which I bought in 2015). Since it only apparently affected me and I can no longer reproduce it I guess this issue could be closed.
This sounds very strange, however, there is an upstream bug in Qt so yes, we could close this.
Sorry, I thought this was about a Wayfire issue, not a wlroots one :) not sure what we should do here.
Not sure if this is related. I run the latest git versions of wayfire and wlroots and when I manually turned off the monitor, and then turned it back on later, the monitor powered up, but was in a disconnected state, keyboard effectively dead. I managed to ssh into the box and went to /sys/class/drm/
Just another person to ack that it works with "output->frame_pending = true;" being added back.
GPU: AMD Vega 64 Displays: 2x4k connected by DisplayPort 1.2 Distro: Arch Kernel: 5.4.85-1-lts Mesa: 20.3.1-1
Using wlroots master branch, and Wayfire master branch. This issue is most likely due to a commit to wlroots in the last week, as I can reproduce it with wayfire code that hasn't been updated in the last week. The last time I updated wlroots prior to today (when I first saw this bug) was (I think) 12-DEC. I've also updated the kernel and mesa though.
When my monitors are switched off due to DPMS, and I try waking them up, they now do not switch back on. At this point rebooting is the only option.
This is what I see in the logs from when it goes to sleep (wake up is at 15:46:54). I should mention, normally when my monitors wake up from DPMS they actually immediately reconnect. It seems they just disconnect now.
wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2567