ubuntu2404 gpu 没接显示器,如何保证远程显示的分辨率
1. 使用 xserver-xorg-video-dummy 创建虚拟显示器
如果系统在无物理显示器连接时无法识别显示输出,可以使用 xserver-xorg-video-dummy
驱动程序创建虚拟显示器。以下是设置步骤:
-
安装虚拟显示器驱动程序:
sudo apt install xserver-xorg-video-dummy
-
创建 Xorg 配置文件:
创建文件
/etc/X11/xorg.conf.d/10-dummy.conf
,内容如下:Section "Monitor"Identifier "Monitor0"HorizSync 28.0-80.0VertRefresh 48.0-75.0Modeline "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync EndSectionSection "Device"Identifier "Card0"Driver "dummy"VideoRam 256000 EndSectionSection "Screen"Identifier "Screen0"Device "Card0"Monitor "Monitor0"DefaultDepth 24SubSection "Display"Depth 24Modes "1600x900_60.00"EndSubSection EndSection
最后重启系统:
保存文件后,重启系统以应用配置。