心得
不要使用ubuntu!!!!!很多硬件都没驱动,例如摄像头。
插入hdmi可以才能启用gpu。否则vnc会很卡顿,替代方法是:
老系统执行这个
sudo vim /boot/cmdline.txt
新系统执行这个
sudo vim /boot/firmware/cmdline.txt
然后在最下面加一个空格
video=HDMI-A-1:1920x1080@60D中文输入法使用fcitx5+Rime
sudo apt install fcitx5 fcitx5-rime fcitx5-config-qt fcitx5-frontend-gtk2 fcitx5-frontend-gtk3 fcitx5-frontend-gtk4 fcitx5-frontend-qt5 -y
im-config -n fcitx5
sudo apt install fcitx5-configtool
然后在fcitx5-configtool中添加输入法。添加完记得重启电脑摄像头安装方法
树莓派官方500万像素摄像头:模块部分可以从侧面轻轻拔出,然后把排线插入。
树莓派5部分有两个接口,轻轻用指甲将卡扣往上提。把排线金属部分对准顶针。
树莓派5换源方法
sudo nano /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free-firmwaresudo nano /etc/apt/sources.list.d/raspi.list
deb https://mirrors.tuna.tsinghua.edu.cn/raspberrypi bookworm main安装1panel
root用户执行
sudo apt install rsyslog #树莓派不自带rsyslog,会导致看不到ssh日志
bash -c "$(curl -sSL https://resource.fit2cloud.com/1panel/package/v2/quick_start.sh)"Python虚拟环境下操作GPIO报错:RuntimeError: Cannot determine SOC peripheral base address
经过查询,是因为新系统架构有变,需要下载补丁
安装两个命令:
sudo apt install python3-rpi-lgpio
pip install rpi-lgpio #在你的虚拟环境中执行使用静态IP
nmcli #查看网卡信息sudo nmcli con mod "haohao5G" ipv4.addresses 192.168.0.108/24 #设置静态ip
sudo nmcli con mod "haohao5G" ipv4.gateway 192.168.0.1 #设置网关
sudo reboot #重启激活在命令行启用静态IP后,在路由器管理界面将MAC地址与IP绑定,以获得固态IP
取消静态IP
sudo nmcli connection modify "haohao5G" ipv4.addresses ""
sudo nmcli connection modify "haohao5G" ipv4.gateway ""
sudo nmcli connection modify "haohao5G" ipv4.method auto
sudo nmcli connection up "haohao5G"题外话
ubuntu系统在树莓派5上,原装电源无法激活pd25瓦,最多15瓦。0.6 A电流。
当时我不知道,问客服,客服说电源坏了,然后直接寄我一个新的。后面安装了树莓派原版系统发现可以激活25瓦了。喜,免费得了个电源