본문 바로가기
Virtual/Protocol

[Protocol] Rockylinux DCV Setting (with 3D setting)

by Yoon_estar 2025. 7. 31.
728x90

개요

Rockylinux 8.10에 디스플레이를 가져오기 위한 DCV 서버를 설치하고, 클라이언트에서 GPU 리소스도 이용할 수 있는 3D 세팅까지에 관한 글입니다. 

 

사전 준비

  • 접속할 클라이언트 사용자 PC 세팅(아래와 같이 C++이 필요하다고 팝업이 뜰경우)

 

Visual Studio C++ install

winget install "Visual Studio Community 2022" --override "--add Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cpp" -s msstore

 

Linux Server setting

OS Package install

yum groupinstall 'Server with GUI'
yum groupinstall "GNOME Desktop"

GPU 장비 확인

# nvidia-xconfig --query-gpu-info
Number of GPUs: 1

GPU #0:
  Name      : NVIDIA GeForce RTX 3050
  UUID      : GPU-720e5c1b-766c-a77a-af87-7aadb15a8a71
  PCI BusID : PCI:7:0:0

  Number of Display Devices: 0

 

X설정

  • 위의 정보를 토대로 아래 명령어 입력
# nvidia-xconfig -a --virtual=1024x768 --busid=PCI:7:0:0 --use-display-device=none

 

Xorg.conf 설정

# vim /etc/X11/xorg.conf

================================================

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    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"
    + Option         "DPMS" "Disable"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 3050"
    BusID          "PCI:1:0:0"
    + Option "AllowEmptyInitialConfiguration"
    + Option "AllowSHMPixmaps" "True"
    + Option "ModeValidation" "AllowNonEdidModes"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "UseDisplayDevice" "none"
    SubSection     "Display"
        Virtual     1024 768
        Depth       24
    EndSubSection
EndSection

+ Section "Extensions"
+ Option "DPMS" "Disable"
+ EndSection

================================================

 

적용

/usr/bin/Xorg :0 -ac -audit 0 -tst -auth /var/gdm/:0.Xauth -nolisten tcp vt7&

 

프로세스 확인

# ps ax | grep -i Xorg

 

Wayland Protocol 비활성화

# vi /etc/gdm/custom.conf

==================================

```
[daemon]
+ WaylandEnable=false 
```

==================================

systemctl restart gdm

 

OpenGL 렌더링 가능 여부 체크

# DISPLAY=:0 XAUTHORITY=$(ps aux | grep "X.*\-auth" | grep -v grep | sed -n 's/.*-auth \([^ ]\+\).*/\1/p') glxinfo | grep -i "opengl.*version"

OpenGL core profile version string: 4.5 (Core Profile) Mesa 23.1.4
OpenGL core profile shading language version string: 4.50
OpenGL version string: 4.5 (Compatibility Profile) Mesa 23.1.4
OpenGL shading language version string: 4.50
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.1.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

 

재부팅 후 프로세스 꼬임 현상 Trouble Shooting

  • 현상
# /usr/bin/Xorg :0 -ac -audit 0 -tst -auth /var/gdm/:0.Xauth -nolisten tcp vt7&
[1] 14690
[root@DEMO-NODE126 ~]# _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

[1]+  Exit 1                  /usr/bin/Xorg :0 -ac -audit 0 -tst -auth /var/gdm/:0.Xauth -nolisten tcp vt7
[root@DEMO-NODE126 ~]# cat "/var/log/Xorg.0.log"
[  1412.004] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[  1412.004] _XSERVTransMakeAllCOTSServerListeners: server already running
[  1412.004] (EE)
Fatal server error:
[  1412.004] (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
[  1412.004] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[  1412.004] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  1412.004] (EE)
[  1412.004] (EE) Server terminated with error (1). Closing log file.

 

  • 해결
# rm -rf /tmp/.X11-unix
# mkdir /tmp/.X11-unix
# chmod 1777 /tmp/.X11-unix
# chown root:root /tmp/.X11-unix

# /usr/bin/Xorg :0 -ac -audit 0 -tst -auth /var/gdm/:0.Xauth -nolisten tcp vt7& 
 
# ps ax | grep -i Xorg

# nvidia-smi
Mon Jul 28 13:23:59 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.169                Driver Version: 570.169        CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3050        Off |   00000000:07:00.0 Off |                  N/A |
| 30%   37C    P8            N/A  /  115W |      22MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A           14873      G   /usr/libexec/Xorg                         8MiB |
+-----------------------------------------------------------------------------------------+

 

DCV Download & Install

Amazon DCV | Download

 

Amazon DCV | Download

For customers that use DCV on-premises or on non-AWS clouds - to avoid license related errors, please make sure that your DCV license is valid & up-to-date before installing/updating DCV server software. Version 2024.0-19030 Size: 65.37MB SHA256 checksum V

www.amazondcv.com

# wget https://d1uj6qtbmh3dt5.cloudfront.net/2024.0/Servers/nice-dcv-2024.0-19030-el8-x86_64.tgz
# tar zxvf nice-dcv-2024.0-19030-el8-x86_64.tgz
# cd nice-dcv-2024.0-19030-el8-x86_64/
# dnf localinstall ./*.rpm --skip-broken

 

DCV 접속하기

  • conf file setting
# vi /etc/dcv/dcv.conf

===========================================

[session-management]

'''
create-session = true
authentication = "system"

'''

===========================================

# systemctl enable dcvserver
# systemctl restart dcvserver

 

  • session create
# dcv create-session virtual-estar987 --owner admin
Could not create session. The maximum number of sessions has been reached

# dcv close-session console
# dcv create-session virtual-admin --owner admin

# dcv create-session virtual-estar987 --owner estar987
# dcv list-sessions
Session: 'virtual-estar987' (owner:estar987 type:virtual)
Session: 'virtual' (owner:root type:virtual)

 

접속 후 3D GPU 테스트

/opt/VirtualGL/bin/vglrun /opt/VirtualGL/bin/glxspheres64