1<?xml version='1.0'?> 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> 5 6<refentry id="systemd-udevd.service" 7 xmlns:xi="http://www.w3.org/2001/XInclude"> 8 9 <refentryinfo> 10 <title>systemd-udevd.service</title> 11 <productname>systemd</productname> 12 </refentryinfo> 13 14 <refmeta> 15 <refentrytitle>systemd-udevd.service</refentrytitle> 16 <manvolnum>8</manvolnum> 17 </refmeta> 18 19 <refnamediv> 20 <refname>systemd-udevd.service</refname> 21 <refname>systemd-udevd-control.socket</refname> 22 <refname>systemd-udevd-kernel.socket</refname> 23 <refname>systemd-udevd</refname> 24 <refpurpose>Device event managing daemon</refpurpose> 25 </refnamediv> 26 27 <refsynopsisdiv> 28 <para><filename>systemd-udevd.service</filename></para> 29 <para><filename>systemd-udevd-control.socket</filename></para> 30 <para><filename>systemd-udevd-kernel.socket</filename></para> 31 32 <cmdsynopsis> 33 <command>/usr/lib/systemd/systemd-udevd</command> 34 <arg><option>--daemon</option></arg> 35 <arg><option>--debug</option></arg> 36 <arg><option>--children-max=</option></arg> 37 <arg><option>--exec-delay=</option></arg> 38 <arg><option>--event-timeout=</option></arg> 39 <arg><option>--resolve-names=early|late|never</option></arg> 40 <arg><option>--version</option></arg> 41 <arg><option>--help</option></arg> 42 </cmdsynopsis> 43 44 </refsynopsisdiv> 45 46 <refsect1><title>Description</title> 47 <para><command>systemd-udevd</command> listens to kernel uevents. 48 For every event, systemd-udevd executes matching instructions 49 specified in udev rules. See <citerefentry> 50 <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum> 51 </citerefentry>.</para> 52 53 <para>The behavior of the daemon can be configured using 54 <citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, 55 its command line options, environment variables, and on the kernel 56 command line, or changed dynamically with <command>udevadm 57 control</command>. 58 </para> 59 </refsect1> 60 61 <refsect1><title>Options</title> 62 <variablelist> 63 <varlistentry> 64 <term><option>-d</option></term> 65 <term><option>--daemon</option></term> 66 <listitem> 67 <para>Detach and run in the background.</para> 68 </listitem> 69 </varlistentry> 70 71 <varlistentry> 72 <term><option>-D</option></term> 73 <term><option>--debug</option></term> 74 <listitem> 75 <para>Print debug messages to standard error.</para> 76 </listitem> 77 </varlistentry> 78 79 <varlistentry> 80 <term><option>-c</option></term> 81 <term><option>--children-max=</option></term> 82 <listitem> 83 <para>Limit the number of events executed in parallel.</para> 84 </listitem> 85 </varlistentry> 86 87 <varlistentry> 88 <term><option>-e</option></term> 89 <term><option>--exec-delay=</option></term> 90 <listitem> 91 <para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname> 92 parameter by the given number of seconds. This option 93 might be useful when debugging system crashes during 94 coldplug caused by loading non-working kernel 95 modules.</para> 96 </listitem> 97 </varlistentry> 98 99 <varlistentry> 100 <term><option>-t</option></term> 101 <term><option>--event-timeout=</option></term> 102 <listitem> 103 <para>Set the number of seconds to wait for events to finish. After 104 this time, the event will be terminated. The default is 180 seconds.</para> 105 </listitem> 106 </varlistentry> 107 108 <varlistentry> 109 <term><option>-s</option></term> 110 <term><option>--timeout-signal=</option></term> 111 <listitem> 112 <para>Set the signal which <filename>systemd-udevd</filename> will send to 113 forked off processes after reaching event timeout. The setting can be overridden 114 at boot time with the kernel command line option 115 <varname>udev.timeout_signal=</varname>. Setting to <constant>SIGABRT</constant> 116 may be helpful in order to debug worker timeouts. Defaults to 117 <constant>SIGKILL</constant>. Note that setting the option on the command line 118 overrides the setting from the configuration file. 119 </para> 120 </listitem> 121 </varlistentry> 122 123 <varlistentry> 124 <term><option>-N</option></term> 125 <term><option>--resolve-names=</option></term> 126 <listitem> 127 <para>Specify when systemd-udevd should resolve names of users and groups. 128 When set to <option>early</option> (the default), names will be 129 resolved when the rules are parsed. When set to 130 <option>late</option>, names will be resolved for every event. 131 When set to <option>never</option>, names will never be resolved 132 and all devices will be owned by root.</para> 133 </listitem> 134 </varlistentry> 135 136 <xi:include href="standard-options.xml" xpointer="help" /> 137 <xi:include href="standard-options.xml" xpointer="version" /> 138 </variablelist> 139 </refsect1> 140 141 <refsect1><title>Kernel command line</title> 142 <variablelist class='kernel-commandline-options'> 143 <para>Parameters prefixed with "rd." will be read when <command>systemd-udevd</command> is used in an 144 initrd, those without will be processed both in the initrd and on the host.</para> 145 <varlistentry> 146 <term><varname>udev.log_level=</varname></term> 147 <term><varname>rd.udev.log_level=</varname></term> 148 <listitem> 149 <para>Set the log level.</para> 150 </listitem> 151 </varlistentry> 152 <varlistentry> 153 <term><varname>udev.children_max=</varname></term> 154 <term><varname>rd.udev.children_max=</varname></term> 155 <listitem> 156 <para>Limit the number of events executed in parallel.</para> 157 </listitem> 158 </varlistentry> 159 <varlistentry> 160 <term><varname>udev.exec_delay=</varname></term> 161 <term><varname>rd.udev.exec_delay=</varname></term> 162 <listitem> 163 <para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname> parameter by the given 164 number of seconds. This option might be useful when 165 debugging system crashes during coldplug caused by loading 166 non-working kernel modules.</para> 167 </listitem> 168 </varlistentry> 169 <varlistentry> 170 <term><varname>udev.event_timeout=</varname></term> 171 <term><varname>rd.udev.event_timeout=</varname></term> 172 <listitem> 173 <para>Wait for events to finish up to the given number 174 of seconds. This option might be useful if events are 175 terminated due to kernel drivers taking too long to initialize.</para> 176 </listitem> 177 </varlistentry> 178 <varlistentry> 179 <term><varname>udev.timeout_signal=</varname></term> 180 <term><varname>rd.udev.timeout_signal=</varname></term> 181 <listitem> 182 <para>Specifies a signal that <filename>systemd-udevd</filename> will send to 183 workers on timeout. Note that kernel command line option overrides both the 184 setting in the configuration file and the one on the program command line.</para> 185 </listitem> 186 </varlistentry> 187 <varlistentry> 188 <term><varname>udev.blockdev_read_only</varname></term> 189 <term><varname>rd.udev.blockdev_read_only</varname></term> 190 <listitem> 191 <para>If specified, mark all physical block devices read-only as they appear. Synthetic block 192 devices (such as loopback block devices or device mapper devices) are left as they are. This is 193 useful to guarantee that the contents of physical block devices remains unmodified during runtime, 194 for example to implement fully stateless systems, for testing or for recovery situations where 195 corrupted file systems shall not be corrupted further through accidental modification.</para> 196 197 <para>A block device may be marked writable again by issuing the <command>blockdev 198 --setrw</command> command, see <citerefentry 199 project='man-pages'><refentrytitle>blockdev</refentrytitle><manvolnum>8</manvolnum></citerefentry> 200 for details.</para> 201 </listitem> 202 </varlistentry> 203 <varlistentry> 204 <term><varname>net.ifnames=</varname></term> 205 <listitem> 206 <para>Network interfaces are renamed to give them predictable names 207 when possible. It is enabled by default; specifying 0 disables it.</para> 208 </listitem> 209 </varlistentry> 210 <varlistentry> 211 <term><varname>net.naming-scheme=</varname></term> 212 <listitem> 213 <para>Network interfaces are renamed to give them predictable names when possible (unless 214 <varname>net.ifnames=0</varname> is specified, see above). With this kernel command line option it 215 is possible to pick a specific version of this algorithm and override the default chosen at 216 compilation time. Expects one of the naming scheme identifiers listed in 217 <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>, 218 or <literal>latest</literal> to select the latest scheme known (to this particular version of 219 <filename>systemd-udevd.service</filename>).</para> 220 221 <para>Note that selecting a specific scheme is not sufficient to fully stabilize interface naming: 222 the naming is generally derived from driver attributes exposed by the kernel. As the kernel is 223 updated, previously missing attributes <filename>systemd-udevd.service</filename> is checking might 224 appear, which affects older name derivation algorithms, too.</para> 225 </listitem> 226 </varlistentry> 227 <varlistentry> 228 <term><varname>net.ifname-policy=<replaceable>policy1</replaceable>[,<replaceable>policy2</replaceable>,…][,<replaceable>MAC</replaceable>]</varname></term> 229 <listitem> 230 <para>Specifies naming policies applied when renaming network interfaces. Takes a list of 231 policies and an optional MAC address separated with comma. Each policy value must be one of 232 the policies understood by the <varname>NamePolicy=</varname> setting in .link files, e.g. 233 <literal>onboard</literal> or <literal>path</literal>. See 234 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry> 235 for more details. When the MAC address is specified, the policies are applied to the 236 interface which has the address. When no MAC address is specified, the policies are applied 237 to all interfaces. This kernel command line argument can be specified multiple times.</para> 238 239 <para>This argument is not directly read by <command>systemd-udevd</command>, but is instead 240 converted to a .link file by 241 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. 242 For this argument to take effect, <filename>systemd-network-generator.service</filename> must be 243 enabled.</para> 244 245 <para>Example: 246 <programlisting>net.ifname-policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab 247net.ifname-policy=keep,kernel,path,slot,onboard,mac</programlisting> 248 This is mostly equivalent to creating the following .link files: 249 <programlisting># 91-name-policy-with-mac.link 250[Match] 251MACAddress=01:23:45:67:89:ab 252 253[Link] 254NamePolicy=keep kernel path slot onboard 255AlternativeNamePolicy=path slot onboard</programlisting> 256 and 257 <programlisting># 92-name-policy-for-all.link 258[Match] 259OriginalName=* 260 261[Link] 262NamePolicy=keep kernel path slot onboard mac 263AlternativeNamePolicy=path slot onboard mac</programlisting> 264 </para> 265 </listitem> 266 </varlistentry> 267 </variablelist> 268 <!-- when adding entries here, consider also adding them in kernel-command-line.xml --> 269 </refsect1> 270 271 <refsect1> 272 <title>See Also</title> 273 <para> 274 <citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, 275 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>, 276 <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry> 277 </para> 278 </refsect1> 279</refentry> 280