樹莓派4B 設置 HDMI 分辨率設置 (設置800x400分辨率為例)【圖文】


版權聲明:本文為博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。
本文鏈接:https://blog.csdn.net/ZChen1996/article/details/107992908

1. ssh 連接樹莓派

在這里插入圖片描述

2. 打開 /boot/config.txt

$ sudo nano /boot/config

在這里插入圖片描述

3. 編輯以下內容

以下項中,有注釋的取消注釋,沒有的項要添加
disable_overscan=1
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
framebuffer_width=800
(控制台framebuffer寬度,按需設置)
framebuffer_height=480 (控制台framebuffer高度,按需設置)
hdmi_force_hotplug=1 (即便沒有檢測到HDMI顯示器也要使用HDMI模式,使用 VNC 的一定要設置
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
(分辨率800x480 60Hz , 自行修改為自己需要的)
hdmi_drive=2

# 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=0
overscan_right=0
overscan_top=0
overscan_bottom=0

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=800
framebuffer_height=480

# 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)
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0

# 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 infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d


在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述

4. Ctrl + O 回車 保存,然后 Ctrl + X 退出

在這里插入圖片描述
在這里插入圖片描述

5. 輸入 sudo reboot 重啟,重啟后可成功顯示桌面

$ sudo reboot

在這里插入圖片描述

6. 7 寸屏顯示效果

在這里插入圖片描述

7. VNC 顯示效果

在這里插入圖片描述


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM