Nice DCV cannot access the X server / libGL error

0

Hi all,

while trying to setup Nice DCV on a Linux Rocky8 G4 instance, it seems like I'm running into the issue that DCV is not able to access the X server. I am following the installation guide on https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux.html and everything works fine except when I test the post installation step

sudo DISPLAY=:0 XAUTHORITY=$(ps aux | grep "X.*\-auth" | grep -v grep | sed -n 's/.*-auth \([^ ]\+\).*/\1/p') xhost | grep "SI:localuser:dcv$"

it gives me an empty return.

Since I was not able to find anything in the dcv server logs I tried to run the server anyway and created a session. The generated session log gave me the following error:

2022-10-26 23:47:48,219549940 [5851] INFO  session-starter - DCV-GL fallback enabled on 'session1'
2022-10-26 23:47:48,279122009 [5851] INFO  session-starter - Launch Xdcv: /usr/bin/Xdcv -sessionid 'session1' -auth '/run/user/1000/dcv/session1.xauth' -displayfd 4 -logfile '/var/log/dcv/Xdcv.rocky.session1.log' -output 800x600+0+0 -output 800x600+800+0 -output 800x600+1600+0 -output 800x600+2400+0 -enabledoutputs 1  -verbose 3 -dpi 96 -nolisten tcp
2022-10-26 23:47:48,307583861 [5851] INFO  session-starter - Xdcv started on display ':1'
2022-10-26 23:47:48,310070531 [5851] INFO  session-starter - Use Xauthority file: /run/user/1000/dcv/session1.xauth
2022-10-26 23:47:48,342130989 [5851] INFO  user-autostart - Webcam Injection: disabled (inject-device='none')
2022-10-26 23:47:48,489715652 [5851] INFO  session-starter - Launch DCV agent: /usr/libexec/dcv/dcvagent --mode full --session-id session1 --display :1 --settings-path /etc/dcv/dcv.conf --log-level info --log-dir /var/log/dcv --log-max-file-rotations 10 --log-rotation-suffix 0 --log-max-file-size 0 --log-rotation-interval 0 --log-rotate-at-startup
2022-10-26 23:47:48,491441457 [5851] INFO  session-starter - Launch init script: /etc/dcv/dcvsessioninit
2022-10-26 23:47:48,494010588 [5851] INFO  session-starter - Using shell /bin/bash
Starting session: /etc/X11/xinit/Xsession
2022-10-26 23:47:48,510666812 [5851] INFO  session-starter - Init script launched with pid '5967' and sid '5967'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

Could this be the reason why I am not getting the hoped return while doing the post installation step above?

Maybe someone has stumbled over this already prior and has a solution.

Many thanks!

  • Can you show the output of

    nvidia-smi

    ps -ef PIPE grep X (please replace PIPE with the pipe symbol - re:post complains about non-english ...;)

panc
asked a year ago952 views
4 Answers
1
Accepted Answer

@KarstenNISP After watching the installation video on your page I figured it out: I missed opening up the firewall for the ports (*facepalm). I am able to get the connection running now (even though the post step check is still not returning SI:localuser) Many thanks!

panc
answered a year ago
1

Looks good to me

$ sudo DISPLAY=:0 XAUTHORITY=$(ps aux | grep "X.-auth" | grep -v grep | sed -n 's/.-auth ([^ ]+).*/\1/p') glxinfo | grep -i "opengl.*version"
sed: -e expression #1, char 23: invalid reference \1 on `s' command's RHS
OpenGL core profile version string: 4.6.0 NVIDIA 510.85.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 510.85.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 510.85.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
panc
answered a year ago
  • and PS thank you for your help! I'm going for the learning curve ;)

1

following up, here are the requested outputs:

$ nvidia-smi
Thu Oct 27 16:28:23 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.85.02    Driver Version: 510.85.02    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| 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  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   28C    P8    13W /  70W |    231MiB / 15360MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2877      G   /usr/libexec/Xorg                  73MiB |
|    0   N/A  N/A      2918      G   /usr/bin/gnome-shell              156MiB |
+-----------------------------------------------------------------------------+
$ ps -ef | grep X
root        2877    2874  0 16:17 tty1     00:00:00 /usr/libexec/Xorg vt1 -displayfd 3 -auth /run/user/42/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
rocky       3324    1850  0 16:31 pts/0    00:00:00 grep --color=auto X

While going down the rabbit hole I noticed that echo $DISPLAY also returns an empty line. Trying it with export DISPLAY=':0' did not lead to anything, so I am assuming something else is the culprit?

panc
answered a year ago
1

The above looks fine. Can you verify OpenGL is supported properly:

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

BTW - in case you want to use a ready made Rocky 8 AMI - on the Marketplace you can find: https://aws.amazon.com/marketplace/pp/prodview-3hpigxwiuk3z6

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions