feat: add driver conflict group resolution for multi-GPU systems#255
Merged
Conversation
When a system has multiple NVIDIA GPUs requiring incompatible driver branches (e.g. GTX 1080 needing nvidia-580xx + RTX 5080 needing nvidia-open), chwd previously tried to install both, causing package conflicts since only one nvidia kernel module can be loaded at a time. Introduce a generic `driver_conflict_group` profile field. Profiles sharing the same group are mutually exclusive - only one may be installed system-wide. For NVIDIA, all proprietary driver profiles (nvidia-open-dkms, nvidia-dkms-580xx, nvidia-dkms-470xx) share the "nvidia" conflict group. Resolution logic: - Single device in group: use its best profile - Multiple devices, common driver exists: use the highest-priority profile that matches ALL devices (e.g. RTX 2060 + RTX 5080 both get nvidia-open-dkms) - Multiple devices, no common driver: install for the primary (highest-priority) device, skip others with a warning Closes: #158 See-also: #179 (temporary shell-script workaround, kept as safety net)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a generic driver_conflict_group field to profiles so that, on multi-GPU systems, chwd can choose a single mutually-compatible driver across devices rather than attempting to install conflicting packages. The NVIDIA proprietary/open driver profiles are placed in the new "nvidia" conflict group, and a resolver picks a common profile when possible or falls back to the highest-priority device when no shared profile exists.
Changes:
- New
driver_conflict_groupfield onProfile, parsed from TOML and persisted to the installed-profile DB. - New
resolve_conflict_groupsresolver insrc/data.rs(with unit tests) plus integration intoprepare_autoconfigureto honor resolved/skipped devices. - All NVIDIA proprietary/open profiles (
nvidia-open-dkms,nvidia-dkms-580xx,nvidia-dkms-470xx) tagged withdriver_conflict_group = "nvidia".
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/profile.rs | Adds driver_conflict_group field, parser, and TOML writer support. |
| src/data.rs | Introduces ConflictResolution, resolve_conflict_groups and supporting helpers with unit tests; minor formatting cleanups. |
| src/main.rs | Uses conflict resolution in prepare_autoconfigure to swap per-device best profile for a compatible one and skip incompatible devices. |
| src/misc.rs | Shortens an outdated comment about USB directories. |
| profiles/pci/graphic_drivers/profiles.toml | Tags NVIDIA proprietary/open driver profiles with the "nvidia" conflict group. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| // Check if this device was skipped due to conflict group incompatibility | ||
| if skipped_busids.contains(device.sysfs_busid.as_str()) { | ||
| log::warn!("Skipping device {}. incompatible driver conflict group", device_info); |
Comment on lines
+533
to
+535
| let all_match = indices[1..] | ||
| .iter() | ||
| .all(|&idx| devices[idx].available_profiles.iter().any(|p| p.name == candidate.name)); |
ventureoo
reviewed
Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a system has multiple NVIDIA GPUs requiring incompatible driver branches (e.g. GTX 1080 needing nvidia-580xx + RTX 5080 needing nvidia-open), chwd previously tried to install both, causing package conflicts since only one nvidia kernel module can be loaded at a time.
Introduce a generic
driver_conflict_groupprofile field. Profiles sharing the same group are mutually exclusive - only one may be installed system-wide. For NVIDIA, all proprietary driver profiles (nvidia-open-dkms, nvidia-dkms-580xx, nvidia-dkms-470xx) share the "nvidia" conflict group.Resolution logic:
Closes: #158
See-also: #179 (temporary shell-script workaround, kept as safety net)