I have GPU Pass-through working with KVM qemu with both Windows 7 and CentOS guest but with Windows I can easily RDP with Remote Desktop mstsc and even run 3D accelerated apps that will make use of the OpenGL acceleration etc.
I don't care about VirtualGL and similar technologies whereby one can play games remotely, I only care about being able to use apps remotely that require a graphics card, so I simply want the openGL glx etc to run on the server and be able to login remotely with nxclient (nomachine nx or vnc/xrdp) to use those programs remotely just as its possible to do on Windows by simply doing RDP (with mstsc.exe Remote Desktop client) into the Windows 7 guest. But on Linux I keep getting errors when I try to run software that needs a GPU, errors like couldn't find matching glx visual, can't write to SDL2 window etc. And glxinfo shows "direct rendering": No
So again this works perfectly fine with Windows 7 guest, I passthrough the GPU to Windows 7 and I can Remote Desktop RDP over internet to Windows7 guest and can run OpenGL benchmark tools in Windows7 or other apps that require a GPU. But when I try to do that inside a Linux GUEST (centos 6.x) where I also passed through the GPU I get errors like couldn't find matching glx visual. Here's my glxinfo and lsmod | grep radeon driver (installed proprietary driver from ATI website). thanks!
glxinfo
name of display: :50.0 display: :50 screen: 0 direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose) server glx vendor string: SGI server glx version string: 1.2 server glx extensions: GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig client glx vendor string: ATI 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_swap_control, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory, GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_NV_swap_group, GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_swap_barrier, GLX_SGIX_swap_group, GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, GLX_EXT_framebuffer_sRGB, GLX_ARB_fbconfig_float, GLX_AMD_gpu_association, GLX_EXT_buffer_age GLX version: 1.2 GLX extensions: GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_swap_barrier OpenGL vendor string: Mesa project: www.mesa3d.org OpenGL renderer string: Mesa GLX Indirect OpenGL version string: 1.2 (1.5 Mesa 6.4.1) OpenGL extensions: GL_ARB_depth_texture, GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow, GL_ARB_shadow_ambient, GL_ARB_texture_border_clamp, GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat, GL_ARB_texture_rectangle, GL_ARB_transpose_matrix, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_func_separate, GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint, GL_EXT_copy_texture, GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset, GL_EXT_rescale_normal, GL_EXT_secondary_color, GL_EXT_separate_specular_color, 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_edge_clamp, GL_EXT_texture_env_add, GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_APPLE_packed_pixels, GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once, GL_ATIX_texture_env_combine3, GL_HP_occlusion_test, GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, GL_MESA_pack_invert, GL_MESA_ycbcr_texture, GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SGIX_depth_texture, GL_SGIX_shadow, GL_SGIX_shadow_ambient, GL_SUN_multi_draw_arrays 5 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 ---------------------------------------------------------------------------- 0x04f 24 tc 0 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 0x050 24 tc 0 24 0 r y . 8 8 8 0 . . 0 16 8 16 16 16 0 0 0 None 0x051 24 tc 0 32 0 r y . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None 0x052 24 tc 0 32 0 r . . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None 0x053 24 sc 0 24 0 c y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 11 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 ---------------------------------------------------------------------------- 0x04f 24 tc 0 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 0x050 24 tc 0 24 0 r y . 8 8 8 0 . . 0 16 8 16 16 16 0 0 0 None 0x051 24 tc 0 32 0 r y . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None 0x052 24 tc 0 32 0 r . . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None 0x053 24 sc 0 24 0 c y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 0x053 0 tc 0 128 0 y . 32 32 32 32 . . 0 24 0 0 0 0 0 0 0 None 0x053 0 tc 0 128 0 . . 32 32 32 32 . . 0 24 0 0 0 0 0 0 0 None 0x053 0 tc 0 64 0 y . 16 16 16 16 . . 0 24 0 0 0 0 0 0 0 None 0x053 0 tc 0 64 0 . . 16 16 16 16 . . 0 24 0 0 0 0 0 0 0 None 0x053 0 tc 0 32 0 y . 11 11 10 0 . . 0 24 0 0 0 0 0 0 0 None 0x053 0 tc 0 32 0 . . 11 11 10 0 . . 0 24 0 0 0 0 0 0 0 None
lsmod | grep radeon
radeon 917108 2 ttm 80957 1 radeon drm_kms_helper 40087 1 radeon drm 265638 4 radeon,ttm,drm_kms_helper i2c_algo_bit 5935 1 radeon i2c_core 31084 5 i2c_i801,radeon,drm_kms_helper,drm,i2c_algo_bit
Seems like VirtualGL does do something in tune to what I want. I can run 3D opengl now and get "direct rendering" saying "yes" when I use "vglrun glxinfo" and vglrun glxgears etc. (Interestingly glxgears runs much faster on software rendering without vglrun, but that glxspheres thing does run much faster with vglrun versus using mesa software render.)
Anyway, what I discovered though is that vglrun won't work with Android Emulator because I guess it can't handle the OpenGL "ES" emulation it wants to do or some issue like that. I can't get rid of this error:
Failed to open lib64EGL_translator Failed to init_egl_dispatch emulator: ERROR: OpenGLES initialization failed! emulator: ERROR: OpenGLES emulation library could not be initialized! emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
In conclusion I see my only solution is to get my GPU pass-through working as a primary card instead of booting using emulated cirrus logic and then using the passed through AMD GPU with vglrun/virtualgl. If I remove the emulated cirruslogic then I can BOOT the host console DIRECTLY on the passed through GPU. Then I would be able to run x11vnc or similar vnc that allows binding on the LOCAL :0 display on the passed through GPU. This means I can then just do an NX into the remote machine and once in then connect with tigervnc or turbovnc or tightvnc to the x11vnc session on the LOCAL display and this way I should have direct OPENGL on everything, entire session without having to rely on VirtualGL and vglrun which for android emulator did not work anyway, again some issue with lib64EGL translator. (and yes I had needed .so in the path and in the ldconfig etc etc the correct 64bit file was there etc, its not something simple like that, I think somehow vglrun maybe can't handle opengl es translation ? )
Anyway, my only problem now is although I did have it working before somehow, now if I try to remove cirruslogic vga from my virtual image, the virtual machine goes into a "paused state" as soon as it tries to boot. (I can modify kernel boot parameters but soon as I tell it ok boot, it goes into 'paused' state in KVM) but at least if I can fix that I can fix my android emulator problem it seems.