VirtualGL / virtualgl

Main VirtualGL repository
https://VirtualGL.org
Other
701 stars 106 forks source link

VirtualGL Issue on AWS G4 (Tesla T4) #161

Closed tworcester closed 3 years ago

tworcester commented 3 years ago

Greetings! I am trying to utilize VirtualGL inside of a docker container running on an AWS G4 Instance (Tesla T4 GPU).

The issue I am running into is vglrun -c proxy $* results in the following error in my .xsession-errors

[VGL] ERROR: in glXGetConfig--
[VGL]    1115: Could not obtain RGB visual on the server suitable for off-screen rendering

I had this configuration working on the now deprecated P2 instances but now its running into this issue.

I am relatively new to low-level linux integration like this. What debugging information/commands would be helpful here?

tworcester commented 3 years ago

Additional details:

I am working with RHEL7 running VirtualGL-2.5.2-1.el7.x86_64.

My processes look like this:

root        69     1  0 16:25 ?        00:00:01 /usr/bin/X :0 -seat 1 vt7 -novtswitch -sharevts -nolisten tcp +extension MIT-SHM
root        71     1  0 16:25 ?        00:00:00 lightdm
root        72     1  2 16:25 ?        00:00:14 /opt/TurboVNC/bin/Xvnc :1 -rfbport 5900 -geometry 1920x1080 -query localhost -rfbauth /etc/X11/vncpasswd -auth /tmp/.Xauthority -fp catalogue:/etc/X11/fontpath.d -pn -nthreads 4 -disconnect -nevershared

My xorg.conf:

Section "DRI"
    Mode 0666
EndSection

Section "ServerFlags"
  Option         "AutoAddDevices"   "false"
EndSection

Section "Device"
  Identifier     "Device0"
  Driver         "nvidia"
  VendorName     "NVIDIA Corporation"
  BusID          "PCI:0:30:0"
  Option         "RenderAccel" "True"
  Option         "AllowGLXWithComposite" "True"
  Option         "ProbeAllGpus" "False"
  Option         "ConnectToAcpid" "False"
  Option         "AllowEmptyInitialConfiguration" "True"
EndSection

Section "Screen"
  Identifier     "Screen0"
  Device         "Device0"
  Monitor        "Monitor0"
  SubSection     "Display"
    Modes         "1920x1080" "1920x1080"
  EndSubSection
EndSection

Section "Monitor"
  Identifier     "Monitor0"
  Option         "DPI" "96 x 96"

EndSection

Section "InputDevice"
    Identifier "Mouse0"
    Driver "evdev"
    Option "Device" "/dev/input/mouse0"
EndSection

Sample command that fails:

bash-4.2# VGL_VERBOSE=1 VGL_TRACE=1 vglrun +v firefox
[VGL] NOTICE: Added /usr/lib64/VirtualGL to LD_LIBRARY_PATH
[VGL] dlopen (filename=/usr/lib64/firefox/libmozsandbox.so flag=257 retval=0x7f6162128000)
[VGL] dlopen (filename=/usr/lib64/firefox/liblgpllibs.so flag=257 retval=0x7f616211d000)
[VGL] dlopen (filename=/usr/lib64/firefox/libmozsqlite3.so flag=257 retval=0x7f6162123000)
[VGL] dlopen (filename=/usr/lib64/firefox/libmozgtk.so flag=257 retval=0x7f616211c000)
[VGL] dlopen (filename=/usr/lib64/firefox/libmozwayland.so flag=257 retval=0x7f6162162800)
[VGL] dlopen (filename=/usr/lib64/firefox/libxul.so flag=257 retval=0x7f616215b000)
[VGL] dlopen (filename=NULL flag=1 retval=0x7f6164f9d150)
[VGL] dlopen (filename=NULL flag=1 retval=0x7f6164f9d150)
[VGL] dlopen (filename=NULL flag=257 retval=0x7f6164f9d150)
[VGL] Shared memory segment ID for vglconfig: 40
[VGL 0x64f84780] XOpenDisplay (name=172.16.16.2:1.0 [VGL] VirtualGL v2.5.2 64-bit (Build 20180529)
dpy=0x7f61621af000(172.16.16.2:1.0) ) 0.864983 ms
[VGL 0x64f84780] XQueryExtension (dpy=0x7f61621af000(172.16.16.2:1.0) name=RANDR *major_opcode=141 *first_event=90 *first_error=147 ) 0.064850 ms
[VGL 0x64f84780] XQueryExtension (dpy=0x7f61621af000(172.16.16.2:1.0) name=Generic Event Extension *major_opcode=128 *first_event=0 *first_error=0 ) 0.056028 ms
[VGL] dlopen (filename=libGLX.so.1 flag=1 retval=0x00000000)
[VGL] dlopen (filename=libGL.so.1 flag=1[VGL] NOTICE: Replacing dlopen("libGL.so.1") with dlopen("libvglfaker.so")
 retval=0x7f6164f99000)
[VGL] Opening connection to 3D X server :0
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=1(0x1) 
[VGL 0x64f84780]   glXChooseFBConfig (dpy=0x7f61621c1000(:0) screen=0 attrib_list=[0x0005=0x0001 0x0008=0x0008 0x0009=0x0008 0x000a=0x0008 0x8011=0x0001 0x0006=0x0000 0x8010=0x0004 0x0022=0x8002 0x000c=0x0001 0x000d=0x0008 ] glxattribs=[0x000c=0x0001 0x000d=0x0008 0x0005=0x0001 0x8011=0x0001 0x0008=0x0008 0x0009=0x0008 0x000a=0x0008 0x8010=0x0006 0x0022=0x8002 ] [VGL] dlopen (filename=libGLX_nvidia.so.0 flag=1[VGL] dlopen (filename=libc.so.6 flag=1 retval=0x7f6164f8b000)
[VGL] dlopen (filename=NULL flag=1 retval=0x7f6164f9d150)
[VGL] dlopen (filename=NULL flag=1 retval=0x7f6164f9d150)
[VGL] dlopen (filename=libpthread.so.0 flag=257 retval=0x7f6164f994e0)
[VGL] dlopen (filename=NULL flag=1 retval=0x7f6164f9d150)
[VGL] dlopen (filename=NULL flag=1 retval=0x7f6164f9d150)
 retval=0x7f6162168000)
[VGL] dlopen (filename=libX11-xcb.so.1 flag=1 retval=0x7f6162166000)
[VGL] dlopen (filename=libxcb.so.1 flag=1 retval=0x7f6164f89b40)
[VGL] dlopen (filename=libxcb-glx.so.0 flag=1 retval=0x7f6162171000)
configs[0]=0x7f61621153d0(0x79) configs[1]=0x7f61621154a0(0xa5) configs[2]=0x7f61621154e8(0x7a) configs[3]=0x7f6162115460(0xa6) *nelements=4 ) 31.344891 ms
[VGL 0x64f84780] *value=1(0x1) ) 31.491041 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=5(0x5) *value=1(0x1) ) 0.017166 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=6(0x6) *value=0(0x) ) 0.007153 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=11(0xb) *value=0(0x) ) 0.007868 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=12(0xc) *value=24(0x18) ) 0.006914 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=13(0xd) *value=8(0x8) ) 0.007153 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=100000(0x186a0) *value=0(0x) ) 0.006914 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x67) attrib=32(0x20) *value=32768(0x8000) ) 0.008106 ms
[VGL 0x64f84780] glXGetConfig (dpy=0x7f61621af000(172.16.16.2:1.0) vis=0x7f6162105000(0x22) attrib=1(0x1) 
[VGL 0x64f84780]   glXChooseFBConfig (dpy=0x7f61621c1000(:0) screen=0 attrib_list=[0x0005=0x0001 0x0008=0x0008 0x0009=0x0008 0x000a=0x0008 0x8011=0x0001 0x0006=0x0000 0x8010=0x0004 0x0022=0x8003 0x000c=0x0001 0x000d=0x0008 ] glxattribs=[0x000c=0x0001 0x000d=0x0008 0x0005=0x0001 0x8011=0x0001 0x0008=0x0008 0x0009=0x0008 0x000a=0x0008 0x8010=0x0006 0x0022=0x8003 ] ) 1.170874 ms
[VGL 0x64f84780] 
[VGL 0x64f84780]   glXChooseFBConfig (dpy=0x7f61621c1000(:0) screen=0 attrib_list=[0x0005=0x0000 0x0008=0x0008 0x0009=0x0008 0x000a=0x0008 0x8011=0x0001 0x0006=0x0000 0x8010=0x0004 0x0022=0x8003 0x000c=0x0001 0x000d=0x0008 ] glxattribs=[0x000c=0x0001 0x000d=0x0008 0x0005=0x0000 0x8011=0x0001 0x0008=0x0008 0x0009=0x0008 0x000a=0x0008 0x8010=0x0006 0x0022=0x8003 ] ) 0.081062 ms
[VGL 0x64f84780] [VGL] ERROR: in glXGetConfig--
[VGL]    1115: Could not obtain RGB visual on the server suitable for off-screen rendering

Some additional debugging...I think I am missing some fundamental knowledge as to why glxgears works and other things don't:

bash-4.2# vglrun +v -c proxy glxgears
[VGL] NOTICE: Added /usr/lib64/VirtualGL to LD_LIBRARY_PATH
[VGL] Shared memory segment ID for vglconfig: 23
[VGL] VirtualGL v2.5.2 64-bit (Build 20180529)
[VGL] Opening connection to 3D X server :0
[VGL] NOTICE: Replacing dlopen("/usr/lib64/libdl.so.2") with dlopen("libdlfaker.so")
[VGL] Using Pbuffers for rendering
[VGL] Using pixel buffer objects for readback (BGR --> BGRA)
3355 frames in 5.0 seconds = 667.841 FPS
3318 frames in 5.0 seconds = 663.539 FPS
[VGL] ERROR: in readback--
[VGL]    254: Window has been deleted by window manager

bash-4.2# vglrun +v -c proxy firefox 
[VGL] NOTICE: Added /usr/lib64/VirtualGL to LD_LIBRARY_PATH
[VGL] Shared memory segment ID for vglconfig: 27
[VGL] VirtualGL v2.5.2 64-bit (Build 20180529)
[VGL] NOTICE: Replacing dlopen("libGL.so.1") with dlopen("libvglfaker.so")
[VGL] Opening connection to 3D X server :0
[VGL] ERROR: in glXGetConfig--
[VGL]    1115: Could not obtain RGB visual on the server suitable for off-screen rendering

bash-4.2# vglrun +v -c proxy env | sort
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-a47ZLR0CkO,guid=37b6fd44a0c9fe1a0943674c605cc5cf
DESKTOP_SESSION=xfce
DISPLAY=172.16.16.2:1.0
GDMSESSION=xfce
GEOPROBE_USEGLX=1
GLADE_CATALOG_PATH=:
GLADE_MODULE_PATH=:
GLADE_PIXMAP_PATH=:
GPG_AGENT_INFO=/root/.gnupg/S.gpg-agent:176:1
HOME=/root
LD_LIBRARY_PATH=/usr/lib64/VirtualGL:
LD_PRELOAD=libdlfaker.so:libvglfaker.so
LOGNAME=root
PATH=/usr/local/bin:/usr/bin:/bin
PROMAGIC_USEGLX=1
PWD=/root
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/163,unix/unix:/tmp/.ICE-unix/163
SHELL=/bin/bash
SHLVL=2
SSH_AGENT_PID=174
SSH_AUTH_SOCK=/tmp/ssh-ASiwaI4RiJRX/agent.173
TERM=xterm-256color
TERMINATOR_UUID=urn:uuid:6c02b88d-0b34-4d7a-81b4-b6a529629d65
USER=root
VBOX_CROGL_FORCE_SUPPORTED=1
VGL_COMPRESS=proxy
VGL_ISACTIVE=1
VGL_VERBOSE=1
VTE_VERSION=5204
XAUTHORITY=/var/run/lightdm/root/xauthority
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=xfce
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
[VGL] NOTICE: Added /usr/lib64/VirtualGL to LD_LIBRARY_PATH

Here is what my glxinfo looks like as well: vgl_glxinfo.log

dcommander commented 3 years ago

Please use our official YUM repository to install the latest stable release of VirtualGL: https://virtualgl.org/Downloads/YUM 2.5.2 is quite old, and many bugs have been fixed since that release, including a couple of bugs that may be causing this issue.

Before you try to make VirtualGL work in the Docker container, please try it without Docker first. That will ensure that the 3D X server is properly set up. If it works without Docker but continues to fail with Docker, then I would suggest trying this Docker example. If you can make the example work but your Docker container continues to fail, then examine the differences between your Docker container and the example.

Also note that I am available for paid consultatation regarding such matters, if you are unable to solve the issue using any of the information above.

tworcester commented 3 years ago

Upgrading to 2.6.5 worked...I should've asked sooner!

Thank you for the fast turn-around help!