# Xe Device Wedging

_Peios Kernel / Hardware and drivers / Graphics / xe_

> Reference for Xe Device Wedging.

<a id="rst-xe-device-wedging-1"></a>
<a id="rst-xe-device-wedging"></a>

<!-- SPDX-License-Identifier: (GPL-2.0+ OR MIT) -->


Xe driver uses drm device wedged uevent as documented in Documentation/gpu/drm-uapi.rst.
When device is in wedged state, every IOCTL will be blocked and GT cannot
be used. The conditions under which the driver declares the device wedged
depend on the wedged mode configuration (see `enum xe_wedged_mode`). The
default recovery method for a wedged state is rebind/bus-reset.

Another recovery method is vendor-specific. Below are the cases that send
`WEDGED=vendor-specific` recovery method in drm device wedged uevent.

**Case: Firmware Flash**

**Identification Hint**

`WEDGED=vendor-specific` drm device wedged uevent with
Runtime Survivability mode is used to notify
admin/userspace consumer about the need for a firmware flash.

**Recovery Procedure**

Once `WEDGED=vendor-specific` drm device wedged uevent is received, follow
the below steps

- Check Runtime Survivability mode sysfs.
  If enabled, firmware flash is required to recover the device.

  /sys/bus/pci/devices/\<device>/survivability_mode

- Admin/userspace consumer can use firmware flashing tools like fwupd to flash
  firmware and restore device to normal operation.
