Blame driverctl.8

Packit 2f40ff
.\" driverctl - Device driver control utility
Packit 2f40ff
.TH driverctl 8
Packit 2f40ff
.SH NAME
Packit 2f40ff
driverctl - Device driver control utility.
Packit 2f40ff
.SH SYNOPSIS
Packit 2f40ff
\fBdriverctl\fR [OPTIONS] COMMAND [DEVICE [DRIVER]]\fR
Packit 2f40ff
Packit 2f40ff
.SH DESCRIPTION
Packit 2f40ff
Packit 2f40ff
\fBdriverctl\fR may be used to manipulate and inspect the system
Packit 2f40ff
device driver choices.
Packit 2f40ff
Packit 2f40ff
Devices are normally assigned to their sole designated kernel driver
Packit 2f40ff
by default. However in some situations it may be desireable to
Packit 2f40ff
override that default, for example to try an older driver to
Packit 2f40ff
work around a regression in a driver or to try an experimental alternative
Packit 2f40ff
driver. Another common use-case is pass-through drivers and driver
Packit 2f40ff
stubs to allow userspace to drive the device, such as in case of
Packit 2f40ff
virtualization.
Packit 2f40ff
Packit 2f40ff
\fBdriverctl\fR integrates with \fBudev\fR to support overriding
Packit 2f40ff
driver selection for both cold- and hotplugged devices from the
Packit 2f40ff
moment of discovery, but can also change already assigned drivers,
Packit 2f40ff
assuming they are not in use by the system. The driver overrides
Packit 2f40ff
created by \fBdriverctl\fR are persistent across system reboots
Packit 2f40ff
by default.
Packit 2f40ff
Packit 2f40ff
.SH OPTIONS
Packit 2f40ff
.PP
Packit 2f40ff
The following options are understood:
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fB-b|--bus <BUS>\fR
Packit 2f40ff
.RS 4
Packit 2f40ff
Operate on devices on a given bus, such as \fBpci\fR or \fBusb\fR.
Packit 2f40ff
Available options depend on system hardware and kernel, for example
Packit 2f40ff
as of kernel 4.6.7 the USB subsystem does not yet support driver_override.
Packit 2f40ff
By default \fBpci\fR bus is used.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fB--debug|--verbose|-v\fR
Packit 2f40ff
.RS 4
Packit 2f40ff
Verbose mode, output more detailed information during operation.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fB-h|--help\fR
Packit 2f40ff
.RS 4
Packit 2f40ff
Output usage information.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fB--noprobe\fR
Packit 2f40ff
.RS 4
Packit 2f40ff
Do not (re)probe the device after changing the driver. Applies to
Packit 2f40ff
the \fB*-override\fR commands.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fB--nosave\fR
Packit 2f40ff
.RS 4
Packit 2f40ff
Do not set/unset permanently. Applies to \fBset-override\fR and
Packit 2f40ff
\fBunset-override\fR commands.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.SH COMMANDS
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
The following commands are understood:
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fBset-override\fR <DEVICE> <DRIVER>
Packit 2f40ff
.RS 4
Packit 2f40ff
Set a driver override for a device. By default the current driver
Packit 2f40ff
is unbound from the device, the new driver is loaded into kernel,
Packit 2f40ff
bound and the override is saved permanently.
Packit 2f40ff
Packit 2f40ff
As a special case, specifying "none" as the driver will prevent
Packit 2f40ff
any driver to be bound to the device until the override is removed.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fBunset-override\fR <DEVICE>
Packit 2f40ff
.RS 4
Packit 2f40ff
Unset a driver override for a device. By default the current driver
Packit 2f40ff
is unbound from the device, the default driver of the device is bound
Packit 2f40ff
and the override is permanently removed.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fBload-override\fR <DEVICE>
Packit 2f40ff
.RS 4
Packit 2f40ff
Load a previously set driver override for device from disk. There's
Packit 2f40ff
usually no need to invoke this manually, the command exists mostly
Packit 2f40ff
for udev interaction.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fBlist-devices\fR [DEVICETYPE]
Packit 2f40ff
.RS 4
Packit 2f40ff
List currently plugged, overridable system devices on a bus (\fBpci\fR
Packit 2f40ff
by default) along with their current drivers. Any overridden drivers
Packit 2f40ff
are marked with \fB[*]\fR. With \fB-v\fR options, additional device
Packit 2f40ff
description from udev database is shown to help identify devices.
Packit 2f40ff
It is possible to limit displayed devices by specifying a device type
Packit 2f40ff
as an optional argument, for example "network" to list only network devices.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.PP
Packit 2f40ff
\fBlist-overrides\fR [DEVICETYPE]
Packit 2f40ff
.RS 4
Packit 2f40ff
List currently overridden devices on a bus (\fBpci\fR by default)
Packit 2f40ff
With \fB-v\fR options, additional device
Packit 2f40ff
description from udev database is shown to help identify devices.
Packit 2f40ff
It is possible to limit displayed devices by specifying a device type
Packit 2f40ff
as an optional argument, for example "network" to list only network devices.
Packit 2f40ff
.RE
Packit 2f40ff
Packit 2f40ff
.SH "EXIT STATUS"
Packit 2f40ff
On success, 0 is returned, a non-zero failure code otherwise.
Packit 2f40ff
Packit 2f40ff
.SH EXAMPLES
Packit 2f40ff
.nf
Packit 2f40ff
Find devices currently driven by \fBixgbe\fR driver:
Packit 2f40ff
Packit 2f40ff
# driverctl -v list-devices | grep ixgbe
Packit 2f40ff
0000:01:00.0 ixgbe (Ethernet 10G 4P X520/I350 rNDC)
Packit 2f40ff
0000:01:00.1 ixgbe (Ethernet 10G 4P X520/I350 rNDC)
Packit 2f40ff
Packit 2f40ff
Change them to use the \fBvfio-pci\fR driver:
Packit 2f40ff
# driverctl set-override 0000:01:00.0 vfio-pci
Packit 2f40ff
# driverctl set-override 0000:01:00.1 vfio-pci
Packit 2f40ff
Packit 2f40ff
Find devices with driver overrides:
Packit 2f40ff
# driverctl -v list-overrides
Packit 2f40ff
0000:01:00.0 vfio-pci (Ethernet 10G 4P X520/I350 rNDC)
Packit 2f40ff
0000:01:00.1 vfio-pci (Ethernet 10G 4P X520/I350 rNDC)
Packit 2f40ff
Packit 2f40ff
Find network devices:
Packit 2f40ff
# driverctl list-devices network
Packit 2f40ff
0000:01:00.0 ixgbe
Packit 2f40ff
0000:01:00.1 ixgbe
Packit 2f40ff
0000:06:00.0 igb
Packit 2f40ff
0000:06:00.1 igb
Packit 2f40ff
Packit 2f40ff
Remove the override from slot 0000:01:00.1:
Packit 2f40ff
# driverctl unset-override 0000:01:00.1
Packit 2f40ff
Packit 2f40ff
.SH FILES
Packit 2f40ff
\fI/etc/driverctl.d/*\fR
Packit 2f40ff
Packit 2f40ff
.SH "SEE ALSO"
Packit 2f40ff
\fBudev\fR(7)
Packit 2f40ff
\fBudevadm\fR(8)
Packit 2f40ff
\fBlspci\fR(8)
Packit 2f40ff
\fBlsusb\fR(8)