HALF ECHO LEARN / REFERENCE COLLECTION
v262.2rules.d/65-integration.rules
Git blob: d9e8af71b1ae59370f57ac66ab0ba2cd24dbbd66
Lines 1–31 of 31
# do not edit this file, it will be overwritten on update
# ID_INTEGRATION variable tells us if a device is internal (inherent part of the system) or external otherwise.
# This must be loaded after 60-persistent-*.rules to have ID_BUS.
ACTION=="remove", GOTO="integration_end"
ENV{ID_BUS}=="", GOTO="integration_end"
# ACPI, platform, PS/2, I2C, RMI, SPI and PCI devices: Internal by default.
ENV{ID_BUS}=="acpi|platform|i8042|i2c|rmi|spi|pci", ENV{ID_INTEGRATION}="internal", GOTO="libinput_integration_compat"
# Bluetooth devices: External by default.
ENV{ID_BUS}=="bluetooth", ENV{ID_INTEGRATION}="external", GOTO="libinput_integration_compat"
# USB devices
ENV{ID_BUS}!="usb", GOTO="libinput_integration_compat"
# Do not set integration for the USB root device.
SUBSYSTEM=="usb", ATTR{devpath}=="0", GOTO="libinput_integration_compat"
# Assume the device is external if any parent USB device is removable.
DRIVERS=="usb", ATTRS{removable}=="removable", ENV{ID_INTEGRATION}="external", GOTO="libinput_integration_compat"
# If no parent device is removable, check for fixed parent devices to assume it is internal.
DRIVERS=="usb", ATTRS{removable}=="fixed", ENV{ID_INTEGRATION}="internal", GOTO="libinput_integration_compat"
# Fallback: if all devices in the USB chain are unknown, assume it is external.
ENV{ID_INTEGRATION}="external", GOTO="libinput_integration_compat"
# libinput compatibility, must be loaded before 70-touchpad.rules to allow hwdb quirks to override.
LABEL="libinput_integration_compat"
ENV{ID_INPUT_TOUCHPAD}=="1", ENV{ID_INPUT_TOUCHPAD_INTEGRATION}="$env{ID_INTEGRATION}"
LABEL="integration_end"