Page 1 of 1

(Solved) 2D Acceleration not working on Windows Guest from Linux Host

Posted: 10. Jun 2016, 14:24
by Pastulio
Hello Everybody,

I have been looking for a while but have not been able to find a solution to my problem.
I tried following some topics that were 6 years old and have included to output of my efforts.

I am running a Scientific Linux release 6.7 (Carbon) server with VirtualBox OSE as a hypervisor.
We are running a Windows 7 VM for GUI development that needs to run an application, but the application is throwing openGL errors.
(In short, it says there is probably no OpenGL driver installed while I have installed the correct VBoxGuestAdditions)

I am unable to enable 2D Video accelleration in the VirtualBox GUI (it is greyed out), which I think might be the problem.
3D Acceleration seems to be working fine.
(I was able to use vboxmanage to enable 2D acceleration, but I highly doubt this is working.)


On the host system

The host system has an Intel Xeon processor with integrated graphics.
It is using the i915 intel driver (xorg-x11-drivers-intel).

I have also installed the following mesa packages:

Code: Select all

mesa-dri1-drivers-7.11-8.el6.x86_64
mesa-demos-10.4.3-1.el6.x86_64
mesa-libGLU-10.4.3-1.el6.x86_64
mesa-libGL-10.4.3-1.el6.x86_64
mesa-dri-filesystem-10.4.3-1.el6.x86_64
mesa-private-llvm-3.4-3.el6.x86_64
mesa-dri-drivers-10.4.3-1.el6.x86_64
I am running VirtualBox 5.0.20r106931 on the host machine.


I have exported LIBGL_DEBUG=verbose to get more information.

glxgears output:

Code: Select all

libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /root/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
The swrast driver exists in /usr/lib64/dri/swrast_dri.so

Code: Select all

[root@wks56 vbox]# ls /usr/lib64/dri/swrast_dri.so 
/usr/lib64/dri/swrast_dri.so
lspci -v output:

Code: Select all

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06) (prog-if 00 [VGA controller])
        Subsystem: Lenovo Device 30a1
        Flags: bus master, fast devsel, latency 0, IRQ 33
        Memory at f7800000 (64-bit, non-prefetchable) [size=4M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]  
        I/O ports at f000 [size=64]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [a4] PCI Advanced Features
        Kernel driver in use: i915
        Kernel modules: i915
I also ran the following test which I found in other topics/bugs:
/usr/lib/virtualbox//VBoxTestOGL --test 2D --log VBoxTest.log

This gave the following output:
(The last two lines seem to indicate 2D acceleration is not supported)

Code: Select all

VBoxTestGL 5.0.20 r106931 linux.amd64 (Apr 28 2016 16:13:52) release log
00:00:00.037091 Log opened 2016-06-10T11:28:03.966717000Z
00:00:00.037110 OS Product: Linux
00:00:00.037112 OS Release: 2.6.32-573.26.1.el6.x86_64
00:00:00.037115 OS Version: #1 SMP Tue May 3 14:22:07 CDT 2016
00:00:00.037119 Executable: /usr/lib/virtualbox/VBoxTestOGL
00:00:00.037119 Process ID: 8597
00:00:00.037119 Package type: LINUX_64BITS_EL_6
00:00:00.037123 Testing 2D Support:
00:00:00.099035 gl version string: 01.2 (1.5 Mesa 6.4.1)
00:00:00.099074 gl version: 0x10200
00:00:00.099652 gl 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_NV_blend_square GL_NV_point_sprite GL_NV_texgen_reflection GL_NV_texture_rectangle 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 
00:00:00.099661 GL_ARB_multitexture: 1
00:00:00.099664 GL_ARB_shader_objects: 0
00:00:00.099666 GL_ARB_fragment_shader: 0
00:00:00.099668 GL_ARB_pixel_buffer_object: 0
00:00:00.099672 GL_ARB_texture_rectangle: 1
00:00:00.099674 GL_EXT_texture_rectangle: 1
00:00:00.099677 GL_NV_texture_rectangle: 1
00:00:00.099679 GL_ARB_texture_non_power_of_two: 0
00:00:00.099682 GL_EXT_framebuffer_object: 0
00:00:00.099753 Max Tex Coords (32765), Img Units (1121876768)
00:00:00.099760 2D not supported: fragment shader unsupported
00:00:00.099763 Testing 2D Failed
I am not sure where I should be looking. Is this a problem with VirtualBox, the graphics driver or the integrated graphics chip itself?
Does anybody have experiance with these types of problems, or can somebody point me in the right direction?

Thanks for any help or input!

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 10. Jun 2016, 15:00
by Perryg
Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 10. Jun 2016, 15:25
by Pastulio
I have attached the log file to my first post. thanks!

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 10. Jun 2016, 15:56
by Perryg

Code: Select all

00:00:00.559139 Console: VM runtime error: fatal=false, errorID=Ext4PartitionDetected message="The host I/O cache for at least one controller is disabled and the medium '/home/vbox/VirtualBox VMs/virtualmachine/virtualmachine-new.vdi' for this VM is located on an ext4 partition. There is a known Linux kernel bug which can lead to the corruption of the virtual disk image under these conditions.
00:00:00.559141 Either enable the host I/O cache permanently in the VM settings or put the disk image and the snapshot folder onto a different file system.
00:00:00.559141 The host I/O cache will now be enabled for this medium"
First I would handle the problem indicated above.

As for the 2D warning I see this often and most of the time it does not render the 2D for the guest useless. That said however this almost always happens on RH and I believe it has to do with older packages being used and newer ones are required from VirtualBox. I would look through bugtracker and see if you can find a ticket that resembles yours and see what can be done.

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 13. Jun 2016, 08:26
by Pastulio
Thanks Perryg,

I did notice the I/O cache error and have enabled it permanently. Thanks for the hint!
From your input, I think my best change might be to just update the host machine to RH 7 instead of 6.
(I was trying to avoid this but such is life)

I will update this post if it either does or does not solve the problem.

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 25. Jun 2016, 21:54
by mcrocker
I'm running into basically the same problem running Eclipse Neon on an ubuntu xenial64 Vagrant box.

Since it was complaining about not having a .drirc file, i created an empty one, but it still complains.

(FYI: The forum software requires me to mangle the links below or it won't let me post).

Code: Select all

ubuntu@ubuntu-xenial:sts-3.7.3.RELEASE$ ./STS 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: /home/ubuntu/Documents/workspace-sts-3.7.3.RELEASE/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.7.0.20160202-2119.xml
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://936.fwk1122863578:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://936.fwk1122863578:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See slf4j #multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: Error in /home/ubuntu/.drirc line 1, column 0: no element found.
libGL: Error in /home/ubuntu/.drirc line 1, column 0: no element found.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
The program 'Spring Tool Suite' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 25 error_code 2 request_code 150 minor_code 24)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 25. Jun 2016, 22:05
by Perryg
Sorry but we don't support vagrant. They change too many things and use special scripts that are unknown to us making it too time consuming to diagnose.

vagrant support

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 26. Jun 2016, 02:02
by mcrocker
Thanks for such a quick reply. It almost makes me wish it was a VirtualBox problem, but I suspect it's a libGL problem.

I can't post links here today due to forum rules, but there are several references to an LD_LIBRARY_PATH over-ride in Ubuntu and StackExchange forumns. In addition, Qt Creator has a bug, 8727, that seems like it may be very similar.

Unfortunately, an

Code: Select all

apt-get update
followed by an

Code: Select all

apt-get upgrade
didn't get the solution into my system, if that was the problem at all.

Re: 2D Acceleration not working on Windows Guest from Linux Host

Posted: 27. Jun 2016, 21:54
by Pastulio
I managed to solve my problem by upgrading to the latest version of Scientific Linux as perryg suggested.
I also had to install a graphical desktop because the VM has to be started in from the GUI.
Even if the desktop is installed staring the VM from an ssh shell does not work.

I got around this by installing x2go-server so I can still start vms remotely (over ssh, with a gui).

I'm not familiar with vagrant, but perhaps mcrocker is also starting the VMs from a remote shell without a display?

Re: (Solved) 2D Acceleration not working on Windows Guest from Linux Host

Posted: 30. Jun 2016, 18:49
by mcrocker
I found a solution at http://askubuntu.com/questions/745135/h ... wer-747088

Apparently, Cygwin's XWin server has problems with OpenGL over an SSH tunnel. In my case I'm using

Code: Select all

ssh -Y -p 2222 ubuntu@localhost

to connect, but the problem is essentially the same. Surprisingly, even though I'm not using LightDM, XWin.exe accepts the +iglx switch and now glxgears works, but runs very, very slowly and Eclipse Neon starts up just fine.