树莓派有黑边不能全屏解决方法

在使用树莓派连接HDMI电脑显示器的时候,可能会出现如下图所示的有黑边的情况。这时候需要调节分辨率以适应屏幕。

将树莓派的tf卡插入电脑,在卡的根目录下找到配置文件config.txt,建议用Notepad++等代码编辑器打开后找到如下代码:

调节任何参数时,将#号去除即可生效(下面修改的值是默认带#的,请务必去除#)

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2  //将显示模式切换成DMT(显示器模式)
hdmi_mode=82  //1920x1080	60Hz	1080p 如果显示器不是1080P。则可以参考注1参数修改

这时候就将显示设置成1080P的分辨率,但是是不带声音的,如果你的显示器支持HDMI声音输出或者自带音响,则将如下代码参数去除#号解锁强制获取声音。

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2  //HDMI模式

更多设置参考官方配置文档:https://www.raspberrypi.org/documentation/configuration/config-txt.md

注1: DMT模式分辨率参数

hdmi_mode resolution frequency notes
1 640x350 85Hz
2 640x400 85Hz
3 720x400 85Hz
4 640x480 60Hz
5 640x480 72Hz
6 640x480 75Hz
7 640x480 85Hz
8 800x600 56Hz
9 800x600 60Hz
10 800x600 72Hz
11 800x600 75Hz
12 800x600 85Hz
13 800x600 120Hz
14 848x480 60Hz
15 1024x768 43Hz incompatible with the Raspberry Pi
16 1024x768 60Hz
17 1024x768 70Hz
18 1024x768 75Hz
19 1024x768 85Hz
20 1024x768 120Hz
21 1152x864 75Hz
22 1280x768 reduced blanking
23 1280x768 60Hz
24 1280x768 75Hz
25 1280x768 85Hz
26 1280x768 120Hz reduced blanking
27 1280x800 reduced blanking
28 1280x800 60Hz
29 1280x800 75Hz
30 1280x800 85Hz
31 1280x800 120Hz reduced blanking
32 1280x960 60Hz
33 1280x960 85Hz
34 1280x960 120Hz reduced blanking
35 1280x1024 60Hz
36 1280x1024 75Hz
37 1280x1024 85Hz
38 1280x1024 120Hz reduced blanking
39 1360x768 60Hz
40 1360x768 120Hz reduced blanking
41 1400x1050 reduced blanking
42 1400x1050 60Hz
43 1400x1050 75Hz
44 1400x1050 85Hz
45 1400x1050 120Hz reduced blanking
46 1440x900 reduced blanking
47 1440x900 60Hz
48 1440x900 75Hz
49 1440x900 85Hz
50 1440x900 120Hz reduced blanking
51 1600x1200 60Hz
52 1600x1200 65Hz
53 1600x1200 70Hz
54 1600x1200 75Hz
55 1600x1200 85Hz
56 1600x1200 120Hz reduced blanking
57 1680x1050 reduced blanking
58 1680x1050 60Hz
59 1680x1050 75Hz
60 1680x1050 85Hz
61 1680x1050 120Hz reduced blanking
62 1792x1344 60Hz
63 1792x1344 75Hz
64 1792x1344 120Hz reduced blanking
65 1856x1392 60Hz
66 1856x1392 75Hz
67 1856x1392 120Hz reduced blanking
68 1920x1200 reduced blanking
69 1920x1200 60Hz
70 1920x1200 75Hz
71 1920x1200 85Hz
72 1920x1200 120Hz reduced blanking
73 1920x1440 60Hz
74 1920x1440 75Hz
75 1920x1440 120Hz reduced blanking
76 2560x1600 reduced blanking
77 2560x1600 60Hz
78 2560x1600 75Hz
79 2560x1600 85Hz
80 2560x1600 120Hz reduced blanking
81 1366x768 60Hz
82 1920x1080 60Hz 1080p
83 1600x900 reduced blanking
84 2048x1152 reduced blanking
85 1280x720 60Hz 720p
86 1366x768 reduced blanking

你可能感兴趣的:(树莓派,Raspberry,Pi)