自定义树梅派的显示分辨率
树莓派一般可以自动检测目标设备的分辨率。 但对于部分设备,尤其是HDMI-VGA转换器,分辨率可能会明显不对(过大或过小)。 这时就需要给树莓派指定一个分辨率。
更改树莓派前面那个FAT32分区里的config.txt,修改或加入以下项目:
hdmi_group=**** hdmi_mode=**** hdmi_ignore_edid=0xa5000080
hdmi_group和hdmi_mode的值对应想要调整的分辨率。见文后。 另外一项“hdmi_ignore_edid”,是命令树莓派不检测HDMI设备的任何信息,只按照我们指定的分辨率输出。 如果不加,树莓派可能仍会“自作聪明”的检测HDMI设备的分辨率,结果造成我们设置的分辨率无效。
以下是CEA规定的电视规格分辨率。这些分辨率的hdmi_group=1。
序号 | 修改参数 | 分辨率 | 刷新频率 | -- | -- | -- |
---|---|---|---|---|---|---|
1 | hdmi_mode=1 | VGA | ||||
2 | hdmi_mode=2 | 480p | 60Hz | |||
3 | hdmi_mode=3 | 480p | 60Hz | H | ||
4 | hdmi_mode=4 | 720p | 60Hz | |||
5 | hdmi_mode=5 | 1080i | 60Hz | |||
6 | hdmi_mode=6 | 480i | 60Hz | |||
7 | hdmi_mode=7 | 480i | 60Hz | H | ||
8 | hdmi_mode=8 | 240p | 60Hz | |||
9 | hdmi_mode=9 | 240p | 60Hz | H | ||
10 | hdmi_mode=10 | 480i | 60Hz | 4x | ||
11 | hdmi_mode=11 | 480i | 60Hz | 4x H | ||
12 | hdmi_mode=12 | 240p | 60Hz | 4x | ||
13 | hdmi_mode=13 | 240p | 60Hz | 4x H | ||
14 | hdmi_mode=14 | 480p | 60Hz | 2x | ||
15 | hdmi_mode=15 | 480p | 60Hz | 2x H | ||
16 | hdmi_mode=16 | 1080p | 60Hz | |||
17 | hdmi_mode=17 | 576p | 50Hz | |||
18 | hdmi_mode=18 | 576p | 50Hz | H | ||
19 | hdmi_mode=19 | 720p | 50Hz | |||
20 | hdmi_mode=20 | 1080i | 50Hz | |||
21 | hdmi_mode=21 | 576i | 50Hz | |||
22 | hdmi_mode=22 | 576i | 50Hz | H | ||
23 | hdmi_mode=23 | 288p | 50Hz | |||
24 | hdmi_mode=24 | 288p | 50Hz | H | ||
25 | hdmi_mode=25 | 576i | 50Hz | 4x | ||
26 | hdmi_mode=26 | 576i | 50Hz | 4x H | ||
27 | hdmi_mode=27 | 288p | 50Hz | 4x | ||
28 | hdmi_mode=28 | 288p | 50Hz | 4x H | ||
29 | hdmi_mode=29 | 576p | 50Hz | 2x | ||
30 | hdmi_mode=30 | 576p | 50Hz | 2x H | ||
31 | hdmi_mode=31 | 1080p | 50Hz | |||
32 | hdmi_mode=32 | 1080p | 24Hz | |||
33 | hdmi_mode=33 | 1080p | 25Hz | |||
34 | hdmi_mode=34 | 1080p | 30Hz | |||
35 | hdmi_mode=35 | 480p | 60Hz | 4x | ||
36 | hdmi_mode=36 | 480p | 60Hz | 4xH | ||
37 | hdmi_mode=37 | 576p | 50Hz | 4x | ||
38 | hdmi_mode=38 | 576p | 50Hz | 4x H | ||
39 | hdmi_mode=39 | 1080i | 50Hz | reduced blanking | ||
40 | hdmi_mode=40 | 1080i | 100Hz | |||
41 | hdmi_mode=41 | 720p | 100Hz | |||
42 | hdmi_mode=42 | 576p | 100Hz | |||
43 | hdmi_mode=43 | 576p | 100Hz | H | ||
44 | hdmi_mode=44 | 576i | 100Hz | |||
45 | hdmi_mode=45 | 576i | 100Hz | H | ||
46 | hdmi_mode=46 | 1080i | 120Hz | |||
47 | hdmi_mode=47 | 720p | 120Hz | |||
48 | hdmi_mode=48 | 480p | 120Hz | |||
49 | hdmi_mode=49 | 480p | 120Hz | H | ||
50 | hdmi_mode=50 | 480i | 120Hz | |||
51 | hdmi_mode=51 | 480i | 120Hz | H | ||
52 | hdmi_mode=52 | 576p | 200Hz | |||
53 | hdmi_mode=53 | 576p | 200Hz | H | ||
54 | hdmi_mode=54 | 576i | 200Hz | |||
55 | hdmi_mode=55 | 576i | 200Hz | H | ||
56 | hdmi_mode=56 | 480p | 240Hz | |||
57 | hdmi_mode=57 | 480p | 240Hz | H | ||
58 | hdmi_mode=58 | 480i | 240Hz | |||
59 | hdmi_mode=59 | 480i | 240Hz | H |
H means 16:9 variant (of a normally 4:3 mode). 2x means pixel doubled (i.e. higher clock rate, with each pixel repeated twice) 4x means pixel quadrupled (i.e. higher clock rate, with each pixel repeated four times)
以下是计算机显示器使用的分辨率。这些分辨率的hdmi_group=2。
序号 | 参数 | 分辨率 | 刷新频率 | -- |
---|---|---|---|---|
1 | hdmi_mode=1 | 640x350 | 85Hz | |
2 | hdmi_mode=2 | 640x400 | 85Hz | |
3 | hdmi_mode=3 | 720x400 | 85Hz | |
4 | hdmi_mode=4 | 640x480 | 60Hz | |
5 | hdmi_mode=5 | 640x480 | 72Hz | |
6 | hdmi_mode=6 | 640x480 | 75Hz | |
7 | hdmi_mode=7 | 640x480 | 85Hz | |
8 | hdmi_mode=9 | 800x600 | 60Hz | |
9 | hdmi_mode=10 | 800x600 | 72Hz | |
10 | hdmi_mode=11 | 800x600 | 75Hz | |
11 | hdmi_mode=12 | 800x600 | 85Hz | |
12 | hdmi_mode=13 | 800x600 | 120Hz | |
13 | hdmi_mode=14 | 848x480 | 60Hz | |
14 | hdmi_mode=15 | 1024x768 | 43Hz | DO NOT USE |
15 | hdmi_mode=16 | 1024x768 | 60Hz | |
16 | hdmi_mode=18 | 1024x768 | 75Hz | |
17 | hdmi_mode=19 | 1024x768 | 85Hz | |
18 | hdmi_mode=20 | 1024x768 | 120Hz | |
19 | hdmi_mode=21 | 1152x864 | 75Hz | |
20 | hdmi_mode=22 | 1280x768 | reduced blanking | |
21 | hdmi_mode=23 | 1280x768 | 60Hz | |
22 | hdmi_mode=24 | 1280x768 | 75Hz | |
23 | hdmi_mode=25 | 1280x768 | 85Hz | |
24 | hdmi_mode=26 | 1280x768 | 120Hz | reduced blanking |
25 | hdmi_mode=27 | 1280x800 | reduced blanking | |
26 | hdmi_mode=28 | 1280x800 | 60Hz | |
27 | hdmi_mode=29 | 1280x800 | 75Hz | |
28 | hdmi_mode=30 | 1280x800 | 85Hz | |
29 | hdmi_mode=31 | 1280x800 | 120Hz | reduced blanking |
30 | hdmi_mode=32 | 1280x960 | 60Hz | |
31 | hdmi_mode=33 | 1280x960 | 85Hz | |
32 | hdmi_mode=34 | 1280x960 | 120Hz | reduced blanking |
33 | hdmi_mode=35 | 1280x1024 | 60Hz | |
34 | hdmi_mode=36 | 1280x1024 | 75Hz | |
35 | hdmi_mode=37 | 1280x1024 | 85Hz | |
36 | hdmi_mode=38 | 1280x1024 | 120Hz | reduced blanking |
37 | hdmi_mode=39 | 1360x768 | 60Hz | |
38 | hdmi_mode=40 | 1360x768 | 120Hz | reduced blanking |
39 | hdmi_mode=41 | 1400x1050 | reduced blanking | |
40 | hdmi_mode=42 | 1400x1050 | 60Hz | |
41 | hdmi_mode=43 | 1400x1050 | 75Hz | |
42 | hdmi_mode=44 | 1400x1050 | 85Hz | |
43 | hdmi_mode=45 | 1400x1050 | 120Hz | reduced blanking |
44 | hdmi_mode=46 | 1440x900 | reduced blanking | |
45 | hdmi_mode=47 | 1440x900 | 60Hz | |
46 | hdmi_mode=48 | 1440x900 | 75Hz | |
47 | hdmi_mode=49 | 1440x900 | 85Hz | |
48 | hdmi_mode=50 | 1440x900 | 120Hz | reduced blanking |
49 | hdmi_mode=51 | 1600x1200 | 60Hz | |
50 | hdmi_mode=52 | 1600x1200 | 65Hz | |
51 | hdmi_mode=53 | 1600x1200 | 70Hz | |
52 | hdmi_mode=54 | 1600x1200 | 75Hz | |
53 | hdmi_mode=55 | 1600x1200 | 85Hz | |
54 | hdmi_mode=56 | 1600x1200 | 120Hz | reduced blanking |
55 | hdmi_mode=57 | 1680x1050 | reduced blanking | |
56 | hdmi_mode=58 | 1680x1050 | 60Hz | |
57 | hdmi_mode=59 | 1680x1050 | 75Hz | |
58 | hdmi_mode=60 | 1680x1050 | 85Hz | |
59 | hdmi_mode=61 | 1680x1050 | 120Hz | reduced blanking |
60 | hdmi_mode=62 | 1792x1344 | 60Hz | |
61 | hdmi_mode=63 | 1792x1344 | 75Hz | |
62 | hdmi_mode=64 | 1792x1344 | 120Hz | reduced blanking |
63 | hdmi_mode=65 | 1856x1392 | 60Hz | |
64 | hdmi_mode=66 | 1856x1392 | 75Hz | |
65 | hdmi_mode=67 | 1856x1392 | 120Hz | reduced blanking |
66 | hdmi_mode=68 | 1920x1200 | reduced blanking | |
67 | hdmi_mode=69 | 1920x1200 | 60Hz | |
68 | hdmi_mode=70 | 1920x1200 | 75Hz | |
69 | hdmi_mode=71 | 1920x1200 | 85Hz | |
70 | hdmi_mode=72 | 1920x1200 | 120Hz | reduced blanking |
71 | hdmi_mode=73 | 1920x1440 | 60Hz | |
72 | hdmi_mode=74 | 1920x1440 | 75Hz | |
73 | hdmi_mode=75 | 1920x1440 | 120Hz | reduced blanking |
74 | hdmi_mode=76 | 2560x1600 | reduced blanking | |
75 | hdmi_mode=77 | 2560x1600 | 60Hz | |
76 | hdmi_mode=78 | 2560x1600 | 75Hz | |
77 | hdmi_mode=79 | 2560x1600 | 85Hz | |
78 | hdmi_mode=80 | 2560x1600 | 120Hz | reduced blanking |
79 | hdmi_mode=81 | 1366x768 | 60Hz | |
80 | hdmi_mode=82 | 1080p | 60Hz | |
81 | hdmi_mode=83 | 1600x900 | reduced blanking | |
82 | hdmi_mode=84 | 2048x1152 | reduced blanking | |
83 | hdmi_mode=85 | 720p | 60Hz | |
84 | hdmi_mode=86 | 1366x768 | reduced blanking |
这个配置提供了HDMI的所有故障排除用的保守设置。 请将SD卡插入电脑,将这些内容存为config.txt。(原来的config.txt可以备份一下。)
hdmi_force_hotplug=1
config_hdmi_boost=4
hdmi_group=2
hdmi_mode=9
hdmi_drive=2
hdmi_ignore_edid=0xa5000080
disable_overscan=1
解释: hdmi_force_hotplug: 强制使用HDMI输出(强行认为HDMI口已经插入了设备) config_hdmi_boost: HDMI信号增强。 hdmi_group、hdmi_mode: 决定分辨率。group=2, mode=9 代表800×600 @ 60Hz。 hdmi_drive: 强制音频输出到HDMI口(注意,仅适用于带音频的HDMI-VGA转换器!!如果想让音频从模拟输出,则去掉此项!!) hdmi_ignore_edid: 强行按hdmi_group和hdmi_mode规定的分辨率输出。不检测显示器自身的分辨率。 disable_overscan: 强行禁止保留黑边功能。
这个文件会命令树莓派:强制使用800×600分辨率,60Hz刷新率,并强制从HDMI输出。 请先尝试这样开机。如果开机能成功,就把hdmi_group和hdmi_mode,更改成自己显示器的分辨率即可。 所有可用的分辨率列表请见:自定义树莓派的显示分辨率。 如果不行,请更改hdmi_mode的值更换以下其他分辨率
--转至树莓派实验室