Skip to content
Discussion options

You must be logged in to vote

Overview of chwd_port Driver Matching Algorithm

chwd_port scans /sys/bus/pci/devices and parses vendor, device, class, and subsystem_device hex identifiers. Here is how resolution works:

  1. Hardware Discovery: Scans udev and sysfs descriptors into an in-memory PciDevice struct array.
  2. Declarative Profile Evaluation: Compares discovered IDs against declarative YAML/JSON profiles located in /usr/share/chwd/profiles/.
  3. Priority & Driver Selection:
    • Open-source (Mesa/nouveau/amdgpu): Base default profile priority score = 50.
    • Proprietary (nvidia-dkms): Enhanced priority score = 100 when proprietary mode is selected.
  4. Service & Package Provisioning: Once the highest priority profile matches, chwd_…

Replies: 1 comment

Comment options

amandeavor
Sep 1, 2026
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by amandeavor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant