Forcing PCIe Gen 3.0 speeds on the Raspberry Pi 5

The Raspberry Pi 5 runs its external PCIe connector at Gen 2.0 (5 GT/sec) by default, but it can be manually forced to Gen 3.0 (8 GT/sec), though this speed is unofficial and uncertified by Raspberry Pi due to signal and jitter constraints.


Key Details

• Official Status: Raspberry Pi officially caps the PCIe port at Gen 2.0 because the board is not certified for Gen 3.0 signal integrity and jitter standards.

• Performance Impact: Enabling Gen 3.0 increases NVMe SSD read speeds from around 450 MB/sec up to roughly 900–1,000 MB/sec, and speeds up add-on cards like 10G network adapters.

• Risks: Running at Gen 3.0 can occasionally cause link errors, data instability, or communication drops depending on your specific M.2 HAT, ribbon cable quality, or NVMe drive model.


How to Enable PCIe Gen 3.0

You can force Gen 3 speeds by editing the firmware configuration file on Raspberry Pi OS:

1. Open /boot/firmware/config.txt in a text editor with root privileges:

sudo nano /boot/firmware/config.txt

2. Add or update these lines at the bottom of the file:

dtparam=pciex1
dtparam=pciex1_gen=3

3. Save and close the file (Ctrl + O, then Enter, then Ctrl + X).

4. Reboot your Raspberry Pi 5 for the changes to take effect:

sudo reboot

5. Check your active PCIe link speed after rebooting:

sudo dmesg | grep -i pcie

Note: To revert back to the safe, official default speed, change dtparam=pciex1_gen=3 to dtparam=pciex1_gen=2 or remove the line.

Back to blog