When using a Raspberry Pi 4B (4GB, Rev 1.5) running Raspberry Pi OS (64-bit), after initially configuring SSH and enabling the VNC server, you may encounter a blank screen when connecting with RealVNC Viewer (only the right-click menu is displayed). This is typically caused by incompatibility between the Wayland display server—which the system uses by default—and RealVNC.
1. Problem Analysis
After ruling out resolution settings and driver issues, the root cause is that Raspberry Pi OS has Wayland enabled by default in these newer versions, and RealVNC does not yet fully support it.
Although some online tutorials suggest modifying /etc/gdm3/daemon.conf in WaylandEnable=false, but that configuration file may not exist. A safer and officially recommended method is to use raspi-config The tool switches back to the X11 display service.
2. Solutions
We will use a command-line tool raspi-config Switch the display backend back from Wayland to X11.
Operating Procedures
graph TD
Start[SSH 连接树莓派] --> Cmd[输入 sudo raspi-config]
Cmd --> Opt1[选择 6 Advanced Options]
Opt1 --> Opt2[选择 A6 Wayland]
Opt2 --> Opt3[选择 W1 X11]
Opt3 --> Save[保存并退出]
Save --> Reboot[重启树莓派]
Reboot --> Success[VNC 正常连接]
Detailed Steps
Open the Configuration Tool: In the SSH terminal, enter the following command:
sudo raspi-configLocation Settings: Use the arrow keys on the keyboard to select
6 Advanced Options(Advanced Options), press Enter.Select Display Service: Select
A6 Wayland, press Enter.Switch to X11: Select from the pop-up menu
W1 X11(Openbox window manager with X11 backend), press Enter to confirm.Restart to take effect: Press
EscorTabSelect using the keyboard<Finish>When you exit the tool, the system will ask if you want to restart. Select<Yes>Restart the system.
Once the restart is complete, connect again using RealVNC Viewer; the blank screen issue should be resolved, and you should be able to see your desktop as usual.

