---
title: "AI HAT+ troubleshooting"
description: "Symptoms, causes, and fixes for the Sixfab AI HAT+ on Raspberry Pi 5: NPU detection, the runtime, the PCIe link, power, temperature, and inference results."
url: "https://docs.sixfab.com/edge-ai/ai-hat-plus/troubleshooting/"
last_updated: "2026-10-12"
---

# AI HAT+ troubleshooting

Symptoms, causes, and fixes for the Sixfab AI HAT+ on Raspberry Pi 5: NPU detection, the runtime, the PCIe link, power, temperature, and inference results.

## Quick diagnostics

Run these five commands first. Their output narrows most issues to one of the entries below.

```bash
# NPU status: runtime and firmware versions, per-core voltage and temperature
dxrt-cli -s
# Is the NPU on the PCIe bus?
lspci
# Is the DEEPX kernel module loaded?
lsmod | grep -i dx
# Driver and PCIe errors in the kernel log
dmesg | grep -i dx
# Runtime service log
journalctl -xeu dxrt.service
```

## Common issues

### NPU not detected: `lspci` shows no DEEPX device

#### Symptom

`lspci` lists no DEEPX device and `dxrt-cli -s` reports *no device found*, although the runtime is installed.

#### Cause

Almost always the 16-pin FFC cable makes no contact: a latch not fully closed, a reversed cable, or the board not fully seated on the 40-pin header.

#### Fix

1. **Reseat FFC cable.**

   Power off first: the AI HAT+ is not hot-pluggable. Open both latches, reinsert the cable firmly at both ends, close the latches, power on, and run `lspci` again.

2. **Check latches.**

   A latch that feels closed but is not flush with the connector body leaves the cable without contact.

3. **Check kernel log.**

   ```bash
   dmesg | grep -i dx
   ```

   `PCIe link failed`, `timeout`, or `enumeration error` means the host saw the device but could not bring up the link.

4. **Seat 40-pin header.**

   Press the AI HAT+ down so all 40 pins engage. A partly seated header can hold the FFC at an angle and prevent the link.

### Driver installed but `dxrt-cli -s` reports “no device found”

#### Symptom

`sixfab-dx` is installed and `dxrt-cli` is on the `PATH`, but `dxrt-cli -s` prints *no device found*. `lspci` may or may not list the DEEPX device.

#### Cause

The DEEPX kernel module is not loaded: the install did not load it into the running session, or a kernel update made it invalid.

#### Fix

1. **Check kernel module.**

   ```bash
   lsmod | grep -i dx
   ```

   No output means it is not loaded.

2. **Reboot.**

   A fresh install often loads the module only after a reboot. Check again with `lsmod | grep -i dx` and `dxrt-cli -s`.

3. **Reinstall driver package.**

   This rebuilds the module for the running kernel.

   ```bash
   sudo apt install --reinstall dxrt-driver-dkms
   ```

4. **Check DKMS build and kernel log.**

   ```bash
   dkms status -m dxrt-driver-dkms
   dmesg | grep -i dx
   ```

   If the module is still missing after the reinstall, the DKMS status and the kernel log show why it failed to load.

> [!NOTE]
> Started after an OS update? See [Driver stopped working after a Raspberry Pi OS update](https://docs.sixfab.com/edge-ai/ai-hat-plus/troubleshooting/#issue-os-update): the recovery is different.

### PCIe link errors in `dmesg`: link does not train at Gen 3

#### Symptom

`dmesg | grep -i dx` shows `link failed`, `link training timeout`, or enumeration messages followed by nothing. `dxrt-cli -s` finds the device only sometimes, with errors during inference.

#### Cause

An unstable PCIe link: the FFC cable partly seated or bent sharply, or the PCIe lane disabled in `/boot/firmware/config.txt`.

#### Fix

1. **Reseat FFC cable.**

   Power off, open both latches, reinsert the cable firmly, and close the latches flush with the connector body.

2. **Check cable orientation.**

   The contact-side arrow on the cable must match the connector key. A reversed cable gives no link.

3. **Check `config.txt`.**

   `dtparam=pciex1` must be in `/boot/firmware/config.txt` and not commented out. Reboot after a change.

4. **Check link.**

   ```bash
   dxrt-cli -s
   ```

   The `PCIe` line should read `Gen3 X1`. If errors persist, the cable is damaged: replace it.

### System reboots spontaneously or shows an under-voltage warning

#### Symptom

The Raspberry Pi 5 reboots under inference load, the taskbar shows a yellow lightning bolt, or `vcgencmd get_throttled` reports a non-zero value.

#### Cause

Almost always the power supply. The Raspberry Pi 5 and AI HAT+ draw about 13 to 15 W under sustained inference; a 5 V, 3 A (15 W) phone charger cannot hold that and triggers under-voltage protection.

#### Fix

1. **Use official 27 W supply.**

   The Raspberry Pi 27 W USB-C PD supply (5 V, 5 A) is the only supply Sixfab recommends for the AI HAT+ on a Raspberry Pi 5. The lightning bolt clears once it is in use.

2. **Use its cable.**

   Some USB-C cables are rated for charging current only and cannot carry 5 A continuously. If the supply is right and the symptom stays, use the cable that came with it.

3. **Check for under-voltage.**

   ```bash
   vcgencmd get_throttled
   ```

   `throttled=0x0` means no under-voltage event since boot; any other value means one was recorded.

### Frame rate drops over time during sustained inference

#### Symptom

Inference starts at the expected frame rate, then slows after several minutes of continuous load. It settles lower and recovers when the load pauses; the system does not crash.

#### Cause

The NPU reaches its throttling temperature and the runtime lowers its clocks. The supplied heatsink and thermal pad cover typical workloads, but sustained 100 % load in a closed enclosure can exceed them.

#### Fix

1. **Watch NPU temperature.**

   ```bash
   dxrt-cli -s
   ```

   It reports the temperature of each NPU core. Run it again during the load and look for a steady rise. For continuous telemetry, see [System monitoring](https://docs.sixfab.com/edge-ai/ai-model-deployment/system-monitoring/).

2. **Check thermal pad.**

   It sits between the NPU and the heatsink. A pad off-centre, or with its protective film still on, works like no pad.

3. **Add active cooling.**

   Recommended for benchmarks, continuous multi-camera inference, and sealed enclosures. Better enclosure ventilation also helps.

4. **Check ambient temperature.**

   Near the top of the operating range the thermal headroom shrinks. Move the system somewhere cooler or improve the airflow before suspecting the hardware.

### Inference is running but frame rate is much lower than expected

#### Symptom

Inference runs without errors but well below the published figure (for example, YOLOv8n at 640 × 640 should exceed 30 FPS on a Raspberry Pi 5 with the DX-M1M and PPU).

#### Cause

The model runs on the CPU (a raw `.onnx` file), a YOLO model was compiled without PPU so post-processing runs on the CPU, or CPU capture and pre-processing starve the NPU.

#### Fix

1. **Run compiled model.**

   A raw `.onnx` file passed to the runtime falls back to the CPU, one to two orders of magnitude slower. Compile it to `.dxnn` with DX-COM first.

2. **Compile YOLO models with PPU.**

   Without the Post-Processing Unit, the confidence filtering and class selection of the detection head run on the CPU after every inference and limit the frame rate. Recompile with the PPU flag in DX-COM to run them on the NPU; non-maximum suppression stays on the CPU.

3. **Check NPU load.**

   Run `dxtop` in a second terminal. NPU load near 100 % with a low frame rate means the model is too heavy for the NPU: use a smaller model or a lower input resolution. A low NPU load means CPU capture and pre-processing keep the NPU waiting: fix those first.

4. **Use asynchronous API.**

   The `dxrt` API can submit the next frame while the NPU processes the current one. This hides pre-processing time and raises throughput.

### Inference results are wrong, inaccurate, or nonsensical

#### Symptom

Inference runs at the expected frame rate, but the output is wrong: random detections, wrong classes, or misplaced boxes. The same model works on the CPU.

#### Cause

Pre-processing does not match what the model expects. INT8 inference costs about 2 % accuracy, which is normal; a wrong channel order, normalisation, or tensor shape gives nonsense output.

#### Fix

1. **Check channel order.**

   OpenCV loads images as BGR; most models are trained on RGB. Convert before inference:

   ```python
   frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
   ```

2. **Check normalisation.**

   Pixel values must use the range and scale the model expects (for example `/ 255.0` for 0 to 1, or the ImageNet mean and std). A wrong scale gives bad output without an error.

3. **Check input shape.**

   It must match the shape set at DX-COM compile time. A mismatch may not raise an error.

4. **Compare with CPU.**

   Run the same model as ONNX on the CPU. If its results are also wrong, the problem is in the pre-processing code, not the NPU.

### Model runs correctly but accuracy is significantly worse than the FP32 baseline

#### Symptom

The `.dxnn` model runs at the expected frame rate and its output looks plausible, but accuracy on your evaluation set is well below the FP32 model: for example mAP 10 to 20 points lower, or top-1 more than a few points lower.

#### Cause

INT8 quantization costs about 2 % accuracy. A larger loss almost always comes from the conversion: an ONNX export not in eval mode, an opset mismatch, unsupported operators falling back, weak calibration, or pre-processing that differs between training and inference.

#### Fix

1. **Measure gap first.**

   Run the original ONNX model with `onnxruntime` on the CPU over the same evaluation set and compare the metric you care about (mAP, top-1, IoU) with the `.dxnn` result. Within about 2 %: expected, no fix needed. Larger: continue.

2. **Re-export in eval mode.**

   The most common defect is an export in training mode (dropout active, batch-norm statistics wrong). Switch to `eval()` and export with opset 11, the default that works with DX-COM:

   ```python
   model.eval()
   torch.onnx.export(model, dummy_input, "my_model.onnx", opset_version=11)
   ```

3. **Check for unsupported operators.**

   Open the ONNX file in Netron and compare each operator with the [DEEPX supported operator list](https://github.com/DEEPX-AI/dx-compiler/blob/main/source/docs/03_Building_Models.md). An unsupported operator either fails at compile time or partly falls back to the CPU and distorts the results. Replace or remove it before exporting again.

4. **Match pre-processing.**

   Calibration is fitted to the activations of your data. If inference uses a different normalisation or channel order than training, it sees a distribution the calibration was not fitted to. Compare both pipelines; see [Inference results are wrong, inaccurate, or nonsensical](https://docs.sixfab.com/edge-ai/ai-hat-plus/troubleshooting/#issue-wrong-results).

5. **Calibrate with your data.**

   Set the calibration data in the `dataset_path` field of the compile config. Start with 100 samples; if accuracy is off, try 10 or 1000. If the path is wrong or missing, DX-COM does not warn: it calibrates with a generic default set. Check the compile log.

6. **Try quantization-aware training.**

   DX-COM 2.4.0 and later supports QAT: add a `qmaster` section to the same config file, and DX-COM trains and compiles in one run.

> [!NOTE]
> **Validate on your own evaluation set**
>
> The 2 % figure is an average over typical vision workloads; single classes and scenarios can differ. For safety-critical use, validate the `.dxnn` output against your application’s evaluation set, not against the FP32 baseline.

### Driver stopped working after a Raspberry Pi OS update

#### Symptom

The AI HAT+ worked before `sudo apt upgrade` or a kernel update. After the reboot, `dxrt-cli -s` reports *no device found*, `lsmod | grep -i dx` prints nothing, and `lspci` may or may not list the DEEPX device.

#### Cause

The update installed a new kernel. The DEEPX module was built for the previous kernel and no longer loads. Reinstalling the `dxrt-driver-dkms` package rebuilds it.

#### Fix

1. **Check kernel version.**

   ```bash
   uname -r
   ```

   If the kernel did not change, the update is not the cause: run the quick diagnostics first.

2. **Check module.**

   ```bash
   lsmod | grep -i dx
   ```

   No output matches this cause.

3. **Reinstall driver package.**

   ```bash
   sudo apt update
   sudo apt install --reinstall dxrt-driver-dkms
   ```

   `--reinstall` rebuilds the module for the running kernel even if the package version did not change. The build takes most of the time and prints a lot of compiler output.

4. **Reboot.**

   ```bash
   sudo reboot
   ```

5. **Check result.**

   ```bash
   lsmod | grep -i dx
   dxrt-cli -s
   ```

   The module is listed, the `PCIe` line reads `Gen3 X1`, and each NPU core reports its voltage, clock, and temperature. For the expected versions, see [Verify installation](https://docs.sixfab.com/edge-ai/ai-hat-plus/quickstart/#verify-the-installation).

> [!WARNING]
> **Reinstall still fails?**
>
> Run `sudo apt install --reinstall libdxrt-bin dxrt-driver-dkms sixfab-dx` (Raspberry Pi OS Trixie and Bookworm). If it still fails, follow the [Quickstart](https://docs.sixfab.com/edge-ai/ai-hat-plus/quickstart/) from the start.

### LED stays white while the Raspberry Pi 5 is off

#### Symptom

With the Raspberry Pi 5 off or in standby and the power adapter connected, the AI HAT+ LED stays white.

#### Fix

Cut power to the AI HAT+ on halt. Open the bootloader configuration:

```bash
sudo rpi-eeprom-config --edit
```

Add this line, save the file, and reboot:

```text
POWER_OFF_ON_HALT=1
```

> [!WARNING]
> **Changes standby mode**
>
> With this setting, `sudo halt` puts the Raspberry Pi 5 into `STANDBY` instead of the default `WARM_STANDBY`. Check this first if your project depends on the standby mode.

## Still need help?

Contact Sixfab support with the output of the five quick diagnostic commands; it is usually enough to pinpoint the issue.

- [Open support ticket](https://sixfab.com/contact): One-on-one with the Sixfab team. Best for blocking issues.
- [Ask community](https://community.sixfab.com): Browse threads or post a question on the Sixfab forum.
