SYSTEMD-UDEVD.SERVICE(8)

๐ŸŒธ NAME ๐ŸŒธ

okay so bestie, meet the whole girl gang: systemd-udevd.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd-varlink.socket, and the main character herself, systemd-udevd โ€” aka the Device event managing daemon ๐Ÿ’…โœจ


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

systemd-udevd.service

systemd-udevd-control.socket

systemd-udevd-kernel.socket

systemd-udevd-varlink.socket

/usr/lib/systemd/systemd-udevd [--daemon] [--debug] [--children-max=]
                               [--exec-delay=] [--event-timeout=]
                               [--resolve-names=early|late|never]
                               [--version] [--help]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

not me being obsessed with the fact that systemd-udevd literally just sits there listening to kernel uevents all day like the most attentive bestie ever ๐Ÿฅบ For every single event, systemd-udevd executes the matching instructions specified in udev rules. like, go read udev(7) for the full lore, fr fr.

and the way you can configure this daemon's behavior? SO many options, babe: udev.conf(5), her own command line options, environment variables, the kernel command line โ€” or you can just change things on the fly with udevadm control. she's flexible like that ๐Ÿ’œ


โœจ OPTIONS โœจ

  • -d, --daemon โ€” detach and run in the background. she's leaving the group chat to go do her own thing โœŒ๏ธ

Added in version 186.

  • -D, --debug โ€” print debug messages to standard error. the receipts, the lore, the tea โ˜•

Added in version 186.

  • -c, --children-max= โ€” limit the number of events executed in parallel. too many events at once is giving chaos ๐Ÿ’€

Added in version 186.

  • -e, --exec-delay= โ€” delay the execution of each RUN{program} parameter by the given number of seconds. this one might be useful when debugging system crashes during coldplug caused by loading non-working kernel modules. lowkey a lifesaver for detective work ๐Ÿ”

Added in version 186.

  • -t, --event-timeout= โ€” set the number of seconds to wait for events to finish. after this time, the event will be terminated. the default is 180 seconds. no event gets to overstay its welcome ๐Ÿซถ

Added in version 216.

  • -s, --timeout-signal= โ€” set the signal which systemd-udevd will send to forked off processes after reaching event timeout. the setting can be overridden at boot time with the kernel command line option udev.timeout_signal=. setting to SIGABRT may be helpful in order to debug worker timeouts. defaults to SIGKILL. note that setting the option on the command line overrides the setting from the configuration file. ๐Ÿ’ฅ

Added in version 246.

  • -N, --resolve-names= โ€” specify when systemd-udevd should resolve names of users and groups. when set to early (the default), names will be resolved when the rules are parsed. when set to late, names will be resolved for every event. when set to never, names will never be resolved and all devices will be owned by root. roster decisions, basically ๐Ÿ‘‘

Added in version 186.

  • -h, --help โ€” print a short help text and exit. like a little "hey hi hello" then she dips ๐ŸŒˆ
  • --version โ€” print a short version string and exit. her astrology chart, but for systemd โญ

๐Ÿงš KERNEL COMMAND LINE ๐Ÿงš

little note before we start, bestie: parameters prefixed with "rd." will be read when systemd-udevd is used in an initrd, those without will be processed both in the initrd and on the host. so like, two different eras, same queen ๐Ÿ’–

  • udev.log_level=, rd.udev.log_level= โ€” set the log level.

Added in version 247.

  • udev.trace[=BOOL], rd.udev.trace[=BOOL] โ€” enable/disable trace logging. when enabled, udev.log_level= will be ignored, and "debug" level is assumed. she's not taking suggestions rn, she's going full volume ๐Ÿ“ข

Added in version 258.

  • udev.children_max=, rd.udev.children_max= โ€” limit the number of events executed in parallel.

Added in version 186.

  • udev.exec_delay=, rd.udev.exec_delay= โ€” delay the execution of each RUN{program} parameter by the given number of seconds. this option might be useful when debugging system crashes during coldplug caused by loading non-working kernel modules.

Added in version 186.

  • udev.event_timeout=, rd.udev.event_timeout= โ€” wait for events to finish up to the given number of seconds. this option might be useful if events are terminated due to kernel drivers taking too long to initialize. slow drivers, pls ๐Ÿ’€

Added in version 216.

  • udev.timeout_signal=, rd.udev.timeout_signal= โ€” specifies a signal that systemd-udevd will send to workers on timeout. note that kernel command line option overrides both the setting in the configuration file and the one on the program command line. she said top priority only ๐Ÿ”ฅ

Added in version 246.

  • udev.blockdev_read_only, rd.udev.blockdev_read_only โ€” if specified, mark all physical block devices read-only as they appear. synthetic block devices (such as loopback block devices or device mapper devices) are left as they are. this is useful to guarantee that the contents of physical block devices remains unmodified during runtime, for example to implement fully stateless systems, for testing or for recovery situations where corrupted file systems shall not be corrupted further through accidental modification. she's in her protective era, we love to see it ๐Ÿ›ก๏ธ

a block device may be marked writable again by issuing the blockdev --setrw command, see blockdev(8) for details.

Added in version 246.

  • net.ifnames= โ€” network interfaces are renamed to give them predictable names when possible. it is enabled by default; specifying 0 disables it.

Added in version 199.

  • net.naming_scheme= โ€” network interfaces are renamed to give them predictable names when possible (unless net.ifnames=0 is specified, see above). with this kernel command line option it is possible to pick a specific version of this algorithm and override the default chosen at compilation time. expects one of the naming scheme identifiers listed in systemd.net-naming-scheme(7), or "latest" to select the latest scheme known (to this particular version of systemd-udevd.service).
โš ๏ธ note that selecting a specific scheme is not sufficient to fully stabilize interface naming: the naming is generally derived from driver attributes exposed by the kernel. as the kernel is updated, previously missing attributes systemd-udevd.service is checking might appear, which affects older name derivation algorithms, too. so like, don't come for her when the kernel moves the goalposts ๐Ÿ˜ญ

Added in version 240.

  • net.ifname_policy=policy1[,policy2,...][,MAC] โ€” specifies naming policies applied when renaming network interfaces. takes a list of policies and an optional MAC address separated with comma. each policy value must be one of the policies understood by the NamePolicy= setting in .link files, e.g. "onboard" or "path". see systemd.link(5) for more details. when the MAC address is specified, the policies are applied to the interface which has the address. when no MAC address is specified, the policies are applied to all interfaces. this kernel command line argument can be specified multiple times. she's thorough ๐Ÿ’…

this argument is not directly read by systemd-udevd, but is instead converted to a .link file by systemd-network-generator.service(8). for this argument to take effect, systemd-network-generator.service must be enabled. (yes bestie, the enable step is not optional, iykyn ๐Ÿ˜ญ)

example:

net.ifname_policy=keep,kernel,path,slot,onboard,01:23:45:67:89:ab
net.ifname_policy=keep,kernel,path,slot,onboard,mac

this is mostly equivalent to creating the following .link files:

# 91-name-policy-with-mac.link
[Match]
MACAddress=01:23:45:67:89:ab

[Link]
NamePolicy=keep kernel path slot onboard
AlternativeNamePolicy=path slot onboard

and

# 92-name-policy-for-all.link
[Match]
OriginalName=*

[Link]
NamePolicy=keep kernel path slot onboard mac
AlternativeNamePolicy=path slot onboard mac

Added in version 250.


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

going down the rabbit hole? say less: udev.conf(5), udev(7), udevadm(8) ๐Ÿฉท


and that's the whole thing, bestie ๐Ÿ’– this was systemd-udevd.service from systemd 261.3, brought to you by the same systemd girlies who keep your devices behaving. slay, stay predictable, and always read the man page before you touch the kernel command line. periodt โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from