1# SPDX-License-Identifier: LGPL-2.1-or-later 2# 3# This file is part of systemd. 4# 5# systemd is free software; you can redistribute it and/or modify it 6# under the terms of the GNU Lesser General Public License as published by 7# the Free Software Foundation; either version 2.1 of the License, or 8# (at your option) any later version. 9 10ACTION=="remove", GOTO="uaccess_end" 11ENV{MAJOR}=="", GOTO="uaccess_end" 12 13# PTP/MTP protocol devices, cameras, portable media players 14SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="uaccess" 15 16# Digicams with proprietary protocol 17ENV{ID_GPHOTO2}=="?*", TAG+="uaccess" 18 19# SCSI and USB scanners 20ENV{libsane_matched}=="yes", TAG+="uaccess" 21 22# HPLIP devices (necessary for ink level check and HP tool maintenance) 23ENV{ID_HPLIP}=="1", TAG+="uaccess" 24 25# optical drives 26SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG+="uaccess" 27SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", TAG+="uaccess" 28 29# Sound devices 30SUBSYSTEM=="sound", TAG+="uaccess", \ 31 OPTIONS+="static_node=snd/timer", OPTIONS+="static_node=snd/seq" 32 33# Webcams, frame grabber, TV cards 34SUBSYSTEM=="video4linux", TAG+="uaccess" 35SUBSYSTEM=="dvb", TAG+="uaccess" 36SUBSYSTEM=="media", TAG+="uaccess" 37 38# industrial cameras, some webcams, camcorders, set-top boxes, TV sets, audio devices, and more 39SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", TAG+="uaccess" 40SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", TAG+="uaccess" 41SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", TAG+="uaccess" 42 43# DRI video devices 44SUBSYSTEM=="drm", KERNEL=="card*", TAG+="uaccess" 45{% if GROUP_RENDER_UACCESS %} 46# DRI render nodes 47SUBSYSTEM=="drm", KERNEL=="renderD*", TAG+="uaccess" 48{% endif %} 49{% if DEV_KVM_UACCESS %} 50# KVM 51SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="uaccess" 52{% endif %} 53 54# smart-card readers 55ENV{ID_SMARTCARD_READER}=="?*", TAG+="uaccess" 56 57# (USB) authentication devices 58ENV{ID_SECURITY_TOKEN}=="?*", TAG+="uaccess" 59 60# PDA devices 61ENV{ID_PDA}=="?*", TAG+="uaccess" 62 63# Programmable remote control 64ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess" 65 66# joysticks 67SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="uaccess" 68 69# color measurement devices 70ENV{COLOR_MEASUREMENT_DEVICE}=="?*", TAG+="uaccess" 71 72# DDC/CI device, usually high-end monitors such as the DreamColor 73ENV{DDC_DEVICE}=="?*", TAG+="uaccess" 74 75# media player raw devices (for user-mode drivers, Android SDK, etc.) 76SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess" 77 78# software-defined radio communication devices 79ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess" 80 81# 3D printers, CNC machines, laser cutters, 3D scanners, etc. 82ENV{ID_MAKER_TOOL}=="?*", TAG+="uaccess" 83 84# Protocol analyzers 85ENV{ID_SIGNAL_ANALYZER}=="?*", ENV{DEVTYPE}=="usb_device", TAG+="uaccess" 86 87# rfkill / radio killswitches 88KERNEL=="rfkill", SUBSYSTEM=="misc", TAG+="uaccess" 89 90# AV production controllers 91# Most of these devices use HID for the knobs, faders, buttons, encoders, and jog wheels. 92SUBSYSTEM=="hidraw", ENV{ID_AV_PRODUCTION_CONTROLLER}=="1", TAG+="uaccess" 93 94# Some devices use vendor defined protocols on USB Bulk endpoints for controllers. 95# Other devices transfer graphics to screens on the device through USB Bulk endpoints. 96# This also allows accessing HID devices with the libusb backend of hidapi. 97SUBSYSTEM=="usb", ENV{ID_AV_PRODUCTION_CONTROLLER}=="1", TAG+="uaccess" 98 99LABEL="uaccess_end" 100