TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
765 stars 138 forks source link

Xvnc: couldn't get an RGB, Double-buffered visual #81

Closed anonymous09 closed 7 years ago

anonymous09 commented 7 years ago

Good day! I can't run applications via TurboVNC+VirtualGL when vncserver started in tty or pty.

I have two computers: SERVER (PC)

CLIENT (Notebook)

What works:

  1. Running directly on SERVER. I log in KDE5 (Plasma 2), and run:

    $ VGL_LOGO=1 vglrun glxgears
    $ vglrun glxinfo

    All OK.

  2. Running vncserver on existing real X-session and run apps on real X-server. I log in KDE5 (Plasma 2), and run:

    $ vncserver -SecurityTypes None -geometry 800x600
    $ vncviewer localhost:5901
    \_ $ VGL_LOGO=1 vglrun glxgears
       $ vglrun glxinfo

    All OK.

What doesn't works:

  1. Running vncserver on SERVER via tty and connect with vncviewer from another user and him X-session.
    $ VGL_LOGO=1 vglrun glxgears
    [VGL] NOTICE: Added /usr/lib64:/usr/lib32 to LD_LIBRARY_PATH
    [VGL] Shared memory segment ID for vglconfig: 7667722
    [VGL] VirtualGL v2.5.2 64-bit (Build 20170501)
    [VGL] Opening connection to 3D X server :1
    [VGL] WARNING: VirtualGL attempted and failed to obtain a true color visual on
    [VGL]    the 3D X server :1 suitable for off-screen rendering.
    [VGL]    This is normal if the 3D application is probing for visuals with
    [VGL]    certain capabilities, but if the app fails to start, then make sure
    [VGL]    that the 3D X server is configured for true color and has accelerated
    [VGL]    3D drivers installed.
    Error: couldn't get an RGB, Double-buffered visual
    $ vglrun glxinfo
    [VGL] NOTICE: Added /usr/lib64:/usr/lib32 to LD_LIBRARY_PATH
    [VGL] Shared memory segment ID for vglconfig: 7700490
    [VGL] VirtualGL v2.5.2 64-bit (Build 20170501)
    [VGL] Opening connection to 3D X server :1
    [VGL] WARNING: VirtualGL attempted and failed to obtain a true color visual on
    [VGL]    the 3D X server :1 suitable for off-screen rendering.
    [VGL]    This is normal if the 3D application is probing for visuals with
    [VGL]    certain capabilities, but if the app fails to start, then make sure
    [VGL]    that the 3D X server is configured for true color and has accelerated
    [VGL]    3D drivers installed.
    Error: couldn't find RGB GLX visual or fbconfig
    [VGL] WARNING: Could not load function "glXSwapIntervalEXT"
    [VGL] WARNING: Could not load function "glXBindSwapBarrierNV"
    [VGL] WARNING: Could not load function "glXJoinSwapGroupNV"
    [VGL] WARNING: Could not load function "glXQueryFrameCountNV"
    [VGL] WARNING: Could not load function "glXQueryMaxSwapGroupsNV"
    [VGL] WARNING: Could not load function "glXQuerySwapGroupNV"
    [VGL] WARNING: Could not load function "glXResetFrameCountNV"
    [VGL] ERROR: in glXGetConfig--
    [VGL]    1115: Could not obtain RGB visual on the server suitable for off-screen rendering name of display: :1

    What I miss? How I can read Xorg-logs from Xvnc? How I can enable debugging info for Xorg and so? What additional information I need post or actions I need perform?

anonymous09 commented 7 years ago

Hi! Any ideas? Also I tried TigerVNC, it works as expected but slow.

dcommander commented 7 years ago

Sorry about that. I thought I had already replied, but I guess the comment didn't post for some reason. The first thing that stands out is the fact that VirtualGL is trying to use :1 as the 3D X server. That is unusual and not the default. Did you alter the VGL_DISPLAY environment variable? The 3D X server, which is defined by VGL_DISPLAY (default :0.0), should be the X server to which the GPU is attached. If that is in fact :1, then so be it, but otherwise, you have set VGL_DISPLAY incorrectly. The second problem seems to be a fundamental misunderstanding of what VirtualGL does. It redirects 3D rendering from an X server without a GPU to an X server with a GPU, then reads back the 3D images in real time and displays them using X11 PutImage commands. There is no point to doing this unless the 3D X server has hardware-accelerated OpenGL. Since you are using Mesa on the 3D X server, OpenGL is at best only partially accelerated. That could be another source of the error message. VirtualGL will display that error if the 3D X server doesn't support Pbuffers, which is sometimes the case with Mesa.

To make a long story short:

dcommander commented 7 years ago

Closing due to lack of response from submitter.

dcommander commented 7 years ago

Also, to answer your question about X.org logs, TurboVNC prints all messages from X.org to the VNC log file (~/.vnc/{machine_name}:{display}.log). You can get a bit more information by passing -verbose on the vncserver command line (this is passed to Xvnc, which causes it to print all X.org warnings, errors, and messages.)

anonymous09 commented 7 years ago

Many thanks for such a clear explanation! Problem has been in misunderstanded and changed VGL_DISPLAY.

Now all works fine.