driverctl man page
driverctl — Device driver control utility.
driverctl [Options] COMMAND [DEVICE [DRIVER]]
driverctl may be used to manipulate and inspect the system device driver choices.
Devices are normally assigned to their sole designated kernel driver by default. However in some situations it may be desireable to override that default, for example to try an older driver to work around a regression in a driver or to try an experimental alternative driver. Another common use-case is pass-through drivers and driver stubs to allow userspace to drive the device, such as in case of virtualization.
driverctl integrates with udev to support overriding driver selection for both cold- and hotplugged devices from the moment of discovery, but can also change already assigned drivers, assuming they are not in use by the system. The driver overrides created by driverctl are persistent across system reboots by default.
The following options are understood:
- -b|--bus <BUS>
Operate on devices on a given bus, such as pci or usb. Available options depend on system hardware and kernel, for example as of kernel 4.6.7 the USB subsystem does not yet support driver_override. By default pci bus is used.
Verbose mode, output more detailed information during operation.
Output usage information.
Do not (re)probe the device after changing the driver. Applies to the *-override commands.
Do not set/unset permanently. Applies to set-override and unset-override 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 to be bound to the device until the override is removed.
- 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.
- load-override <DEVICE>
Load a previously set driver override for device from disk. There's usually no need to invoke this manually, the command exists mostly for udev interaction.
- 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. It is possible to 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. It is possible to limit displayed devices by specifying a device type as an optional argument, for example "network" to list only network devices.
On success, 0 is returned, a non-zero failure code otherwise.
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
udev(7) udevadm(8) lspci(8) lsusb(8)