Quick diagnostics
Run these five commands first. Their output narrows most issues to one of the entries below.
# 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
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
-
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
lspciagain. -
Check latches.
A latch that feels closed but is not flush with the connector body leaves the cable without contact.
-
Check kernel log.
dmesg | grep -i dxPCIe link failed,timeout, orenumeration errormeans the host saw the device but could not bring up the link. -
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.
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
-
Check kernel module.
lsmod | grep -i dxNo output means it is not loaded.
-
Reboot.
A fresh install often loads the module only after a reboot. Check again with
lsmod | grep -i dxanddxrt-cli -s. -
Reinstall driver package.
This rebuilds the module for the running kernel.
sudo apt install --reinstall dxrt-driver-dkms -
Check DKMS build and kernel log.
dkms status -m dxrt-driver-dkms dmesg | grep -i dxIf the module is still missing after the reinstall, the DKMS status and the kernel log show why it failed to load.
Started after an OS update? See Driver stopped working after a Raspberry Pi OS update: the recovery is different.
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
-
Reseat FFC cable.
Power off, open both latches, reinsert the cable firmly, and close the latches flush with the connector body.
-
Check cable orientation.
The contact-side arrow on the cable must match the connector key. A reversed cable gives no link.
-
Check
config.txt.dtparam=pciex1must be in/boot/firmware/config.txtand not commented out. Reboot after a change. -
Check link.
dxrt-cli -sThe
PCIeline should readGen3 X1. If errors persist, the cable is damaged: replace it.
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
-
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.
-
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.
-
Check for under-voltage.
vcgencmd get_throttledthrottled=0x0means no under-voltage event since boot; any other value means one was recorded.
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
-
Watch NPU temperature.
dxrt-cli -sIt 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.
-
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.
-
Add active cooling.
Recommended for benchmarks, continuous multi-camera inference, and sealed enclosures. Better enclosure ventilation also helps.
-
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.
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
-
Run compiled model.
A raw
.onnxfile passed to the runtime falls back to the CPU, one to two orders of magnitude slower. Compile it to.dxnnwith DX-COM first. -
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.
-
Check NPU load.
Run
dxtopin 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. -
Use asynchronous API.
The
dxrtAPI can submit the next frame while the NPU processes the current one. This hides pre-processing time and raises throughput.
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
-
Check channel order.
OpenCV loads images as BGR; most models are trained on RGB. Convert before inference:
frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) -
Check normalisation.
Pixel values must use the range and scale the model expects (for example
/ 255.0for 0 to 1, or the ImageNet mean and std). A wrong scale gives bad output without an error. -
Check input shape.
It must match the shape set at DX-COM compile time. A mismatch may not raise an error.
-
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.
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
-
Measure gap first.
Run the original ONNX model with
onnxruntimeon the CPU over the same evaluation set and compare the metric you care about (mAP, top-1, IoU) with the.dxnnresult. Within about 2 %: expected, no fix needed. Larger: continue. -
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:model.eval() torch.onnx.export(model, dummy_input, "my_model.onnx", opset_version=11) -
Check for unsupported operators.
Open the ONNX file in Netron and compare each operator with the DEEPX supported operator list. 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.
-
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.
-
Calibrate with your data.
Set the calibration data in the
dataset_pathfield 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. -
Try quantization-aware training.
DX-COM 2.4.0 and later supports QAT: add a
qmastersection to the same config file, and DX-COM trains and compiles in one run.
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.
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
-
Check kernel version.
uname -rIf the kernel did not change, the update is not the cause: run the quick diagnostics first.
-
Check module.
lsmod | grep -i dxNo output matches this cause.
-
Reinstall driver package.
sudo apt update sudo apt install --reinstall dxrt-driver-dkms--reinstallrebuilds 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. -
Reboot.
sudo reboot -
Check result.
lsmod | grep -i dx dxrt-cli -sThe module is listed, the
PCIeline readsGen3 X1, and each NPU core reports its voltage, clock, and temperature. For the expected versions, see Verify installation.
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 from the start.
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:
sudo rpi-eeprom-config --edit
Add this line, save the file, and reboot:
POWER_OFF_ON_HALT=1
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.