21.10 中的虚拟监视器

21.10 中的虚拟监视器

直到 20.04 我才能够通过这种方式创建一个用于无头机器远程访问的假监视器:

$ sudo apt install gnome-session gdm3
$ sudo systemctl set-default graphical.target

$ sudo apt install  xserver-xorg-core-hwe-18.04
$ sudo apt install  xserver-xorg-video-dummy

/usr/share/X11/xorg.conf.d/xorg.conf

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection
Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection
Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1920x1080"
    EndSubSection
EndSection

它运行得非常好,让我能够使用远程桌面应用程序进行连接。然而,对于 21.10,此过程会导致出现“哦不,出了点问题”的死亡页面。

我应该如何改变这一点才能使虚拟监视器功能再次发挥作用?

我知道我可以使用硬件插头,但这不是问题。

答案1

这对我而言在 22.04 上有效:

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
    VideoRam 256000
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 5.0 - 1000.0
    VertRefresh 5.0 - 200.0
    ModeLine "1920x1080" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +Hsync +Vsync
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1920x1080" "1280x800" "1024x768" "1920x1080" "1440x900"
    EndSubSection
EndSection

我从https://gist.github.com/divinity76/ce210b5dbcd9ea7d0585ac403caef577

相关内容