G4ad Linux 인스턴스에서 듀얼 4K 디스플레이 설정하기
G4ad Linux 인스턴스에서 듀얼 4K 디스플레이 설정하기
G4ad 인스턴스를 시작한 뒤 듀얼 4K 디스플레이를 설정할 수 있어요. AMD 드라이버를 설치하고, amdgpu 커널 모듈을 구성해 가상 디스플레이를 여러 개 만들고, xorg.conf로 화면 토폴로지를 정의하는 순서로 진행합니다.
출처: 문서
본문
G4ad 인스턴스를 시작한 뒤 듀얼 4K 디스플레이를 설정할 수 있어요.
AMD 드라이버 설치 및 듀얼 화면 구성하기
AMD 드라이버를 설치하고 듀얼 화면을 구성하려면
- 듀얼 4K(2x4K)를 위해 대상으로 삼을 GPU의 PCI Bus 주소를 얻으려면 Linux 인스턴스에 연결해요. 다음 명령을 실행하면 비슷한 출력을 얻을 수 있어요.
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 bus 주소가
00:1e.0인 것을 확인할 수 있어요./etc/modprobe.d/amdgpu.conf라는 이름의 파일을 만들고 다음을 추가하세요.
options amdgpu virtual_display=0000:00:1e.0,2
-
Linux에 AMD 드라이버를 설치하려면 AMD drivers for your EC2 instance를 참고하세요. 이미 AMD GPU 드라이버가 설치되어 있다면
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 인스턴스에 AMD GPU 드라이버가 설치되어 있고 amdgpu가 사용 중임을 확인한 뒤에는 대화형 데스크톱 관리자를 설치할 수 있어요. 최고의 호환성과 성능을 위해 MATE 데스크톱 환경을 권장합니다.
사전 요구사항 (Prerequisite)
텍스트 편집기를 열고 다음을 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 리포지토리를 설치해요.
[ec2-user ~]$ sudo amazon-linux-extras install epel -y
- MATE 데스크톱을 설치해요.
[ec2-user ~]$ sudo amazon-linux-extras install mate-desktop1.x -y
[ec2-user ~]$ sudo yum groupinstall "MATE Desktop" -y
[ec2-user ~]$ sudo systemctl disable firewalld
xorg.conf파일을/etc/X11/xorg.conf로 복사해요.- 인스턴스를 재부팅해요.
[ec2-user ~]$ sudo reboot
- (선택) 고성능 디스플레이 프로토콜로 Amazon DCV를 사용하려면 Amazon DCV 서버를 설치하고, 원하는 클라이언트로 Amazon DCV 세션에 연결하세요.
Ubuntu에서 대화형 데스크톱을 설정하려면
- MATE 데스크톱을 설치해요.
$ sudo apt install xorg-dev ubuntu-mate-desktop -y
$ 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
- (선택) 고성능 디스플레이 프로토콜로 Amazon DCV를 사용하려면 Amazon DCV 서버를 설치하고, 원하는 클라이언트로 Amazon DCV 세션에 연결하세요.
- DCV 설치 후 DCV 사용자에게 video 권한을 부여해요.
$ sudo usermod -aG video dcv
CentOS에서 대화형 데스크톱을 설정하려면
- EPEL 리포지토리를 설치해요.
$ sudo yum update -y
$ sudo yum install epel-release -y
- MATE 데스크톱을 설치해요.
$ sudo yum groupinstall "MATE Desktop" -y
$ sudo systemctl disable firewalld
xorg.conf파일을/etc/X11/xorg.conf로 복사해요.- 인스턴스를 재부팅해요.
$ sudo reboot
- (선택) 고성능 디스플레이 프로토콜로 Amazon DCV를 사용하려면 Amazon DCV 서버를 설치하고, 원하는 클라이언트로 Amazon DCV 세션에 연결하세요.