diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 86b52c684..702fd5456 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1847,6 +1847,14 @@ void scan_drm_connectors(struct wlr_drm_backend *drm, drm_conn->connection != DRM_MODE_CONNECTED) { wlr_log(WLR_INFO, "'%s' disconnected", wlr_conn->name); disconnect_drm_connector(wlr_conn); + } else if (wlr_conn->status == DRM_MODE_CONNECTED && + drm_conn->connection == DRM_MODE_CONNECTED + && wlr_conn->props.hotplug_mode_update > 0) + { + wlr_log(WLR_INFO, "'%s' reconnected", wlr_conn->name); + disconnect_drm_connector(wlr_conn); + connect_drm_connector(wlr_conn, drm_conn); + new_outputs[new_outputs_len++] = wlr_conn; } drmModeFreeConnector(drm_conn); diff --git a/backend/drm/properties.c b/backend/drm/properties.c index 314023954..effe079aa 100644 --- a/backend/drm/properties.c +++ b/backend/drm/properties.c @@ -28,6 +28,7 @@ static const struct prop_info connector_info[] = { { "HDR_OUTPUT_METADATA", INDEX(hdr_output_metadata) }, { "PATH", INDEX(path) }, { "content type", INDEX(content_type) }, + { "hotplug_mode_update", INDEX(hotplug_mode_update) }, { "link-status", INDEX(link_status) }, { "max bpc", INDEX(max_bpc) }, { "non-desktop", INDEX(non_desktop) }, diff --git a/include/backend/drm/properties.h b/include/backend/drm/properties.h index c02d655ba..00d385733 100644 --- a/include/backend/drm/properties.h +++ b/include/backend/drm/properties.h @@ -22,6 +22,7 @@ struct wlr_drm_connector_props { uint32_t panel_orientation; // not guaranteed to exist uint32_t content_type; // not guaranteed to exist uint32_t max_bpc; // not guaranteed to exist + uint32_t hotplug_mode_update; // not guaranteed to exist, VMs only // atomic-modesetting only