本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
在 G4ad 執行個體上設定雙 4K 顯示器
啟動 G4ad 執行個體之後,您可以設定雙 4K 顯示器。
安裝AMD驅動程式並設定雙螢幕
-
Connect 至您的 Linux 執行個體,以取得GPU您要以雙 4K (2x4k) 為目標的PCI匯流排位址:
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
-
請注意,PCI匯流排位址是 00:1 e.0 在上述輸出中。建立名為
/etc/modprobe.d/amdgpu.conf
的檔案並新增:options amdgpu virtual_display=0000:00:1e.0,2
-
若要在 Linux 上安裝AMD驅動程式,請參閱AMDEC2執行個體的驅動程式。如果您已經安裝了AMDGPU驅動程式,則需要透過 dkms 重建 amdgpu 核心模組。
-
使用下面的 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 Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Virtual" DefaultDepth 24 Option "AllowEmptyInitialConfiguration" "True" SubSection "Display" Virtual 3840 2160 Depth 32 EndSubSection EndSection
-
DCV依照設定互動式桌面中的指示進行設定。
-
DCV設置完成後,重新啟動。
-
確認驅動程式可正常運作:
dmesg | grep amdgpu
回應應如下所示:
Initialized amdgpu
-
您應該會在
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
-
當您連線到時DCV,請將解析度變更為 2x4K,確認雙顯示器支援已由註冊。DCV
設定適用於 Linux 的互動式桌面
在您確認 Linux 執行個體已安裝AMDGPU驅動程式且 amdgpu 正在使用中之後,您就可以安裝互動式桌面管理員。我們建議使用MATE桌面環境以獲得最佳的相容性和效能。
先決條件
開啟文字編輯器,並將以下內容儲存為名為 xorg.conf
的檔案。你的執行個體需要這個檔案。
Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" 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 "Monitor0" VendorName "Unknown" ModelName "Unknown" EndSection Section "Device" Identifier "Device0" 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 "Monitor0" DefaultDepth 24 Option "AllowEmptyInitialConfiguration" "True" SubSection "Display" Virtual 3840 2160 Depth 32 EndSubSection EndSection
若要在 Amazon Linux 2 上設定互動式桌面
-
安裝存EPEL放庫。
$
C:\>
sudo amazon-linux-extras install epel -y
-
安裝MATE桌面。
$
C:\>
sudo amazon-linux-extras install mate-desktop1.x -y
$
C:\>
sudo yum groupinstall "MATE Desktop" -y
$
C:\>
sudo systemctl disable firewalld
-
將
xorg.conf
檔案複製至/etc/X11/xorg.conf
。 -
重新啟動執行個體。
$
C:\>
sudo reboot
-
(選擇性) 安裝要NICEDCV做為高效能顯示通訊協定的NICEDCV伺服器,然後使用偏好的用戶端連線至NICEDCV工作階段。
在 Ubuntu 上設定互動式桌面
-
安裝MATE桌面。
$
sudo apt install xorg-dev ubuntu-mate-desktop -y
$
C:\>
sudo apt purge ifupdown -y
-
將
xorg.conf
檔案複製至/etc/X11/xorg.conf
。 -
重新啟動執行個體。
$
sudo reboot
-
為 Ubuntu 的適當版本安裝AMF編碼器。
$
sudo apt install ./amdgpu-pro-20.20-*/amf-amdgpu-pro_20.20-*_amd64.deb
-
(選擇性) 安裝要NICEDCV做為高效能顯示通訊協定的NICEDCV伺服器,然後使用偏好的用戶端連線至NICEDCV工作階段。
-
DCV安裝後給用DCV戶視頻權限:
$
sudo usermod -aG video dcv
在 CentOS 上設定互動式桌面
-
安裝存EPEL放庫。
$
sudo yum update -y
$
C:\>
sudo yum install epel-release -y
-
安裝MATE桌面。
$
sudo yum groupinstall "MATE Desktop" -y
$
C:\>
sudo systemctl disable firewalld
-
將
xorg.conf
檔案複製至/etc/X11/xorg.conf
。 -
重新啟動執行個體。
$
sudo reboot
-
(選擇性) 安裝要NICEDCV做為高效能顯示通訊協定的NICEDCV伺服器,然後使用偏好的用戶端連線至NICEDCV工作階段。