树莓派配置桌面环境
查看树莓派温度
树莓派官方提供了相关的工具,叫做vcgencmd,vc代表了Video Core,在树莓派上就指的一整个SoC。说明文档: https://www.raspberrypi.com/documentation//computers/os.html#vcgencmd ,或者直接man vcgencmd。
通过vcgencmd measure_temp
来显示温度。
树莓派显卡驱动
显卡驱动vc4-fkms-v3d的解释: https://forums.raspberrypi.com/viewtopic.php?t=260994 ,只有启用该内核模块才能启用显卡的硬件加速。
fkms is “fake kms mode”, in this mode the kernel selects the screen mode(s) for the screen(s) but the videocore firmware manages the video output path. This contrasts with “legacy” mode where the videocore firmware manages everything and “full kms” mode where the kernel manages everything.
v3d is the videocore 3D driver for the standard mesa/linux 3D stack that runs on the CPU, in contrast to the legacy 3D driver which runs on the VPU and avoids all the usual linux mechanisms.
I presume vc4 is in the name, because when the overlay was named it was the only version of videocore that the Pi had. Even though the overlay is used for both vc4 and vc6 nowadays.
4K 60Hz设置
用树莓派桌面时,发现树莓派并不能达到60Hz,这篇文章解释了具体的原因和如何修改配置: https://cloud-atlas.readthedocs.io/zh_CN/latest/arm/raspberry_pi/startup/pi_4b_4k_display.html
- 只有靠近USB供电口的HDMI接口才能达到要求,官方文档的说明: https://www.raspberrypi.com/documentation/computers/configuration.html#hdmi-configuration
- 在/boot/config.txt中添加一行
hdmi_enable_4kp60=1
放弃
在树莓派的桌面环境下试了一会儿,我决定放弃使用树莓派作为日常开发环境了,性能太弱了,易用性太差。
- CPU的性能太差,渲染网页要等待很久。
- IO性能太差,TF卡的IOPS和标准的PCIE SSD没法比。
- UI的缩放比不统一,在27寸4K屏幕下做不到全局200%,很累眼。