在 G4ad 上设置双 4K 显示器 - Amazon Elastic Compute Cloud
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

在 G4ad 上设置双 4K 显示器

启动 G4ad 实例

  1. 连接到您的 Linux 实例以获取相关 GPU 的 PCI 总线地址,以用作双 4K(2x4k)的目标:

    lspci -vv | grep -i amd

    您将获得与下内容类似的输出:

    00:1e.0 Display controller: Advanced Micro Devices, Inc. [*AMD*/ATI] Device 7362 (rev c3) Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 0a34
  2. 请注意,上述输出中的 PCI 总线地址为 00:1e.0。创建一个名为 /etc/modprobe.d/amdgpu.conf 的文件然后添加:

    options amdgpu virtual_display=0000:00:1e.0,2
  3. 按照此处的说明在 Linux 上安装 AMD 驱动程序。如果您已经安装了 AMD GPU 驱动程序,则需要通过 dkms 重建 amdgpu 内核模块。

  4. 使用下面的 xorg.conf 文件定义双(2x4K)屏幕拓扑并将文件保存到 /etc/X11/xorg.conf:

    ~$ cat /etc/X11/xorg.conf Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" Screen 1 "Screen1" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" Option "Xinerama" "1" EndSection Section "Files" ModulePath "/opt/amdgpu/lib64/xorg/modules/drivers" ModulePath "/opt/amdgpu/lib/xorg/modules" ModulePath "/opt/amdgpu-pro/lib/xorg/modules/extensions" ModulePath "/opt/amdgpu-pro/lib64/xorg/modules/extensions" ModulePath "/usr/lib64/xorg/modules" ModulePath "/usr/lib/xorg/modules" EndSection Section "InputDevice" # generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" # generated from default Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Virtual" VendorName "Unknown" ModelName "Unknown" Option "Primary" "true" EndSection Section "Monitor" Identifier "Virtual-1" VendorName "Unknown" ModelName "Unknown" Option "RightOf" "Virtual" EndSection Section "Device" Identifier "Device0" Driver "amdgpu" VendorName "AMD" BoardName "Radeon MxGPU V520" BusID "PCI:0:30:0" EndSection Section "Device" Identifier "Device1" Driver "amdgpu" VendorName "AMD" BoardName "Radeon MxGPU V520" BusID "PCI:0:30:0" EndSection Section "Extensions" Option "DPMS" "Disable" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Virtual" DefaultDepth 24 Option "AllowEmptyInitialConfiguration" "True" SubSection "Display" Virtual 3840 2160 Depth 32 EndSubSection EndSection
  5. 按照设置交互式桌面中的说明设置 DCV。

  6. 完成 DCV 设置后,重新启动。

  7. 确认驱动程序运行正常:

    dmesg | grep amdgpu

    该响应应当与以下内容相似:

    Initialized amdgpu
  8. 您应会在 DISPLAY=:0 xrandr -q 的输出中看到您已连接了 2 个虚拟显示器:

    ~$ DISPLAY=:0 xrandr -q Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384 Virtual connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 4096x3112 60.00 3656x2664 59.99 4096x2160 60.00 3840x2160 60.00 1920x1200 59.95 1920x1080 60.00 1600x1200 59.95 1680x1050 60.00 1400x1050 60.00 1280x1024 59.95 1440x900 59.99 1280x960 59.99 1280x854 59.95 1280x800 59.96 1280x720 59.97 1152x768 59.95 1024x768 60.00 59.95 800x600 60.32 59.96 56.25 848x480 60.00 59.94 720x480 59.94 640x480 59.94 59.94 Virtual-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm 4096x3112 60.00 3656x2664 59.99 4096x2160 60.00 3840x2160 60.00 1920x1200 59.95 1920x1080 60.00 1600x1200 59.95 1680x1050 60.00 1400x1050 60.00 1280x1024 59.95 1440x900 59.99 1280x960 59.99 1280x854 59.95 1280x800 59.96 1280x720 59.97 1152x768 59.95 1024x768 60.00 59.95 800x600 60.32 59.96 56.25 848x480 60.00 59.94 720x480 59.94 640x480 59.94 59.94
  9. 连接到 DCV 后,将分辨率更改为 2x4K,确认 DCV 已经注册了双显示器支持。

    
                        更改 DCV 分辨率