Skip to content

backend/drm: fix multi-GPU buffer import failure during restoreAfterVT#263

Merged
vaxerski merged 2 commits intohyprwm:mainfrom
CristianoCorsi:fix-multigpu-resume
Mar 22, 2026
Merged

backend/drm: fix multi-GPU buffer import failure during restoreAfterVT#263
vaxerski merged 2 commits intohyprwm:mainfrom
CristianoCorsi:fix-multigpu-resume

Conversation

@CristianoCorsi
Copy link
Copy Markdown
Contributor

Description:
Fixes an issue on hybrid multi-GPU setups (e.g. Intel iGPU + NVIDIA dGPU) where the internal display remains black/frozen after resuming from suspend (S3).

Root Cause:
During restoreAfterVT(), the code attempts to take STATE.buffer and directly import it into KMS via CDRMFB::create. On a multi-GPU setup, STATE.buffer might be allocated on the primary GPU (e.g., an NVIDIA GBM buffer with BLOCK_LINEAR_2D). Attempting to import this directly into the secondary GPU's DRM backend (Intel KMS) fails because the modifiers are incompatible.
Because restoreAfterVT() bypasses the standard multi-GPU blit pipeline, the secondary display completely fails to restore its mode.

Fix:
We now check if (!shouldBlit()) before attempting the direct KMS import.
If the backend requires blitting (it's a secondary GPU), we skip the direct import and add the connector to noMode. This forces the compositor to emit a state event and correctly re-render the frame through the EGL blit pipeline, successfully restoring the display.

Nosamdaman and others added 2 commits March 5, 2026 20:06
I've tested DPMS and different monitor modes with this change, and
everything seems to be working exactly as expected.
@vaxerski vaxerski merged commit f62a4db into hyprwm:main Mar 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants