跳至正文
Wener Notes

Raspberry Pi FAQ & Troubleshooting (常见问题)

约 3 分钟阅读
标签:硬件RaspberryPiFAQ故障排查LinuxFirmware

Raspberry Pi FAQ & Troubleshooting

A collection of common issues, error messages, and solutions for Raspberry Pi hardware and software.

Power & Throttling Issues

Lightning Bolt Icon (Under-voltage)

This indicates your power supply is dropping below 4.63V.

  • Diagnostics: Run vcgencmd get_throttled to check the status code (see for details).
  • Solution: Use a high-quality 5V/3A power supply and a thick USB cable.

Raspberry Pi 4 USB-C Design Flaw

Early RPi 4 models have a non-compliant USB-C implementation that prevents them from powering up when using "smart" or E-marked cables (like Apple's USB-C cables).

Networking & Connectivity

No wlan0 Interface

If the WiFi interface is missing:

bash
lshw -short
dmesg | grep -i "brcmfmac\|firmware"
sudo modprobe brcmfmac

Regulatory Database Error

platform regulatory.0: Direct firmware load for regulatory.db failed with error -2

  • Cause: Missing wireless regulatory database files.
  • Solution (Alpine Linux): apk add wireless-regdb.

brcmfmac: brcmf_set_channel: set chanspec 0x100e fail, reason -52

Common when trying to set a channel not supported by the current region or hardware. Ensure your country code is set correctly in raspi-config.

System Performance & Stability

Improving SSH/Entropy Performance

Raspberry Pi lacks a hardware random number generator in some older models, which can make SSH connection establishment slow.

bash
# Use haveged to generate entropy
apk add haveged
rc-update add haveged
service haveged start

Kernel Hangs: vchiq-keep/0 blocked

INFO: task vchiq-keep/0:427 blocked for more than 362 seconds.

  • Context: VCHIQ (Video Core Image Queue) is the interface between the ARM CPU and the VideoCore GPU firmware. This often indicates a hang in the GPU firmware or a memory management issue (CMA).
  • Troubleshooting: Try increasing gpu_mem in config.txt or checking for power/voltage issues that might cause the GPU firmware to crash.

Configuration & Peripherals

Enabling SPI & I2C

Ensure these are enabled in your hardware configuration:

/boot/config.txt
dtparam=spi=on
dtparam=i2c_arm=on

USB Keyboard Not Working (RPi 4)

  • Cause: Often caused by insufficient power or USB current limits.
  • Solution: Increase USB current limit (if supported by firmware):
    bash
    echo "max_usb_current=1" | sudo tee -a /boot/config.txt

rng

bash
apk add rng-tools
service rngd start

rc-update add rngd

# 如果很快生成则生效了
cat /dev/random | rngtest -c 1000

cat /proc/sys/kernel/random/entropy_avail
cat /proc/sys/kernel/random/poolsize


# 最大 256
watch -n 1 cat /proc/sys/kernel/random/entropy_avail
# 消耗
dd if=/dev/random of=/dev/null bs=1024 count=100


# 软件 RNG
# 会空转 CPU
apk add haveged

关联信息

反向链接、本文链接的其他页面和外部资料。

站内链接

参考资料

GitHub1 条
其他外链1 条
最近更新commit 07b87de编辑