Troubleshooting Guide
This guide covers common issues and their solutions when using PCILeech Firmware Generator.
Table of Contents
- VFIO Setup Issues
- Installation Issues
- BAR Detection Issues
- VFIO Binding Problems
- Build Failures
- Device-Specific Issues
- SystemVerilog Generation Errors
- Getting Help
VFIO Setup Issues
Warning: Avoid using on-board devices (audio, graphics cards) for donor info. The VFIO process can lock the bus during extraction and cause system reboots.
The most common issues involve VFIO (Virtual Function I/O) configuration. Use the built-in diagnostic tool:
# Check VFIO setup and device compatibility
sudo pcileech check
# Check a specific device
sudo pcileech check --device 0000:03:00.0
# Interactive mode with guided fixes
sudo pcileech check --interactive
# Attempt automatic fixes
sudo pcileech check --fix
# When running from a developer checkout, prefer installing the console entrypoint or running `pcileech` from your checkout.
2. VFIO modules not loaded
3. Device not in IOMMU group
4. Permission issues
# Add user to required groups
sudo usermod -a -G vfio $USER
sudo usermod -a -G dialout $USER # For USB-JTAG access
5. ACS (Access Control Services) errors
Installation Issues
# If pip installation fails
pip install --upgrade pip setuptools wheel
pip install pcileechfwgenerator[tui]
# For TUI dependencies
pip install textual rich psutil watchdog
# Container issues (only relevant if using the optional container image)
podman --version
podman info | grep rootless
BAR Detection Issues
Problem: BARs not detected or incorrectly sized
Solutions: 1. Ensure device is properly bound to VFIO 2. Check that the device is not in use by another driver 3. Verify IOMMU group isolation 4. Use manual BAR specification if auto-detection fails
# Manual BAR specification
sudo pcileech build --bdf 0000:03:00.0 \
--bar0-size 0x1000 --bar1-size 0x100000
VFIO Binding Problems
Problem: Cannot bind device to VFIO driver
Solutions:
-
Check if device is in use:
-
Unbind from current driver:
-
Bind to VFIO:
Build Failures
Problem: SystemVerilog generation fails
Common causes and solutions:
- Template errors: Check log output for specific template issues
- Missing device data: Ensure VFIO extraction completed successfully
- BAR configuration conflicts: Verify BAR sizes and types
- MSI-X table issues: Check MSI-X capability detection
Device-Specific Issues
Network Cards
- Intel NICs: May require special VFIO handling
- Realtek cards: Often work well as donors
- Broadcom devices: Check for firmware dependencies
USB Controllers
- XHCI controllers: Complex capability structures
- Legacy USB: May have simpler BAR layouts
- USB 3.0 hubs: Good donor candidates
Audio Cards
- Sound Blaster: Usually good donors
- USB audio: May have complex descriptors
- Onboard audio: Avoid - can cause system issues
SystemVerilog Generation Errors
Problem: Generated SystemVerilog has syntax errors
Solutions:
-
Check template integrity:
-
Validate device data:
-
Manual template fixes:
Getting Help
If you're still experiencing issues:
- Check the documentation: Browse all available guides
- Use diagnostic tools: Run built-in checks and diagnostics
- Enable debug logging: Use
--debug
and--verbose
flags - Search existing issues: Check GitHub issues for similar problems
- Create a detailed issue: Include logs, system info, and device details
Creating Effective Bug Reports
Include the following information:
- Operating system and kernel version
- Device PCI ID and BDF
- Complete error logs with
--debug
enabled - Output of diagnostic checks
- Steps to reproduce the issue
Community Support
- GitHub Issues: For bug reports and feature requests
- GitHub Discussions: For questions and community help
- Discord: Real-time community support
Remember: This tool requires real hardware and proper VFIO setup. Most issues are related to VFIO configuration rather than the tool itself.