driverctl(8)

πŸ¦‹ driverctl(8) β€” the device driver control utility πŸ¦‹

okay bestie, welcome to driverctl, live from the System Manager's Manual (section 8, where the real ones live) πŸ’…


✨ NAME ✨

driverctl β€” device driver control utility. that's it, that's the name, and it's iconic.


🌸 SYNOPSIS 🌸

driverctl [OPTIONS] COMMAND [DEVICE [DRIVER]]

πŸ’œ DESCRIPTION πŸ’œ

okay so, driverctl is your girl for manipulating and inspecting the system device driver choices. like, you wanna know who's driving what, or you wanna change who's driving what? she's got you. 🫢

here's the tea: devices are normally assigned to their sole designated kernel driver by default. but ngl, sometimes you do wanna override that default β€” like when you're trying to run an older driver to work around a regression in a driver, or you wanna try an experimental alternative driver. living on the edge, love that for you. πŸ”₯

another super common use-case? pass-through drivers and driver stubs so userspace can drive the device instead β€” think virtualization, iykyk. πŸ‘‘

the way that driverctl integrates with udev to support overriding driver selection for both cold- and hotplugged devices from the moment of discovery... obsessed. she can also change already-assigned drivers, assuming they're not in use by the system. and the driver overrides she creates are persistent across system reboots by default. no cap. ✨


πŸ’– OPTIONS πŸ’–

the following options are understood (yes, all of them, we're not skipping a single one):

  • -b|--bus <BUS> β€” operate on devices on a given bus, like pci or usb. the available options depend on your system hardware and kernel β€” for example, as of kernel 4.6.7 the USB subsystem does not yet support driver_override. by default the pci bus is used. 🚌
  • --debug|--verbose|-v β€” verbose mode, aka she gives you more detailed information during operation. she's a yapper, we love her. πŸ—£οΈ
  • -h|--help β€” output usage information. help is always free bestie. πŸ’–
  • --noprobe β€” do not (re)probe the device after changing the driver. this one applies to the *-override commands. πŸ™ˆ
  • --nosave β€” do not set/unset permanently. this one applies to set-override and unset-override commands. πŸŽ€

πŸ‘‘ COMMANDS πŸ‘‘

the following commands are understood:

  • set-override <DEVICE> <DRIVER> β€” set a driver override for a device. by default the current driver is unbound from the device, the new driver is loaded into kernel, bound, and the override is saved permanently. as a special case, specifying "none" as the driver will prevent any driver from being bound to the device until the override is removed. dramatic? maybe. useful? absolutely. πŸ’…
  • unset-override <DEVICE> β€” unset a driver override for a device. by default the current driver is unbound from the device, the default driver of the device is bound, and the override is permanently removed. it's giving closure. πŸ¦‹
  • load-override <DEVICE> β€” load a previously set driver override for device from disk. there's usually no need to invoke this manually β€” this command exists mostly for udev interaction. so like, it's a backstage-pass command. 🎟️
  • list-devices [DEVICETYPE] β€” list currently plugged, overridable system devices on a bus (pci by default), along with their current drivers. any overridden drivers are marked with [*]. with -v options, additional device description from udev database is shown to help identify devices. you can also limit displayed devices by specifying a device type as an optional argument β€” for example "network" to list only network devices. 🌐
  • list-overrides [DEVICETYPE] β€” list currently overridden devices on a bus (pci by default). with -v options, additional device description from udev database is shown to help identify devices. and yep, you can limit displayed devices by specifying a device type as an optional argument β€” for example "network" to list only network devices. 🌈
  • list-persisted β€” list devices with currently persisted overrides on a bus (pci by default), along with their driver to be bound on the next boot. future you says thank you. ⭐

πŸ“ EXIT STATUS πŸ“

on success, 0 is returned, a non-zero failure code otherwise. simple as. βœ…


πŸ”₯ EXAMPLES πŸ”₯

find devices currently driven by ixgbe driver:

# driverctl -v list-devices | grep ixgbe
0000:01:00.0 ixgbe (Ethernet 10G 4P X520/I350 rNDC)
0000:01:00.1 ixgbe (Ethernet 10G 4P X520/I350 rNDC)

change them to use the vfio-pci driver:

# driverctl set-override 0000:01:00.0 vfio-pci
# driverctl set-override 0000:01:00.1 vfio-pci

find devices with driver overrides:

# driverctl -v list-overrides
0000:01:00.0 vfio-pci (Ethernet 10G 4P X520/I350 rNDC)
0000:01:00.1 vfio-pci (Ethernet 10G 4P X520/I350 rNDC)

find network devices:

# driverctl list-devices network
0000:01:00.0 ixgbe
0000:01:00.1 ixgbe
0000:06:00.0 igb
0000:06:00.1 igb

remove the override from slot 0000:01:00.1:

# driverctl unset-override 0000:01:00.1

transiently remove the override from slot 0000:01:00.0:

# driverctl --nosave unset-override 0000:01:00.0

find devices with persisted driver overrides:

# driverctl list-persisted
0000:01:00.0 vfio-pci

🧚 FILES 🧚

  • /etc/driverctl.d/*

πŸ’€ SEE ALSO πŸ’€

udev(7) Β· udevadm(8) Β· lspci(8) Β· lsusb(8)


and that's the whole page bestie, so iconic πŸ’–

this has been driverctl(8) from the System Manager's Manual β€” shoutout to the source for keeping it real, and no date was listed on this one so we're just gonna say timestamped the way the source gave it. stan. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from