[Resolved] Ubuntu 19.10 guest, Win10 host: 3D accel. enabled, not working

Discussions about using Linux guests in VirtualBox.
Underground78
Posts: 23
Joined: 5. Nov 2017, 17:16

[Resolved] Ubuntu 19.10 guest, Win10 host: 3D accel. enabled, not working

Post by Underground78 »

Hello,

I am trying to get 3D graphic acceleration to work with a Ubuntu 19.04 guest OS (on a Windows 10 host). Edit: The same issue happens with Ubuntu 19.10.

I have been reading this blog post : https://blogs.oracle.com/scoter/oracle- ... 1804-guest. It seems pretty straightforward but I cannot seem to make it work...

I have selected "VMSVGA" graphic controller and ticked "Enable 3D acceleration" in the VM configuration. I have installed the guest additions in the guest OS.

If I check with "glxinfo", it is still using the software renderer:

Code: Select all

$ glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 8.0, 256 bits)
I have attached the VM log (zipped because it was bigger than 128 KB).

I hope someone will see what I am missing here...

Underground78
Attachments
VM.log.zip
(31.83 KiB) Downloaded 52 times
Last edited by Underground78 on 22. Oct 2019, 23:50, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by mpack »

I'm seeing "VMWare" mentioned, which tells me that you are indeed using the VMSVGA graphics controller (VMSVGA == VMware compatible SVGA).

Beyond that, someone more experienced with Linux guests will have to comment.

However, does OpenGL work correctly on your host? AFAIK, 3D acceleration in a guest still requires working OpenGL on the host.


Incidentally, you need to reduce the number of cores allocated to the guest. Your host has 4 cores, so giving 4 cores to the guest leaves the host with 0 cores. That means that guest and host can interfere with each other. Yes, your CPU has 8 threads, except we don't care about threads. I also think you've allocated too much RAM: out of 11GB available, you've allocated 8GB. Not such good news for the host. The idea is to strike a balance of resources so both guest and host can run smoothly. Consider how much RAM (and CPU) the guest actually needs.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by socratis »

Not sure why you think it's not working, this is exactly what's supposed to happen. Can you tell me why you think that this is software rendering?


BACKGROUND CHECKS
You need to take a look at several places to verify things are alright:
00:00:02.491746 [/Devices/vga/0/Config/] (level 4)
...
00:00:02.491752   VMSVGA3dEnabled    <integer> = 0x0000000000000001 (1)  <-- 3D acceleration is enabled
00:00:02.491753   VMSVGAEnabled      <integer> = 0x0000000000000001 (1)  <-- The new vGPUs are in use, VMSVGA or VBoxSVGA
00:00:02.491754   VMSVGAPciBarLayout <integer> = 0x0000000000000001 (1)  <-- VMSVGA is used
00:00:02.491754   VMSVGAPciId        <integer> = 0x0000000000000001 (1)  <-- VMSVGA is used
00:00:02.491755   VRamSize           <integer> = 0x0000000008000000 (134 217 728, 128 MB)[/color]
The second part, is looking for clues for the Guest Addition (GAs) installation:
00:00:21.567580 VMMDev: Guest Additions information report: Version 6.0.12 r133076 '6.0.12'
...
00:00:45.001460 VMMDev: Guest Log: 08:57:58.333395 main     VBoxService 6.0.12 r133076 (verbosity: 0) linux.amd64 (Sep  3 2019 11:48:42) release log
00:00:45.001486 VMMDev: Guest Log: 08:57:58.333400 main     Log opened 2019-10-06T08:57:58.333320000Z
00:00:45.001535 VMMDev: Guest Log: 08:57:58.333518 main     OS Product: Linux
00:00:45.001566 VMMDev: Guest Log: 08:57:58.333550 main     OS Release: 5.0.0-31-generic
00:00:45.001595 VMMDev: Guest Log: 08:57:58.333579 main     OS Version: #33-Ubuntu SMP Mon Sep 30 18:51:59 UTC 2019
00:00:45.001635 VMMDev: Guest Log: 08:57:58.333616 main     Executable: /opt/VBoxGuestAdditions-6.0.12/sbin/VBoxService
00:00:45.001641 VMMDev: Guest Log: 08:57:58.333617 main     Process ID: 1146
00:00:45.001654 VMMDev: Guest Log: 08:57:58.333618 main     Package type: LINUX_64BITS_GENERIC
00:00:45.003698 VMMDev: Guest Log: 08:57:58.335681 main     6.0.12 r133076 started. Verbose level = 0
And finally from within the guest, you look for evidence that the GAs are indeed loaded:
$ VBoxControl -version
6.0.12r133076

$ lsmod | grep vbox
vboxsf                 77824  0
vboxvideo              36864  0  <-- Video kernel module is enabled
vboxguest             344064  6 vboxsf
ttm                   106496  2 vmwgfx,vboxvideo
drm_kms_helper        172032  2 vmwgfx,vboxvideo
drm                   401408  8 vmwgfx,drm_kms_helper,vboxvideo,ttm
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Underground78
Posts: 23
Joined: 5. Nov 2017, 17:16

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by Underground78 »

socratis wrote:Not sure why you think it's not working, this is exactly what's supposed to happen. Can you tell me why you think that this is software rendering?
Sorry I forgot to subscribe to this thread so I thought it didn't get any answer.

I'm pretty sure it's using software rendering because of the "glxinfo" ouput. The Oracle blog post says "[if the] OpenGL Renderer is NOT "SVGA3D", then you are NOT using the correct OpenGL drivers" and in my case it says "llvmpipe (LLVM 8.0, 256 bits)" (which is similar to what they show for the "not working" example).

Also the glmark2 figures I get are lower than what I would expect with hardware rendering (e.g. "FPS: 1493" in the blog post, more like "FPS: 200" in my case).
mpack wrote:However, does OpenGL work correctly on your host? AFAIK, 3D acceleration in a guest still requires working OpenGL on the host.
Not sure how I can check that?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by mpack »

Underground78 wrote:
mpack wrote:However, does OpenGL work correctly on your host? AFAIK, 3D acceleration in a guest still requires working OpenGL on the host.
Not sure how I can check that?
I seem to remember that there's a portable test app called glxgears that people sometimes use for that. It's a bit dated, and it is not a benchmark, all it establishes is whether you have a working OpenGL framework on your host.
Underground78
Posts: 23
Joined: 5. Nov 2017, 17:16

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by Underground78 »

Thanks, it seems to work fine.
towo2099
Volunteer
Posts: 364
Joined: 18. Aug 2014, 21:53
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Android, Linux

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by towo2099 »

It should look like:

Code: Select all

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL version string: 2.1 Mesa 19.1.6
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 19.1.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
Then 3D is working in guest. And for VMSVGA it needs xserver-xorg-video-vmware installed in the guest.

Code: Select all

Graphics:  Device-1: VMware SVGA II Adapter driver: vmwgfx v: 2.15.0.0 
           Display: x11 server: X.Org 1.20.4 driver: vmware unloaded: fbdev,modesetting,vesa 
           resolution: 1440x900~60Hz 
           OpenGL: renderer: SVGA3D; build v: 2.1 Mesa 19.1.6
Underground78
Posts: 23
Joined: 5. Nov 2017, 17:16

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by Underground78 »

towo2099 wrote:It should look like
Thanks for the confirmation.
towo2099 wrote:And for VMSVGA it needs xserver-xorg-video-vmware installed in the guest.
I was already installed so I tried removing it and reinstalling it but no change.
towo2099
Volunteer
Posts: 364
Joined: 18. Aug 2014, 21:53
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Android, Linux

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by towo2099 »

It could be something is wrong in your graphics configuration of your host.
Underground78
Posts: 23
Joined: 5. Nov 2017, 17:16

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by Underground78 »

Possibly but I have no idea how to make sure of that...
towo2099
Volunteer
Posts: 364
Joined: 18. Aug 2014, 21:53
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Android, Linux

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by towo2099 »

Underground78 wrote:Possibly but I have no idea how to make sure of that...
Since no one knows your host hardware, ....
Underground78
Posts: 23
Joined: 5. Nov 2017, 17:16

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by Underground78 »

Nobody asked so not sure what you need exactly.

Code: Select all

Processor: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 CPUs), ~3.4GHz
   Memory: 16384MB RAM
Card name: NVIDIA GeForce GTX 650 Ti
towo2099
Volunteer
Posts: 364
Joined: 18. Aug 2014, 21:53
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Android, Linux

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by towo2099 »

Hm, host OpenGL should available with that card. Can you paste teh Xorg.0.log from Ubuntu?
Underground78
Posts: 23
Joined: 5. Nov 2017, 17:16

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by Underground78 »

Hmm, as far as I can tell the log does say that the driver failed to enable 3D acceleration but it doesn't say much about why.
Attachments
Xorg.0.log
(24.53 KiB) Downloaded 36 times
towo2099
Volunteer
Posts: 364
Joined: 18. Aug 2014, 21:53
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Android, Linux

Re: Ubuntu 19.04 guest, Win10 host: 3D accel. enabled, not working

Post by towo2099 »

hm,

Code: Select all

dpkg -l | grep -i mesa
is showing what?
Post Reply