VirtualGL in an LXD container running Centos

39 views
Skip to first unread message

trumee

unread,
Nov 22, 2019, 10:30:33 PM11/22/19
to VirtualGL User Discussion/Support
Hello,

I have a Nvidia Quadro P2000 card which is shared with a Centos container. The host running a container is a headless server. I started vncserver in the container, and connected to from a remote client. Unfortunately, i am not able to use any hardware accelaration.

In the container i get the following:

$ /opt/VirtualGL/bin/vglrun -display :1 glxgears
failed to create drawable
[VGL] ERROR: in OGLDrawable--
[VGL]    83: Could not create Pbuffer

$ ls -la /dev/nvidia*
crw-rw-rw- 1 nfsnobody nfsnobody 237,   0 Nov 22 01:32 /dev/nvidia-uvm
crw-rw-rw- 1 nfsnobody nfsnobody 237,   1 Nov 22 01:32 /dev/nvidia-uvm-tools
crw-rw---- 1 root      vglusers  195,   0 Nov 22 05:11 /dev/nvidia0
crw-rw-rw- 1 nfsnobody nfsnobody 195, 255 Nov 22 01:32 /dev/nvidiactl


$ nvidia-smi
Sat Nov 23 03:28:40 2019      
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.31       Driver Version: 440.31       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro P2000        Off  | 00000000:82:00.0 Off |                  N/A |
| 58%   56C    P0    19W /  75W |     10MiB /  5059MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                              
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Any idea how to fix this?

Thanks

trumee

unread,
Nov 23, 2019, 1:00:59 AM11/23/19
to VirtualGL User Discussion/Support
Following is the log for vglserver_config,


1) Configure server for use with VirtualGL
2) Unconfigure server for use with VirtualGL
X) Exit

Choose:
1

Restrict 3D X server access to vglusers group (recommended)?
[Y/n]


Restrict framebuffer device access to vglusers group (recommended)?
[Y/n]


Disable XTEST extension (recommended)?
[Y/n]

... Creating vglusers group ...
groupadd: group 'vglusers' already exists
Could not add vglusers group (probably because it already exists.)
... Creating /etc/opt/VirtualGL/ ...
... Granting read permission to /etc/opt/VirtualGL/ for vglusers group ...
... Modifying /etc/security/console.perms to disable automatic permissions
    for DRI devices ...
... Creating /etc/modprobe.d/virtualgl.conf to set requested permissions for
    /dev/nvidia* ...
... Attempting to remove nvidia module from memory so device permissions
    will be reloaded ...
rmmod: ERROR: Module nvidia is in use by: nvidia_uvm nvidia_modeset
... Granting write permission to /dev/nvidia-uvm /dev/nvidia-uvm-tools /dev/nvidia0 /dev/nvidiactl for vglusers group ...
chmod: changing permissions of '/dev/nvidia-uvm': Read-only file system
chmod: changing permissions of '/dev/nvidia-uvm-tools': Read-only file system
chmod: changing permissions of '/dev/nvidiactl': Read-only file system
chown: changing ownership of '/dev/nvidia-uvm': Read-only file system
chown: changing ownership of '/dev/nvidia-uvm-tools': Read-only file system
chown: changing ownership of '/dev/nvidiactl': Read-only file system
... Granting write permission to /dev/dri/card0 for vglusers group ...
... Modifying /etc/X11/xorg.conf.d/99-virtualgl-dri to enable DRI permissions
    for vglusers group ...
... Modifying /etc/X11/xorg.conf to enable DRI permissions
    for vglusers group ...
... Adding vglgenkey to /etc/gdm/Init/Default script ...
... Creating /usr/share/gdm/greeter/autostart/virtualgl.desktop ...
... Disabling XTEST extension in /etc/gdm/custom.conf ...
... Setting default run level to 5 (enabling graphical login prompt) ...
... Commenting out DisallowTCP line (if it exists) in /etc/gdm/custom.conf ...

Done. You must restart the display manager for the changes to take effect.

IMPORTANT NOTE: Your system uses modprobe.d to set device permissions. You
must execute rmmod nvidia with the display manager stopped in order for the
new device permission settings to become effective.

DRC

unread,
Nov 23, 2019, 6:23:08 PM11/23/19
to virtual...@googlegroups.com
Unless your GPU is attached to :1.0, then you should not pass that value to -display. I have to mention that, because that is the #1 misunderstanding among new VGL users. Most often, the 3D X server (the X server to which the GPU is attached) is listening on X display :0.0, which is the default value for VGL_DISPLAY or ‘vglrun -display’ (NOTE: ‘vglrun -display’ is just a shortcut to set the VGL_DISPLAY environment variable.) Most often, the first VNC instance is listening on X display :1.0, in which case that should be the value of DISPLAY, not VGL_DISPLAY. DISPLAY points to the 2D X server (the VNC display, in this case), and VGL_DISPLAY points to the 3D X server. Refer to figures and description in the user’s guide. As a general rule, if you are specifying a non-default value for VGL_DISPLAY or ‘vglrun -display’, then I will ask you to explain why that is not a mistake.

Also, unless you have taken steps to share the 3D X server connection from the host to the container, VGL won’t be able to work in the container. I have not had time to experiment with that and come up with an official procedure, but it is on my list of things to do. If someone wants to pay for my labor to do that, it will happen a lot sooner.
--
You received this message because you are subscribed to the Google Groups "VirtualGL User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to virtualgl-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/virtualgl-users/57d6a194-fb38-46fc-b2b9-106db8ebefcd%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages