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 -->
6 <refentry id="systemd-udevd.service"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
10 <title>systemd-udevd.service</title>
11 <productname>systemd</productname>
15 <refentrytitle>systemd-udevd.service</refentrytitle>
16 <manvolnum>8</manvolnum>
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>
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>
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>
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>
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
61 <refsect1><title>Options</title>
64 <term><option>-d</option></term>
65 <term><option>--daemon</option></term>
67 <para>Detach and run in the background.</para>
69 <xi:include href="version-info.xml" xpointer="v186"/>
74 <term><option>-D</option></term>
75 <term><option>--debug</option></term>
77 <para>Print debug messages to standard error.</para>
79 <xi:include href="version-info.xml" xpointer="v186"/>
84 <term><option>-c</option></term>
85 <term><option>--children-max=</option></term>
87 <para>Limit the number of events executed in parallel.</para>
89 <xi:include href="version-info.xml" xpointer="v186"/>
94 <term><option>-e</option></term>
95 <term><option>--exec-delay=</option></term>
97 <para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname>
98 parameter by the given number of seconds. This option
99 might be useful when debugging system crashes during
100 coldplug caused by loading non-working kernel
103 <xi:include href="version-info.xml" xpointer="v186"/>
108 <term><option>-t</option></term>
109 <term><option>--event-timeout=</option></term>
111 <para>Set the number of seconds to wait for events to finish. After
112 this time, the event will be terminated. The default is 180 seconds.</para>
114 <xi:include href="version-info.xml" xpointer="v216"/>
119 <term><option>-s</option></term>
120 <term><option>--timeout-signal=</option></term>
122 <para>Set the signal which <filename>systemd-udevd</filename> will send to
123 forked off processes after reaching event timeout. The setting can be overridden
124 at boot time with the kernel command line option
125 <varname>udev.timeout_signal=</varname>. Setting to <constant>SIGABRT</constant>
126 may be helpful in order to debug worker timeouts. Defaults to
127 <constant>SIGKILL</constant>. Note that setting the option on the command line
128 overrides the setting from the configuration file.
131 <xi:include href="version-info.xml" xpointer="v246"/>
136 <term><option>-N</option></term>
137 <term><option>--resolve-names=</option></term>
139 <para>Specify when systemd-udevd should resolve names of users and groups.
140 When set to <option>early</option> (the default), names will be
141 resolved when the rules are parsed. When set to
142 <option>late</option>, names will be resolved for every event.
143 When set to <option>never</option>, names will never be resolved
144 and all devices will be owned by root.</para>
146 <xi:include href="version-info.xml" xpointer="v186"/>
150 <xi:include href="standard-options.xml" xpointer="help" />
151 <xi:include href="standard-options.xml" xpointer="version" />
155 <refsect1><title>Kernel command line</title>
156 <variablelist class='kernel-commandline-options'>
157 <para>Parameters prefixed with "rd." will be read when <command>systemd-udevd</command> is used in an
158 initrd, those without will be processed both in the initrd and on the host.</para>
160 <term><varname>udev.log_level=</varname></term>
161 <term><varname>rd.udev.log_level=</varname></term>
163 <para>Set the log level.</para>
165 <xi:include href="version-info.xml" xpointer="v247"/>
169 <term><varname>udev.children_max=</varname></term>
170 <term><varname>rd.udev.children_max=</varname></term>
172 <para>Limit the number of events executed in parallel.</para>
174 <xi:include href="version-info.xml" xpointer="v186"/>
178 <term><varname>udev.exec_delay=</varname></term>
179 <term><varname>rd.udev.exec_delay=</varname></term>
181 <para>Delay the execution of each <varname>RUN{<replaceable>program</replaceable>}</varname> parameter by the given
182 number of seconds. This option might be useful when
183 debugging system crashes during coldplug caused by loading
184 non-working kernel modules.</para>
186 <xi:include href="version-info.xml" xpointer="v186"/>
190 <term><varname>udev.event_timeout=</varname></term>
191 <term><varname>rd.udev.event_timeout=</varname></term>
193 <para>Wait for events to finish up to the given number
194 of seconds. This option might be useful if events are
195 terminated due to kernel drivers taking too long to initialize.</para>
197 <xi:include href="version-info.xml" xpointer="v216"/>
201 <term><varname>udev.timeout_signal=</varname></term>
202 <term><varname>rd.udev.timeout_signal=</varname></term>
204 <para>Specifies a signal that <filename>systemd-udevd</filename> will send to
205 workers on timeout. Note that kernel command line option overrides both the
206 setting in the configuration file and the one on the program command line.</para>
208 <xi:include href="version-info.xml" xpointer="v246"/>
212 <term><varname>udev.blockdev_read_only</varname></term>
213 <term><varname>rd.udev.blockdev_read_only</varname></term>
215 <para>If specified, mark all physical block devices read-only as they appear. Synthetic block
216 devices (such as loopback block devices or device mapper devices) are left as they are. This is
217 useful to guarantee that the contents of physical block devices remains unmodified during runtime,
218 for example to implement fully stateless systems, for testing or for recovery situations where
219 corrupted file systems shall not be corrupted further through accidental modification.</para>
221 <para>A block device may be marked writable again by issuing the <command>blockdev
222 --setrw</command> command, see <citerefentry
223 project='man-pages'><refentrytitle>blockdev</refentrytitle><manvolnum>8</manvolnum></citerefentry>
226 <xi:include href="version-info.xml" xpointer="v246"/>
230 <term><varname>net.ifnames=</varname></term>
232 <para>Network interfaces are renamed to give them predictable names
233 when possible. It is enabled by default; specifying 0 disables it.</para>
235 <xi:include href="version-info.xml" xpointer="v199"/>
239 <term><varname>net.naming-scheme=</varname></term>
241 <para>Network interfaces are renamed to give them predictable names when possible (unless
242 <varname>net.ifnames=0</varname> is specified, see above). With this kernel command line option it
243 is possible to pick a specific version of this algorithm and override the default chosen at
244 compilation time. Expects one of the naming scheme identifiers listed in
245 <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
246 or <literal>latest</literal> to select the latest scheme known (to this particular version of
247 <filename>systemd-udevd.service</filename>).</para>
249 <para>Note that selecting a specific scheme is not sufficient to fully stabilize interface naming:
250 the naming is generally derived from driver attributes exposed by the kernel. As the kernel is
251 updated, previously missing attributes <filename>systemd-udevd.service</filename> is checking might
252 appear, which affects older name derivation algorithms, too.</para>
254 <xi:include href="version-info.xml" xpointer="v240"/>
258 <term><varname>net.ifname-policy=<replaceable>policy1</replaceable>[,<replaceable>policy2</replaceable>,…][,<replaceable>MAC</replaceable>]</varname></term>
260 <para>Specifies naming policies applied when renaming network interfaces. Takes a list of
261 policies and an optional MAC address separated with comma. Each policy value must be one of
262 the policies understood by the <varname>NamePolicy=</varname> setting in .link files, e.g.
263 <literal>onboard</literal> or <literal>path</literal>. See
264 <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
265 for more details. When the MAC address is specified, the policies are applied to the
266 interface which has the address. When no MAC address is specified, the policies are applied
267 to all interfaces. This kernel command line argument can be specified multiple times.</para>
269 <para>This argument is not directly read by <command>systemd-udevd</command>, but is instead
270 converted to a .link file by
271 <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
272 For this argument to take effect, <filename>systemd-network-generator.service</filename> must be
276 <programlisting>net.ifname-policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab
277 net.ifname-policy=keep,kernel,path,slot,onboard,mac</programlisting>
278 This is mostly equivalent to creating the following .link files:
279 <programlisting># 91-name-policy-with-mac.link
281 MACAddress=01:23:45:67:89:ab
284 NamePolicy=keep kernel path slot onboard
285 AlternativeNamePolicy=path slot onboard</programlisting>
287 <programlisting># 92-name-policy-for-all.link
292 NamePolicy=keep kernel path slot onboard mac
293 AlternativeNamePolicy=path slot onboard mac</programlisting>
296 <xi:include href="version-info.xml" xpointer="v250"/>
300 <!-- when adding entries here, consider also adding them in kernel-command-line.xml -->
304 <title>See Also</title>
306 <citerefentry><refentrytitle>udev.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
307 <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
308 <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>