TurboVNC / turbovnc

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

More user-friendly documentation #78

Closed ddavidebor closed 7 years ago

ddavidebor commented 7 years ago

I've spent a riddiculous amount of time getting virtualgl and turbovnc to work on ubuntu with mate with an integrated intel graphics on a completely headless system.

Mostly because i'm really pissed of by the fact that apparently a remote workstation is a thing only on windows.

My user case: I Work in 6 different location, all of them with a good internet connection and want a remote workstation with a complete OS to do CAD (in vmware) with 3d acceleration, software development etc etc.

I think the documentation really lacks an immediately implementable tutorial.

The following procedure works for ubuntu 16.04 server on a Xeon E3 1245 v5 https://www.supermicro.com/products/system/3U/5039/SYS-5039MS-H12TRF.cfm?parts=SHOW

The system is for trusted users only and i've yet to test it with multiple user at the same time.

I'd like to know what you think of the following procedure. I was not able to get gnome to work. I had to cherrypick some parts from the TightVNC docs.

The xorg config is necessary otherwise VirtuaGL will try to use one of those crappy server graphics, which of course does not support opengl, and will fallback to software rendering.

Example instructions

# go root!
sudo -i

#update & upgrade
apt update
apt upgrade

#Install some useful stuff
apt install curl software-properties-common python-software-properties

# configure users
# [...]

#install intel drivers
apt install xserver-xorg-video-intel

# install lightdm 
apt install lightdm

# download VirtualGL and TurboVNC. Remember to update with the last version
wget -O virtualgl.deb https://sourceforge.net/projects/virtualgl/files/2.5.2/virtualgl_2.5.2_amd64.deb/download
wget -O turbovnc.deb https://sourceforge.net/projects/turbovnc/files/2.1.1/turbovnc_2.1.1_amd64.deb/download

# install them
dpkg -i virtualgl.deb
dpkg -i turbovnc.deb

# config vncserver
service lightdm stop
/opt/VirtualGL/bin/vglserver_config
# press 1, Y, Y, Y, X

# do this for every user
adduser myuser video
adduser myuser vglusers

# do this for root.
adduser root vglusers
adduser root video

# Install mate full, which is a compromise between modern and compatible, also works.
apt install ubuntu-mate-desktop

# make lightdm default. Doesn't hurt. Maybe the mate meta package has messed it up
sudo dpkg-reconfigure lightdm

# backup security configuration and copy-paste
mv /etc/turbovncserver-security.conf /etc/turbovncserver-security.conf.old
nano /etc/turbovncserver-security.conf

# add usernames to autostart, modify for every user following instructions
nano /etc/sysconfig/tvncservers

#enable start at boot 
systemctl enable tvncserver
service tvncserver start

# for every user
su d
cd
echo "export PATH=/opt/TurboVNC/bin:$PATH" >> ~/.bashrc
exit

# firewall everything. VERY IMPORTANT!
ufw allow ssh
ufw enable

#start one time lightdm. This helps. or maybe not.
service lightdm start
service lightdm stop

# test the temp X config
nano xorg.conf
X -config xorg.conf #keep running

# for every user, login with turbovnc, open terminal and:
xauth merge /etc/opt/VirtualGL/vgl_xauth_key
xdpyinfo -display :0
/opt/VirtualGL/bin/glxinfo -display :0 -c
#check that it renders on a real card and not on LLVMPIPES
vglrun  /opt/VirtualGL/bin/glxspheres64 

# if everything worked correctly and X did not crash
mv xorg.conf /etc/X11/xorg.conf
rm xorg.conf
service lightdm start
reboot

example turbovnc security conf

# *** Copy this file to /etc before editing it ***

# Uncomment the following to turn on the user access control list whenever
# the PAM User/Password authentication method is used.
# (Default: user ACL is disabled)

enable-user-acl

# This specifies the maximum idle timeout (in seconds) for all TurboVNC
# sessions started on this machine.  The idle timeout is the amount of time
# that a TurboVNC session can remain idle (with no VNC viewer connections)
# before it will automatically exit.  If this value is set to a number greater
# than 0, then all TurboVNC sessions on this machine will use this idle timeout
# value by default, and the user will only be allowed to override it with a
# lower value.

#max-idle-timeout = 86400

# This specifies the maximum desktop size for all TurboVNC sessions started on
# this machine.  If a user attempts to start a session with a larger geometry
# than this or to use remote desktop resizing to increase the desktop size to a
# size larger than this, the desktop size will be clamped to this width/height.

#max-desktop-size = 3200x1800

# Uncomment the following to globally disable the automatic sending of
# clipboard changes from TurboVNC server sessions to their connected viewers.
# (Default: clipboard sending is allowed)

#no-clipboard-send

# Uncomment the following to globally disable the automatic sending of
# clipboard changes to TurboVNC server sessions from their connected viewers.
# (Default: clipboard receiving is allowed)

#no-clipboard-recv

# Uncomment the following to globally disable the ability to make reverse
# VNC connections.
# (Default: reverse connections are allowed)

#no-reverse-connections

# Uncomment the following to globally disable inbound remote connections to all
# TurboVNC servers started on this machine.  This effectively forces SSH
# tunneling to be used for all inbound TurboVNC connections.
# (Default: inbound remote connections are allowed)

#no-remote-connections

# Uncomment the following to globally disable the built-in HTTP server in all
# TurboVNC servers started on this machine.

no-httpd

# Uncomment the following to globally disable X11 TCP connections to all
# TurboVNC servers started on this machine.

#no-x11-tcp-connections

# Uncomment the following to globally disable creating/opening PAM sessions in
# all TurboVNC servers started on this machine.

#no-pam-sessions

# Set pam-service-name to the name of the PAM service that you will use to
# to process PAM User/Password authentications from TurboVNC.  This service
# name typically corresponds to a file in /etc/pam.d or to one or more lines in
# /etc/pam.conf.
# (Default: turbovnc)

pam-service-name = login;

# Set the following to any combination of "TLSVnc", "TLSOtp", "TLSPlain",
# "TLSNone", "X509Vnc", "X509Otp", "X509Plain", "X509None", "VNC", "OTP",
# "UnixLogin", "Plain", or "None", separated by commas (security types are
# case-insensitive.)  If the following variable is enabled and a particular
# security type is not listed in it, then users cannot enable that security
# type by using Xvnc command-line arguments.  This variable also controls the
# order in which the corresponding authentication capabilities are advertised
# to the VNC viewer.  See the man pages and User's Guide for more information.
# (Default: TLSVnc, TLSOtp, TLSPlain, TLSNone, X509Vnc, X509Otp, X509Plain, X509None, VNC, OTP, UnixLogin, Plain, None)

#permitted-security-types = TLSVnc, TLSOtp, TLSPlain, X509Vnc, X509Otp, X509Plain, VNC, OTP, UnixLogin, Plain
# WARNING firewall it out it's not a safe protocol witouth ssh tunnelling
permitted-security-types = UnixLogin

Example sysconfig

# The VNCSERVERS variable is a list of display:user pairs, separated by
# spaces.
#
# Uncomment the line below to start a VNC server on display :1 as 'myusername'
# (adjust this to your own user name).  You will also need to configure a VNC
# password (run 'man -M {TurboVNC_directory}/man vncpasswd' for instructions on
# how to set this) or another form of authentication.  See the TurboVNC User's
# Guide for more information about the authentication methods available in
# TurboVNC.
#
# DO NOT RUN THIS SERVICE if your local area network is untrusted!  See the
# TurboVNC User's Guide for information about tunneling TurboVNC over SSH.
#
# Use "-nohttpd" to prevent web-based VNC clients from connecting.
#
# Use "-localhost" to prevent remote VNC clients from connecting except when
# doing so through a secure tunnel.  See the TurboVNC User's Guide and the
# vncviewer and Xvnc man pages for more information.

# VNCSERVERS="1:myusername"
# VNCSERVERARGS[1]="-geometry 800x600 -nohttpd -localhost"
VNCSERVERS="1:d 2:s"
# gnome
#VNCSERVERARGS[1]="-localhost -3dwm"

#all other, including mate
VNCSERVERARGS[1]="-localhost"

Example xorg.conf

# To obtain this configuration on your system:
## service lightdm stop
## X -configure 
## edit the file generated to keep the same section as this one.
## add the missing options

Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/X11/misc"
    FontPath     "/usr/share/fonts/X11/cyrillic"
    FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath     "/usr/share/fonts/X11/Type1"
    FontPath     "/usr/share/fonts/X11/100dpi"
    FontPath     "/usr/share/fonts/X11/75dpi"
    FontPath     "built-ins"
EndSection

Section "Module"
    Load  "glx"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"

    # DISABLE MONITOR
    Option "Enable" "false"
EndSection

Section "Monitor"
    Identifier   "Monitor1"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"

    # DISABLE MONITOR
    Option "Enable" "false"
EndSection

# Intel Integrated Graphics HD530P
Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "Accel"                 # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "Backlight"             # <str>
        #Option     "CustomEDID"            # <str>
        #Option     "DRI"                   # <str>
        #Option     "Present"               # [<bool>]
        #Option     "ColorKey"              # <i>
        #Option     "VideoKey"              # <i>
        #Option     "Tiling"                # [<bool>]
        #Option     "LinearFramebuffer"     # [<bool>]
        #Option     "HWRotation"            # [<bool>]
        #Option     "VSync"                 # [<bool>]
        #Option     "PageFlip"              # [<bool>]
        #Option     "SwapbuffersWait"       # [<bool>]
        #Option     "TripleBuffer"          # [<bool>]
        #Option     "XvPreferOverlay"       # [<bool>]
        #Option     "HotPlug"               # [<bool>]
        #Option     "ReprobeOutputs"        # [<bool>]
        #Option     "XvMC"                  # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "VirtualHeads"          # <i>
        #Option     "TearFree"              # [<bool>]
        #Option     "PerCrtcPixmaps"        # [<bool>]
        #Option     "FallbackDebug"         # [<bool>]
        #Option     "DebugFlushBatches"     # [<bool>]
        #Option     "DebugFlushCaches"      # [<bool>]
        #Option     "DebugWait"             # [<bool>]
        #Option     "BufferCache"           # [<bool>]

        # USE OUR CARD AND NO OTHER. Needed otherwise autoconfiguration will mess it up
        Identifier  "Card0"
          Driver      "intel"

                # will change depending on your system
          BusID       "PCI:0:2:0"

        # AVOID FUCKING CRASHES
    # https://bbs.archlinux.org/viewtopic.php?id=200797
          Option "AccelMethod" "sna"
          Option "TearFree" "true"
          Option "DRI" "3"
EndSection

testing

d@sd-121152:~/Desktop$ vglrun  /opt/VirtualGL/bin/glxspheres64 
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) HD Graphics P530 (Skylake GT2) 
# here default windows size
86.296249 frames/sec - 96.306614 Mpixels/sec
61.486902 frames/sec - 68.619382 Mpixels/sec
68.618584 frames/sec - 76.578340 Mpixels/sec
68.337763 frames/sec - 76.264943 Mpixels/sec
68.021114 frames/sec - 75.911563 Mpixels/sec
66.824999 frames/sec - 74.576699 Mpixels/sec
65.781017 frames/sec - 73.411615 Mpixels/sec
# here fullscreen on 2560x1440
46.914544 frames/sec - 135.359840 Mpixels/sec
45.375195 frames/sec - 158.442920 Mpixels/sec
40.372433 frames/sec - 140.974076 Mpixels/sec
44.107116 frames/sec - 154.014994 Mpixels/sec
41.834514 frames/sec - 146.079430 Mpixels/sec
40.275319 frames/sec - 140.634969 Mpixels/sec
41.185324 frames/sec - 143.812563 Mpixels/sec
d@sd-121152:~/Desktop$ vglrun glxinfo
name of display: :1.0
display: :1  screen: 0
direct rendering: Yes
server glx vendor string: VirtualGL
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SUN_get_transparent_index
client glx vendor string: VirtualGL
client glx version string: 1.4
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SUN_get_transparent_index
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SUN_get_transparent_index
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics P530 (Skylake GT2) 
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth, 
    GL_AMD_draw_buffers_blend, GL_AMD_seamless_cubemap_per_texture, 
    GL_AMD_shader_stencil_export, GL_AMD_shader_trinary_minmax, 
    GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index, 
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_APPLE_object_purgeable, GL_ARB_ES2_compatibility, 
    GL_ARB_ES3_compatibility, GL_ARB_arrays_of_arrays, GL_ARB_base_instance, 
    GL_ARB_blend_func_extended, GL_ARB_buffer_storage, 
    GL_ARB_clear_buffer_object, GL_ARB_clear_texture, GL_ARB_clip_control, 
    GL_ARB_compressed_texture_pixel_storage, GL_ARB_compute_shader, 
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_ARB_copy_buffer, GL_ARB_copy_image, GL_ARB_cull_distance, 
    GL_ARB_debug_output, GL_ARB_depth_buffer_float, GL_ARB_depth_clamp, 
    GL_ARB_derivative_control, GL_ARB_direct_state_access, 
    GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect, 
    GL_ARB_draw_instanced, GL_ARB_explicit_attrib_location, 
    GL_ARB_explicit_uniform_location, GL_ARB_fragment_coord_conventions, 
    GL_ARB_fragment_layer_viewport, GL_ARB_fragment_shader, 
    GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object, 
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
    GL_ARB_get_texture_sub_image, GL_ARB_gpu_shader5, GL_ARB_gpu_shader_fp64, 
    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, 
    GL_ARB_instanced_arrays, GL_ARB_internalformat_query, 
    GL_ARB_internalformat_query2, GL_ARB_invalidate_subdata, 
    GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, GL_ARB_multi_bind, 
    GL_ARB_multi_draw_indirect, GL_ARB_occlusion_query2, 
    GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object, 
    GL_ARB_point_sprite, GL_ARB_program_interface_query, 
    GL_ARB_provoking_vertex, GL_ARB_query_buffer_object, 
    GL_ARB_robust_buffer_access_behavior, GL_ARB_robustness, 
    GL_ARB_sample_shading, GL_ARB_sampler_objects, GL_ARB_seamless_cube_map, 
    GL_ARB_seamless_cubemap_per_texture, GL_ARB_separate_shader_objects, 
    GL_ARB_shader_atomic_counters, GL_ARB_shader_bit_encoding, 
    GL_ARB_shader_clock, GL_ARB_shader_draw_parameters, 
    GL_ARB_shader_image_load_store, GL_ARB_shader_image_size, 
    GL_ARB_shader_objects, GL_ARB_shader_precision, 
    GL_ARB_shader_stencil_export, GL_ARB_shader_storage_buffer_object, 
    GL_ARB_shader_subroutine, GL_ARB_shader_texture_image_samples, 
    GL_ARB_shader_texture_lod, GL_ARB_shading_language_420pack, 
    GL_ARB_shading_language_packing, GL_ARB_stencil_texturing, GL_ARB_sync, 
    GL_ARB_tessellation_shader, GL_ARB_texture_barrier, 
    GL_ARB_texture_buffer_object, GL_ARB_texture_buffer_object_rgb32, 
    GL_ARB_texture_buffer_range, GL_ARB_texture_compression_bptc, 
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map_array, 
    GL_ARB_texture_float, GL_ARB_texture_gather, 
    GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_multisample, 
    GL_ARB_texture_non_power_of_two, GL_ARB_texture_query_levels, 
    GL_ARB_texture_query_lod, GL_ARB_texture_rectangle, GL_ARB_texture_rg, 
    GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_stencil8, 
    GL_ARB_texture_storage, GL_ARB_texture_storage_multisample, 
    GL_ARB_texture_swizzle, GL_ARB_texture_view, GL_ARB_timer_query, 
    GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, 
    GL_ARB_transform_feedback_instanced, GL_ARB_uniform_buffer_object, 
    GL_ARB_vertex_array_bgra, GL_ARB_vertex_array_object, 
    GL_ARB_vertex_attrib_64bit, GL_ARB_vertex_attrib_binding, 
    GL_ARB_vertex_shader, GL_ARB_vertex_type_10f_11f_11f_rev, 
    GL_ARB_vertex_type_2_10_10_10_rev, GL_ARB_viewport_array, 
    GL_ATI_blend_equation_separate, GL_ATI_texture_float, GL_EXT_abgr, 
    GL_EXT_blend_equation_separate, GL_EXT_draw_buffers2, 
    GL_EXT_draw_instanced, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled, 
    GL_EXT_framebuffer_sRGB, GL_EXT_packed_depth_stencil, GL_EXT_packed_float, 
    GL_EXT_pixel_buffer_object, GL_EXT_polygon_offset_clamp, 
    GL_EXT_provoking_vertex, GL_EXT_shader_integer_mix, 
    GL_EXT_shader_samples_identical, GL_EXT_texture_array, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, 
    GL_EXT_texture_integer, GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode, 
    GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm, 
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback, 
    GL_EXT_vertex_array_bgra, GL_IBM_multimode_draw_arrays, 
    GL_KHR_context_flush_control, GL_KHR_debug, 
    GL_KHR_robust_buffer_access_behavior, GL_KHR_robustness, 
    GL_KHR_texture_compression_astc_ldr, GL_MESA_pack_invert, 
    GL_MESA_texture_signed_rgba, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_NV_packed_depth_stencil, GL_NV_texture_barrier, GL_OES_EGL_image, 
    GL_OES_read_format, GL_S3_s3tc

OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth, 
    GL_AMD_draw_buffers_blend, GL_AMD_seamless_cubemap_per_texture, 
    GL_AMD_shader_stencil_export, GL_AMD_shader_trinary_minmax, 
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_APPLE_object_purgeable, GL_APPLE_packed_pixels, 
    GL_APPLE_vertex_array_object, GL_ARB_ES2_compatibility, 
    GL_ARB_ES3_compatibility, GL_ARB_arrays_of_arrays, 
    GL_ARB_blend_func_extended, GL_ARB_buffer_storage, 
    GL_ARB_clear_buffer_object, GL_ARB_clear_texture, GL_ARB_clip_control, 
    GL_ARB_color_buffer_float, GL_ARB_compressed_texture_pixel_storage, 
    GL_ARB_compute_shader, GL_ARB_conditional_render_inverted, 
    GL_ARB_conservative_depth, GL_ARB_copy_buffer, GL_ARB_copy_image, 
    GL_ARB_cull_distance, GL_ARB_debug_output, GL_ARB_depth_buffer_float, 
    GL_ARB_depth_clamp, GL_ARB_depth_texture, GL_ARB_derivative_control, 
    GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_instanced, 
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location, 
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_program, 
    GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader, 
    GL_ARB_framebuffer_no_attachments, GL_ARB_framebuffer_object, 
    GL_ARB_framebuffer_sRGB, GL_ARB_get_program_binary, 
    GL_ARB_get_texture_sub_image, GL_ARB_half_float_pixel, 
    GL_ARB_half_float_vertex, GL_ARB_instanced_arrays, 
    GL_ARB_internalformat_query, GL_ARB_internalformat_query2, 
    GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment, 
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multisample, 
    GL_ARB_multitexture, GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
    GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object, 
    GL_ARB_point_parameters, GL_ARB_point_sprite, 
    GL_ARB_program_interface_query, GL_ARB_provoking_vertex, 
    GL_ARB_query_buffer_object, GL_ARB_robust_buffer_access_behavior, 
    GL_ARB_robustness, GL_ARB_sample_shading, GL_ARB_sampler_objects, 
    GL_ARB_seamless_cube_map, GL_ARB_seamless_cubemap_per_texture, 
    GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counters, 
    GL_ARB_shader_bit_encoding, GL_ARB_shader_clock, 
    GL_ARB_shader_draw_parameters, GL_ARB_shader_image_load_store, 
    GL_ARB_shader_image_size, GL_ARB_shader_objects, GL_ARB_shader_precision, 
    GL_ARB_shader_stencil_export, GL_ARB_shader_storage_buffer_object, 
    GL_ARB_shader_texture_image_samples, GL_ARB_shader_texture_lod, 
    GL_ARB_shading_language_100, GL_ARB_shading_language_420pack, 
    GL_ARB_shading_language_packing, GL_ARB_shadow, GL_ARB_stencil_texturing, 
    GL_ARB_sync, GL_ARB_texture_barrier, GL_ARB_texture_border_clamp, 
    GL_ARB_texture_compression, GL_ARB_texture_compression_bptc, 
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map, 
    GL_ARB_texture_cube_map_array, GL_ARB_texture_env_add, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_ARB_texture_float, GL_ARB_texture_gather, 
    GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_mirrored_repeat, 
    GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_query_levels, GL_ARB_texture_query_lod, 
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui, 
    GL_ARB_texture_stencil8, GL_ARB_texture_storage, 
    GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle, 
    GL_ARB_texture_view, GL_ARB_timer_query, GL_ARB_transform_feedback2, 
    GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced, 
    GL_ARB_transpose_matrix, GL_ARB_uniform_buffer_object, 
    GL_ARB_vertex_array_bgra, GL_ARB_vertex_array_object, 
    GL_ARB_vertex_attrib_binding, GL_ARB_vertex_buffer_object, 
    GL_ARB_vertex_program, GL_ARB_vertex_shader, 
    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev, 
    GL_ARB_window_pos, GL_ATI_blend_equation_separate, GL_ATI_draw_buffers, 
    GL_ATI_separate_stencil, GL_ATI_texture_env_combine3, 
    GL_ATI_texture_float, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_compiled_vertex_array, 
    GL_EXT_copy_texture, GL_EXT_draw_buffers2, GL_EXT_draw_instanced, 
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled, 
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, 
    GL_EXT_gpu_program_parameters, GL_EXT_multi_draw_arrays, 
    GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_packed_pixels, 
    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
    GL_EXT_polygon_offset, GL_EXT_polygon_offset_clamp, 
    GL_EXT_provoking_vertex, GL_EXT_rescale_normal, GL_EXT_secondary_color, 
    GL_EXT_separate_specular_color, GL_EXT_shader_integer_mix, 
    GL_EXT_shader_samples_identical, GL_EXT_shadow_funcs, 
    GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, GL_EXT_subtexture, 
    GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_array, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map, 
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add, 
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_integer, 
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle, 
    GL_EXT_texture_sRGB, GL_EXT_texture_sRGB_decode, 
    GL_EXT_texture_shared_exponent, GL_EXT_texture_snorm, 
    GL_EXT_texture_swizzle, GL_EXT_timer_query, GL_EXT_transform_feedback, 
    GL_EXT_vertex_array, GL_EXT_vertex_array_bgra, 
    GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip, 
    GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, 
    GL_KHR_context_flush_control, GL_KHR_debug, 
    GL_KHR_robust_buffer_access_behavior, GL_KHR_robustness, 
    GL_KHR_texture_compression_astc_ldr, GL_MESA_pack_invert, 
    GL_MESA_texture_signed_rgba, GL_MESA_window_pos, GL_NV_blend_square, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_light_max_exponent, 
    GL_NV_packed_depth_stencil, GL_NV_primitive_restart, 
    GL_NV_texgen_reflection, GL_NV_texture_barrier, 
    GL_NV_texture_env_combine4, GL_NV_texture_rectangle, GL_OES_EGL_image, 
    GL_OES_read_format, GL_S3_s3tc, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, 
    GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays

3 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x068 32 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x021 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x022 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None

64 GLXFBConfigs:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x086 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x087 24 tc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x088 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x089 24 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x08a 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x08b 24 tc  0  16  0 r  . .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x08c 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x08d 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x08e 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x08f 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x090 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x091 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x092 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x093 24 tc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x094 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x095 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x096 32 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x097 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x098 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x099 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x09a 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  4 1 None
0x09b 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  8 1 None
0x09c 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  4 1 None
0x09d 24 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  8 1 None
0x09e 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  4 1 None
0x09f 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  8 1 None
0x0a0 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  4 1 None
0x0a1 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  8 1 None
0x0a2 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  4 1 None
0x0a3 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  8 1 None
0x0a4 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  4 1 None
0x0a5 24 tc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  8 1 None
0x0a6 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0a7 24 dc  0  16  0 r  . .   5  6  5  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0a8 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x0a9 24 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x0aa 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0ab 24 dc  0  16  0 r  . .   5  6  5  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0ac 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x0ad 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 None
0x0ae 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0af 24 dc  0  32  0 r  . .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0b0 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0b1 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0  0  0  0  0  0  0  0 0 None
0x0b2 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0b3 24 dc  0  24  0 r  . .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0b4 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
0x0b5 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
0x0b6 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
0x0b7 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8 16 16 16 16  0 0 Slow
0x0b8 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  0 0 None
0x0b9 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8 16 16 16  0  0 0 Slow
0x0ba 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  4 1 None
0x0bb 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0  0  0  0  0  0  0  8 1 None
0x0bc 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  4 1 None
0x0bd 24 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  8 1 None
0x0be 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  4 1 None
0x0bf 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0  0  0  0  0  0  0  8 1 None
0x0c0 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  4 1 None
0x0c1 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  8 1 None
0x0c2 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  4 1 None
0x0c3 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0  0  0  0  0  0  0  8 1 None
0x0c4 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  4 1 None
0x0c5 24 dc  0  24  0 r  y .   8  8  8  0 .  .  0 24  8  0  0  0  0  8 1 None
dcommander commented 7 years ago

Thanks for sharing your configuration, but it is extremely specific. If you're asking whether I could provide such an example in the User's Guide, then the answer is no, because there is a high likelihood that such an example wouldn't work on any system other than yours. I would be willing to provide a wiki page on VirtualGL.org describing how to configure your specific GPU for headless VGL operation, but such a wiki page would need to act as a supplement to the User's Guide. See http://www.virtualgl.org/Documentation/HeadlessNV for an example.

If you want the User's Guides to be improved, then please approach the problem from the following angle:

For instance, I could certainly write some general guidelines for headless configuration, but in terms of xorg.conf, it would be much better to discuss how a headless xorg.conf file differs from a "normal" xorg.conf file rather than providing a complete example, since not all parts of the example would apply to all systems.

TurboVNC should be simple to install. You should be able to just install the packages and run /opt/TurboVNC/bin/vncserver to start a session. If that procedure fails on a specific Ubuntu release, then that is a bug that needs to be fixed. Please provide details of the failure. It should work properly on Ubuntu 16.04 without MATE, but you need to have the GNOME Flashback package installed if you aren't using MATE. If GNOME Flashback isn't installed by default, then perhaps I need to make that more clear, or provide a link in the documentation to the window manager compatibility guide.

VirtualGL is a bit more complex to install. Generally the installation assumes that you already have a working X server running with GPU acceleration on the VGL server machine, and that seems to be where you ran into problems. I've added a brief section to the User's Guide that clarifies those prerequisite steps, but unfortunately the specifics of those steps are going to vary wildly from system to system, so it would be impossible for me to document all of them. The vast majority of VirtualGL installations use either nVidia or AMD GPUs. Intel GPUs have historically not provided anywhere near the same level of performance, stability, or ease of configuration, which is why I cannot recommend their use with VirtualGL. As I said above, however, I am willing to provide wiki instructions regarding how to configure specific GPUs for headless operation, if those instructions can be expressed in the most general way possible.

ddavidebor commented 7 years ago

Yes of course my configuration is very specific and it would be pointless to include, but it's a nice point to start the discussion. I think the procedure may be more helpful.

A similar small tutorial like the one for a headless nvidia, but with the intel integrated graphics would be extremely helpful. I've banged my head on it quite a bit, but configuring xorg for the intel is more or less the same. i'm not sure if X supports --use-display-device=None

lspci:
00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07)
00:02.0 Display controller: Intel Corporation Device 191d (rev 06)
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-H Integrated Sensor Hub (rev 31)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:16.1 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #2 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] (rev 31)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)
00:1d.5 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #14 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
01:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
03:00.0 PCI bridge: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge (rev 03)
04:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 30)

What specific problems did you encounter while following the User's Guide instructions?

One problem was the fact that the supported desktop environments were described in a separated document. There was no "if you want to get it to work effortlessly, use mate. Gnome 2 works also. For other refer to document XXX"

That is, what additional information would make TurboVNC and VirtualGL easier to configure?

Well, a getting started guide. One that takes an opinionated position on the system (possibly a widespread OS, such as Ubuntu 16.04 LTS or CentOS). It's hard to configure a system from scratch, especially it may be hard to understand how the pieces fit together. It's also hard to start without knowing what should work straight away and what requires fiddling with.

Now many cloud providers are offering GPUs (I, for example, know Google cloud and Exoscale) and starting from a bare server OS and going to a OpenGL remote virtual workstation is something that's getting traction.

[..] but you need to have the GNOME Flashback package installed if you aren't using MATE. If GNOME Flashback isn't installed by default, then perhaps I need to make that more clear, or provide a link in the documentation to the window manager compatibility guide.

I sincerely do not know if it was installed or no, but i can check.

I've added a brief section to the User's Guide that clarifies those prerequisite steps, but unfortunately the specifics of those steps are going to vary wildly from system to system, so it would be impossible for me to document all of them.

Thanks, it helps.

VirtualGL is a bit more complex to install. Generally the installation assumes that you already have a working X server running with GPU acceleration on the VGL server machine, and that seems to be where you ran into problems.

Yep. I ran around like a headless chicken trying to understand why it was not using the GPU. answer: like any well configured system the cheap super-legacy vga gpu takes precedence.

The vast majority of VirtualGL installations use either nVidia or AMD GPUs. Intel GPUs have historically not provided anywhere near the same level of performance, stability, or ease of configuration, which is why I cannot recommend their use with VirtualGL.

Yes i know Nvidia is the boss of this market. intel recently is fighting back with their auxiliary processing units, but i've yet to see any serious adoption. Intel graphics now are extremely easy to use: their drivers are included in the linux kernel. full complete drivers. The new series of xeon E3 processor has them in many models, and is being widely adopted.

dcommander commented 7 years ago

I'll see what I can do vis-a-vis discussing supported WM configurations in the TurboVNC User's Guide. I unfortunately couldn't write a headless Intel wiki page myself, since I don't have access to any of those GPUs for testing.

ddavidebor commented 7 years ago

I might have an inte i7 4770 server in germany with a week of rent to spare if you need it.

ddavidebor commented 7 years ago

After a week on the intel integrated graphics: everything is running smoothly