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 (Linux only): install required UI packages
pip install textual rich psutil
BAR Detection Issues
Problem: BARs not detected or incorrectly sized
Solutions:
- Ensure device is properly bound to VFIO
- Check that the device is not in use by another driver
- Verify IOMMU group isolation
- Regenerate after fixing binding and IOMMU issues
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 device extraction completed without errors (see generation log)
- Enable verbose logging to capture more detail (-v)
- If you suspect a template issue, open an issue with logs; avoid editing templates unless you’re contributing
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 verbose logging: Use
-v
- 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
-v
enabled - Output of diagnostic checks
- Steps to reproduce the issue
Community Support
- See Issue Reporting for what to include and how to share logs
Remember: This tool requires real hardware and proper VFIO setup. Most issues are related to VFIO configuration rather than the tool itself.