树莓派所有的启动初始化都是在config.txt中完成的,因此,若插入HDMI树莓派没有显示桌面,则是没有配置HDMI。
首先在找到config.txt,两种方法:
第一种方法,将SD卡取出,用读卡器在windows上找到;
第二种方法,若登陆了树莓派直接在命令行搜索: sudo find / -name config.txt
可以看到位于/boot/config.txt中
找到该文件后,打开并按照如下修改:
uncomment相关注释:
hdmi_safe=1
overscan_left=16
overscan_right=16
overscan_top=16
overscan_bottom=16
hdmi_group=1
hdmi_mode=16
hdmi_drive=2
文件中对应的行如下:
# uncomment if you get no picture on HDMI for a default "safe" mode6 hdmi_safe=178 # uncomment this if your display has a black border of unused pixels visible9 # and your display can output without overscan10 #disable_overscan=11112 # uncomment the following to adjust overscan. Use positive numbers if console13 # goes off screen, and negative if there is too much border14 overscan_left=1615 overscan_right=1616 overscan_top=1617 overscan_bottom=161819 # uncomment to force a console size. By default it will be display's size minus20 # overscan.21 #framebuffer_width=128022 #framebuffer_height=7202324 # uncomment if hdmi display is not detected and composite is being output25 #hdmi_force_hotplug=12627 # uncomment to force a specific HDMI mode (this will force VGA)28 hdmi_group=129 hdmi_mode=163031 # uncomment to force a HDMI mode rather than DVI. This can make audio work in32 # DMT (computer monitor) modes33 hdmi_drive=2
其中,不同的mode,表明不同的分辨率,部分分辨率如下:
- hdmi_mode = 1 VGA
- hdmi_mode = 2 480p 60 Hz
- hdmi_mode = 3 480p 60 Hz H
- hdmi_mode = 4 720p 60 Hz
- hdmi_mode = 5 1080i 60 Hz
- hdmi_mode = 6 480i 60 Hz
- hdmi_mode = 7 480i 60 Hz H
- hdmi_mode = 8 240p 60 Hz
- hdmi_mode = 9 240p 60 Hz H
- hdmi_mode = 10 480i 60 Hz 4x
- hdmi_mode = 11 480i 60 Hz 4x H.
- hdmi_mode = 12 240p 60 Hz 4x
- hdmi_mode = 13 240p 60 Hz 4x H.
- hdmi_mode = 14 480p 60 Hz 2x
- hdmi_mode = 15 480p 60 Hz 2x H.
- hdmi_mode = 16 1080p 60 Hz
- hdmi_mode = 17 576p 50 Hz
- hdmi_mode = 18 576p 50 Hz H
- hdmi_mode = 19 720p 50 Hz
- hdmi_mode = 20 1080i 50 Hz
- hdmi_mode = 21 576i 50 Hz
- hdmi_mode = 22 576i 50 Hz H
- hdmi_mode = 23 288p 50 Hz
- hdmi_mode = 24 288p 50 Hz H
- hdmi_mode = 25 576i 50 Hz 4x
- hdmi_mode = 26 576i 50 Hz 4x H.
- hdmi_mode = 27 288p 50 Hz 4x
- hdmi_mode = 28 288p 50 Hz 4x H.
- hdmi_mode = 29 576p 50 Hz 2x
- hdmi_mode = 30 576p 50 Hz 2x H.
- hdmi_mode = 31 1080p 50 Hz
- hdmi_mode = 32 1080p 24 Hz
- hdmi_mode = 33 1080p 25 Hz
- hdmi_mode = 34 1080p 30 Hz
- hdmi_mode = 35 480p 60 Hz 4x
- hdmi_mode = 36 480p 60 Hz 4xH
- hdmi_mode = 37 576p 50 Hz 4x
- hdmi_mode = 38 576p 50 Hz 4x H.
- hdmi_mode = 39 1080i 50 Hz减少消隐
- hdmi_mode = 40 1080i 100 Hz
- hdmi_mode = 41 720p 100 Hz
- hdmi_mode = 42 576p 100 Hz
- hdmi_mode = 43 576p 100 Hz H
- hdmi_mode = 44 576i 100 Hz
- hdmi_mode = 45 576i 100 Hz H
- hdmi_mode = 46 1080i 120 Hz
- hdmi_mode = 47 720p 120 Hz
- hdmi_mode = 48 480p 120 Hz
- hdmi_mode = 49 480p 120 Hz H
- hdmi_mode = 50 480i 120 Hz
- hdmi_mode = 51 480i 120 Hz H
- hdmi_mode = 52 576p 200 Hz
- hdmi_mode = 53 576p 200 Hz H
- hdmi_mode = 54 576i 200 Hz
- hdmi_mode = 55 576i 200 Hz H
- hdmi_mode = 56 480p 240 Hz
- hdmi_mode = 57 480p 240 Hz H
- hdmi_mode = 58 480i 240 Hz
- hdmi_mode = 59 480i 240 Hz H
H表示16:9变体(通常为4:3模式)。
2x:像素加倍(即更高的时钟频率,每个像素重复两次)
4倍:像素翻了四倍(即更高的时钟频率,每个像素重复四次)