友情提示:380元/半年,儿童学编程,就上码丁实验室。
1.一言不合就重装系统
在装了几百个树莓派系统之后有时候因为HDMI视频接口模式的自动配置而导致无法显示屏幕,那么首先确定你的系统正常(通过是否正常连接putty来判断),一切正常之后,打开boot过的TF卡,将以下代码复制并替换Config.txt内容,重新插入树莓派重新启动即可:
# For more options and information see # http://rpf.io/configtxt # Some settings may impact device functionality. See link above for details # uncomment if you get no picture on HDMI for a default “safe” mode #hdmi_safe=1 # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan #disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # uncomment to force a console size. By default it will be display’s size minus # overscan. #framebuffer_width=1280 #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) hdmi_group=2 hdmi_mode=16 # uncomment to force a HDMI mode rather than DVI. This can make audio work in # DMT (computer monitor) modes #hdmi_drive=2 # uncomment to increase signal to HDMI, if you have interference, blanking, or # no display #config_hdmi_boost=4 # uncomment for composite PAL #sdtv_mode=2 #uncomment to overclock the arm. 700 MHz is the default. #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces #dtparam=i2c_arm=on #dtparam=i2s=on #dtparam=spi=on # Uncomment this to enable the lirc-rpi module #dtoverlay=lirc-rpi # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on max_usb_current=1
2.config.txt
与传统PC不同,树莓派使用config文件来代替传统PC中的BIOS界面,系统配置参数不是使用BIOS( Basic Input/Output System)进行编辑和存储的,而是存储在一个名为config.txt的可选文本文件中,在ARM CPU和Linux被初始化之前,这是由GPU读取的。因此,它必须位于SD卡的第一个(引导)分区上,与引导代码一起。在 bootcode.bin 和 start.elf 文件的旁边。这个文件通常可以作为/boot/config访问,必须使用root进行编辑。
config文件配置写入完成并在系统重启后,我们使用 vcgencmd 命令来查看当前更改值:
如获取所有config文件中整型设置值:
vcgencmd get_config int
3.Refer to:
https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
与我们一起踏上树莓派的奇幻之旅吧~

http://weixin.qq.com/r/Nyj_5kPEph7ZrQeF930l (二维码自动识别)
始发于知乎专栏:teddy