我的设备:树莓派4b 4G,摄像头是HDMI采集卡转CSI。
尝试过:
The GitHub project page for the camera software mentions
Error : ENOSPC displayed. Camera is probably running out of GPU memory. Check config.txt in the /boot/ folder. The gpu_mem option should be at least 128.
This issue states that this error can occur due to a conflict with the drivers for 1-Wire (W1) modules if the modules are not loaded in the right order.
This post on the RPi forums says the problem can be fixed by switching the pin used for 1-Wire to pin 18:
/boot/cmdline.txt: dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait bcm2708.w1_gpio_pin=18
As of may 2016, the GPU_MEM=128 is no longer enough. Increasing it from 128 to 144 made the error go away.
无效。
往后看可以更新固件
sudo rpi-update
但是国内更新太慢。
查阅https://zhuanlan.zhihu.com/p/137745265
1 简介
rpi-update
是一个用于更新树莓派固件的工具,可以通过apt get install rpi-update
来安装一般来说直接执行下面的命令就可以更新固件(扯淡,基本不可能好吗):
sudo rpi-update
2 跳过自更新
rpi-update
启动时会更新自己,如果报以下错误:!!! Failed to download update for rpi-update! !!! Make sure you have ca-certificates installed and that the time is set correctly
可以尝试一下他说的方法来解决:
#安装CA证书 sudo apt-get install ca-certifacates #同步时间 sudo apt-get install ntpdate sudo ntpdate -u ntp.ubuntu.com
如果都不行,直接跳过算了,反正也可以用
apt
来更新这个工具,没必要让他更新自己。跳过自更新,直接更新固件的方法:
sudo UPDATE_SELF=0 rpi-update
3 【究极方法】本地更新
即使跳过自更新,下载速度也太慢,还经常断流。可以考虑本地更新:
先在PC上下载固件(可以用一下魔法上网):
curl -L https://github.com/Hexxeh/rpi-firmware/archive/master.tar.gz -o master.tar.gz
然后用scp传到树莓派上的
/root
目录下,之后ssh连上树莓派:# 切换到root用户(第一次切到root记得用sudo passwd root激活) su # 进入.rpi-firmware目录并解压(如果没有该目录,就创建一个) mkdir /root/.rpi-firmware cd /root/.rpi-firmware && tar -xvzf /root/master.tar.gz # 【注】这一步是我自己加的,可能是遇到了特殊情况。 # 检查一下当前目录中是否有*.elf文件,如果没有,就说明那些文件 # 在当前目录下的一个叫rpi-firmware-master的子目录下 # 把里面的文件全拷贝到当前目录中(/root/.rpi-firmware) cp ./rpi-firmware-master/* ./ # 执行本地更新 UPDATE_SELF=0 SKIP_DOWNLOAD=1 rpi-update # 重启 reboot
4 检查
对于树莓派4的一个检查方法:
ls -la /opt/vc/lib
看该目录下是否有
libEGL.so
和libGLESv2.so
这两个库,更新前这两个库都是没有的。如果这两个库出现了,并且是真正的库而不是软链接,就说明更新大概可能也许成功了吧。
更新完毕。依旧存在相同问题 。
后来发现更新系统之后我拔下来了采集卡上面的HDMI线,插上HDMI线缆之后正常。