Repository navigation
fix: run Hyprland and COSMIC on hybrid NVIDIA hosts and stop leaking Weston - #155
Conversation
…Weston On a host with Intel and NVIDIA GPUs, Hyprland's private KWin renderer opened the NVIDIA render node, whose GBM cannot allocate Hyprland's buffers, so the output never got a mode. That renderer now runs in a bubblewrap namespace that exposes only the other GPU's render node. Single-vendor hosts are unchanged. COSMIC's software-rendered Weston parent, compositor and XWayland now load only Mesa's EGL vendor; NVIDIA's EGL made XWayland crash at startup. COSMIC's Weston parent outlived a failed start or a killed daemon: bwrap's --die-with-parent does not stop the sandboxed process without a PID namespace. The parent now gets one, and shutdown signals its whole process group.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 987192c1-3183-41f1-aea1-91101945d88e) |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Self-review at 57f2111. Scope is limited to the Hyprland parent renderer and the COSMIC parent/compositor/XWayland. The node filter only applies when an accessible NVIDIA render node and another accessible render node both exist; otherwise the command is unchanged. The Mesa vendor pin is skipped when Mesa's vendor file is missing. --unshare-pid is added only to the Weston parent; cosmic-comp keeps the host PID view it needs for client credentials and exits with its guard socket. Shutdown now matches the group-signal pattern used by Hyprland and the private session. Validation is listed in the PR body. |
There was a problem hiding this comment.
This is an auto review done by revuto.
COSMIC startup failure can leave shutdown signalling an unreserved process-group ID, risking termination of unrelated host processes.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: fb2f4983-cb3c-4a55-8943-f823e723aeb8) |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
This is an auto review done by revuto.
Revuto completed the review and found no evidence-backed concerns.
Hyprland and COSMIC failed to start on a laptop with Intel and NVIDIA GPUs. COSMIC also left its Weston parent running after a failed start or a killed daemon.
/dev/dri. Single-vendor hosts are unchanged.libnvidia-egl-gbm. The Weston parent, cosmic-comp and XWayland now load only Mesa's EGL vendor when its file exists.--die-with-parentdoes not stop the sandboxed process without a PID namespace (checked on kernel 7.0: SIGTERM and SIGKILL of bwrap both leave it running). The Weston parent now gets--unshare-pid, and shutdown signals its process group. The leaked Weston also kept the host GPU lock descriptor.Validation on the hybrid host (Intel + RTX 5090):
Note
Medium Risk
Touches compositor spawn/teardown, bubblewrap sandboxes, and DRM/EGL vendor selection on session start and shutdown; wrong GPU or signal handling could break workspaces or leave orphan processes.
Overview
Fixes Hyprland and COSMIC on hybrid Intel/NVIDIA laptops and stops COSMIC’s Weston parent from surviving daemon crashes.
Hyprland: When both NVIDIA and another GPU are present, the private KWin virtual renderer now runs under bubblewrap with
/dev/drilimited to the non-NVIDIA render node, so buffer allocation does not land on NVIDIA GBM (which cannot satisfy Hyprland). Single-GPU-vendor hosts are unchanged; bwrap becomes required on hybrid NVIDIA setups.COSMIC: Shared
use_mesa_eglsets__EGL_VENDOR_LIBRARY_FILENAMESto Mesa’s vendor file (when installed) for the Weston parent, cosmic-comp, and authenticated XWayland, avoiding glvnd picking NVIDIA EGL. The Weston bwrap sandbox adds--unshare-pidso--die-with-parentactually tears down Weston; startup/shutdown useunreaped_exitand process-group SIGTERM/SIGKILL so leaked Weston and GPU locks do not persist after a killed daemon.Reviewed by Cursor Bugbot for commit fe7ca98. Configure here.