Conversation
dpPreModeset() returns early when the sink is not plugged or detection is in progress. That also drops head detaches, which do not need the sink. When a monitor switches to another input, HPD drops, the client shuts the head down, and the DP library never sees the detach. The group stays marked as head-attached. On the next attach after the monitor switches back, trainLinkOptimized() tries to enter flush mode for a head that is no longer active. NVC370_CTRL_CMD_SET_SOR_FLUSH_MODE fails, link training is skipped, and DSC is never enabled on the sink. The source then sends a DSC/FEC stream the sink cannot decode, which leaves the screen black while link-status stays Good. Only gate attaches on detection state and HPD, and let notifyDetachBegin and notifyDetachEnd run whenever the connector is active, as in 610.57.04. Log when an attach is skipped instead of relying on a DP_ASSERT that is compiled out in release builds.
|
Hi FYI I was having issues with my PC going to sleep too 5070 ti, 9900X, 870 mobo, and I tried using your build but I was still getting into an unrecoverable state if I suspended to s3, granted that my case may be a bit different but your description looks almost exactly same wrt what was happening to me @HiroGitea |
|
@MadoScientist97 thanks for trying it. S3 goes through a different path, so I don't think this PR can fix that. On suspend, The case this PR fixes is the monitor dropping HPD while the system stays up: input switch, monitor power off/on, and possibly DPMS sleep on some monitors. If you can, could you check whether those recover on this build? For the S3 problem, a separate issue would be easier to track. It would help to know whether it's a black screen with a moving cursor or a full freeze, plus |
Fixes #1405.
ConnectorImpl::dpPreModeset()(new in 615.x) returns early when the sink is unplugged or detection is in progress. That also drops head detaches, which do not need the sink. When a monitor switches to another input, HPD drops and the client shuts the head down, but the DP library never sees the detach and keeps the group marked as head-attached.On the next attach,
trainLinkOptimized()tries to enter flush mode for a head that is no longer active.NVC370_CTRL_CMD_SET_SOR_FLUSH_MODEfails, link training is skipped silently, and DSC is never enabled on the sink. The screen stays black whilelink-statusstays Good.Change
dpPreModeset(): gate only attaches on detection state / HPD; detach heads still go throughnotifyDetachBegin/notifyDetachEnd(610.57.04 behavior). A skipped attach is logged withDP_PRINTF(DP_WARNING, ...)instead of aDP_ASSERTthat is compiled out in release builds.notifyDetachBegin()/notifyDetachEnd()inConnectorImplandConnectorImpl2x: only checkconnectorActive.Testing
RTX 5070 Ti, 615.71.09
nvidia-modeset.korebuilt from this branch, KWin Wayland, 3840x2160@160 Hz with DSC + FEC. Monitor input switch and monitor power cycle both recover automatically; on the stock module every input switch leaves the screen black until a manual modeset. Logs before/after are in #1405.