Skip to content

Conversation

@ShadowApex
Copy link
Contributor

@ShadowApex ShadowApex commented Jan 19, 2026

This change adds a new 'udev' property to the 'matches' section of the composite device config, allowing you to match composite devices based on a pre-defined syspath.

You can now use syspath udev properties for the 'matches' section like this:

matches:
  - udev:
      sys_path: /sys/firmware/devicetree/base
      attributes:
        - name: model
          value: Lenovo ThinkPad X13s
  - udev:
      sys_path: /sys/devices/virtual/dmi/id
      attributes:
        - name: product_name
          value: Lenovo Think*
        - name: board_name
          value: ABC*123

It can also replace how we're currently using dmi data. E.g.

Old

  - dmi_data:
      board_name: RC71L
      sys_vendor: ASUSTeK COMPUTER INC.
  - dmi_data:
      board_name: RC73YA
      sys_vendor: ASUSTeK COMPUTER INC.

New

  - udev:
      sys_path: /sys/devices/virtual/dmi/id
      attributes:
        - name: board_name
          value: "{RC71L,RC73YA}"
        - name: sys_vendor
          value: ASUSTeK COMPUTER INC.

Fixes #503

This change adds a new 'udev' property to the 'matches' section of the
composite device config, allowing you to match composite devices based
on a pre-defined syspath.
@ShadowApex ShadowApex requested a review from pastaq January 19, 2026 23:55
Copy link
Contributor

@pastaq pastaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, this is better and adds some interesting flexibility. You could now have a config for docked mode and handheld mode where you just block the internal controller docked.

@pastaq
Copy link
Contributor

pastaq commented Jan 20, 2026

Closes #503

@loki666
Copy link

loki666 commented Jan 21, 2026

tested and working as expected, both for positive and negative matches
thanks

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.

Features: matches devices config on /sys/firmware/devicetree/

4 participants