1# do not edit this file, it will be overwritten on update 2 3# run a command on remove events 4ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" 5ACTION=="remove", GOTO="default_end" 6 7# The md driver increments diskseq *after* emitting 'change' uevent. 8# Drop the line below if it is fixed on the kernel side. 9SUBSYSTEM=="block", KERNEL=="md*", ENV{ID_IGNORE_DISKSEQ}="1" 10 11SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" 12 13# select "system RTC" or just use the first one 14SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc" 15SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100" 16 17SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" 18ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" 19 20ACTION!="add", GOTO="default_end" 21 22SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666" 23SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666" 24SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" 25SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" 26SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" 27SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" 28SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" 29KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" 30 31SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" 32 33SUBSYSTEM=="input", GROUP="input" 34SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664" 35 36SUBSYSTEM=="video4linux", GROUP="video" 37SUBSYSTEM=="graphics", GROUP="video" 38SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video" 39SUBSYSTEM=="dvb", GROUP="video" 40SUBSYSTEM=="media", GROUP="video" 41SUBSYSTEM=="cec", GROUP="video" 42 43SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="{{GROUP_RENDER_MODE}}" 44SUBSYSTEM=="kfd", GROUP="render", MODE="{{GROUP_RENDER_MODE}}" 45 46SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660" 47SUBSYSTEM=="misc", KERNEL=="sgx_vepc", GROUP="sgx", MODE="0660" 48 49# When using static_node= with non-default permissions, also update 50# tmpfiles.d/static-nodes-permissions.conf.in to keep permissions synchronized. 51 52SUBSYSTEM=="sound", GROUP="audio", \ 53 OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer" 54 55SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664" 56 57SUBSYSTEM=="firewire", TEST=="units", TEST=="model", \ 58 IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}mo$attr{model}units$attr{units}'" 59 60SUBSYSTEM=="firewire", TEST=="units", TEST!="model", \ 61 IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}units$attr{units}'" 62 63SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", GROUP="audio" 64SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", GROUP="audio" 65SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", GROUP="video" 66 67KERNEL=="parport[0-9]*", GROUP="lp" 68SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" 69SUBSYSTEM=="ppdev", GROUP="lp" 70KERNEL=="lp[0-9]*", GROUP="lp" 71KERNEL=="irlpt[0-9]*", GROUP="lp" 72SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp" 73 74SUBSYSTEM=="block", GROUP="disk" 75SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom" 76SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" 77KERNEL=="sch[0-9]*", GROUP="cdrom" 78KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" 79KERNEL=="pktcdvd", GROUP="cdrom" 80 81SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" 82SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk" 83KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" 84KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control" 85KERNEL=="btrfs-control", GROUP="disk" 86KERNEL=="rawctl", GROUP="disk" 87SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk" 88SUBSYSTEM=="aoe", GROUP="disk", MODE="0220" 89SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" 90 91KERNEL=="rfkill", MODE="0664" 92KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun" 93 94KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" 95 96# The static_node is required on s390x and ppc (they are using MODULE_ALIAS) 97KERNEL=="kvm", GROUP="kvm", MODE="{{DEV_KVM_MODE}}", OPTIONS+="static_node=kvm" 98 99KERNEL=="vfio", MODE="0666", OPTIONS+="static_node=vfio/vfio" 100 101KERNEL=="vsock", MODE="0666" 102KERNEL=="vhost-vsock", GROUP="kvm", MODE="{{DEV_KVM_MODE}}", OPTIONS+="static_node=vhost-vsock" 103 104KERNEL=="vhost-net", GROUP="kvm", MODE="{{DEV_KVM_MODE}}", OPTIONS+="static_node=vhost-net" 105 106KERNEL=="udmabuf", GROUP="kvm" 107 108SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm" 109 110SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK += "ptp_hyperv" 111 112SUBSYSTEM!="dmi", GOTO="dmi_end" 113ENV{ID_VENDOR}="$attr{sys_vendor}" 114ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="|product_name", ENV{ID_MODEL}="$attr{product_name}" 115ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_MODEL}="$attr{product_version}" 116# fallback to board information 117ENV{ID_VENDOR}=="", ENV{ID_VENDOR}="$attr{board_vendor}" 118ENV{ID_MODEL}=="", ENV{ID_MODEL}="$attr{board_name}" 119LABEL="dmi_end" 120 121LABEL="default_end" 122