VirtualBox

Ticket #14102 (new defect)

Opened 4 years ago

Last modified 6 months ago

Kubuntu 15.04 Guest: 3D acceleration broken

Reported by: sac Owned by:
Component: guest additions/x11/graphics Version: VirtualBox 4.3.26
Keywords: Cc: sancelot
Guest type: Linux Host type: Windows

Description

3d support is unavailable for every KDE5 (Plasma) based Linux distro on Windows Host. Reference  https://forums.virtualbox.org/viewtopic.php?f=3&t=67589&p=320394#p320394  https://forums.virtualbox.org/viewtopic.php?f=6&t=64452

If 3D acceleration is enabled, KDEs login screen appears normally, one can login. After logging in, the Desktop appears, everything seems to be normal. BUT:

1.) Right clicking somewhere at the desktop doesn't bring up the context menu 2.) Clicking the "KDE" Menu: the KDE Menu appears, but the Control Bar disappears completely 3.) When starting an application in KDE Menu (which can still be opened with Alt+F1), the application seems to start, but no application window appears 4.) Trying to get out of KDE and switch to a console TTY (STRG+ALT+F1) just switches to a smaller screen but in this KDEs background image remains. ==> So the Desktop is completely unusable, it isn't even possible to get a terminal window, so one even can't examine "glxinfo" or some logs...

It looks like the KDE Background lays in front of everything, similar to an "z-axis 9999"...

After disabling 3D acceleration the Desktops behaves absolutly normal but not with the performance it could have...

My System is this:

Host: Windows 7 Pro 64Bit Latest VirtualBox 4.3.26, Extension Pack for 4.3.26 installed

Guest: Kubuntu 15.04, all current patches installed GuestAdditions from iso shipped with VirtualBox 4.3.26

Attachments

kubuntu.jpg Download (73.8 KB) - added by snoopy1978 4 years ago.
Screenshot 3D Acc. enabled Kubuntu 15,04 guest
3DTest_VboxScreenshot.png Download (3.3 KB) - added by snoopy1978 4 years ago.
Screenshot taken with VBox' internal screenshot function
3DTest_InConsole.png Download (19.5 KB) - added by snoopy1978 4 years ago.
Boot stucks, this is what is in the VBox Console Window
VBox.log Download (161.2 KB) - added by castil 19 months ago.
Log from booting up to shutdown

Change History

comment:1 Changed 4 years ago by svr

Same issue with Virtualbox 4.3.28

Changed 4 years ago by snoopy1978

Screenshot 3D Acc. enabled Kubuntu 15,04 guest

comment:2 Changed 4 years ago by snoopy1978

Almost same issue with VirtualBox 5.0 and current VirtualBox Guest Additions 5.0.

Difference: After the login the desktop seems to be "slipped down" a few pixels, so the KDE Menu / TaskBar is not visible. Using the hotkeys brings KDE Menu up. But now one can see better what is meant with "z-axis 9999" as opened programs seems to start "behind" the background image. To make this more clear I added a screenshot of a freshly started, 3D acc. - enabled Kubuntu 15.04 guest with started "Terminal" and "Systemsettings".

BTW: It was me who started this forum thread:  https://forums.virtualbox.org/viewtopic.php?f=3&t=67589&p=320394#p320394

comment:3 Changed 4 years ago by snoopy1978

Bug still remains in 5.0.4...

comment:4 Changed 4 years ago by jeansimeoni

I can confirm that the bug still remains in 5.0.8.

Tested with Windows 10 as host and as guests Kubuntu 15.10 and Netrunner 16.

comment:5 Changed 4 years ago by snoopy1978

same for me, Bug still present in 5.0.8, Guest: Kubuntu 15.10, Guest Additions 5.0.8 installed...

Is there any progress about this issue?

comment:6 Changed 4 years ago by TeutonJon78

This affects all Plasma 5 based distros. They only work if you disable 3d acceleration and allow kwin to use the software rasterizer.

comment:7 Changed 4 years ago by michael

You might want to give this test build of the Additions a try:

https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.0.9-104010.iso

Changed 4 years ago by snoopy1978

Screenshot taken with VBox' internal screenshot function

comment:8 Changed 4 years ago by snoopy1978

With these Additions things are getting worse. After installing this, X isn't even able to start whether 3D Accel. is enabled or not....

VirtualBox 5.0.8 r103449
Kubuntu 15.10
GuestAdditions from iso above

What I've done:

  1. Created a new VM, no 3D Accel.
  2. Freshly installed Kubuntu 15.10
  3. In Kubuntu: apt-get install build-essential to be able to build GuestAdditions
  4. Installed GuestAdditions 5.0.9
  5. Shutdown Guest
  6. Started Guest, no 3D Accel (removed "quit splash" from kernel opts. for seeing more boot output)
  7. Boot gets stuck
  8. Killed Guest
  9. Start Guest, enabled 3D Accel
  10. The same, boot gets stuck

What I found out by chance is:

In the attachment "3DTest_InConsole" you can see what is be seen in the VBox Console Window when the boot stucks. The attachment "3DTest_VBoxScreenshot" is taken from the VBox internal screenshot function....perhaps this gives a hint...

Changed 4 years ago by snoopy1978

Boot stucks, this is what is in the VBox Console Window

comment:9 Changed 4 years ago by snoopy1978

Problem remains slightly different in VirtualBox 5.0.10 / GuestAdditions 5.0.10:

Now even the K menu and the control bar are disappeared, the background now covers the whole screen. After a little bit of clicking around the VM crashes with a segfault...

Will migrate to VMware now as there everything just works including accel.

Last edited 4 years ago by snoopy1978 (previous) (diff)

comment:10 Changed 4 years ago by michael

When I get a chance I will test the 5.0.9-104010 Additions linked above with SDDM version 0.13, as I believe there are some fixes there that might be relevant. If you want to speed things up you could do that yourself, as it will probably be a bit until I get round to it.

comment:11 Changed 4 years ago by michael

Installed Fedora 23 KDE and upgraded to SDDM 0.13 from Rawhide - no difference.

comment:12 Changed 4 years ago by Madpausa

Still present using guest additions 5.0.10. Host systems: Windows 7 64bit / Windows 10 64bit. Guest sytem: ArchLinux x64 - Plasma 5.5

comment:13 Changed 4 years ago by michael

I don't think 3D in Linux guests will be in good shape in a stable release in the near future, but I have been playing with it a bit in the development branch, so if anyone would like to try out the latest code and see if anything works which didn't before, here is a test build:

https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.0.51-104802.iso

comment:14 Changed 4 years ago by Madpausa

nothing seems to change with te testbuild. At least for me.

comment:15 Changed 4 years ago by michael

Madpausa: please can you double-check that 3D is enabled in your virtual machine settings for that machine? And describe again (sorry) what you are seeing, maybe even with a screen shot if appropriate.

By the way, a new test build, though only pretty trivial updates:

https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.0.51-104817.iso

comment:16 Changed 4 years ago by Madpausa

Gladly. With 3D enabled it feels like everything is drawn behind the desktop background, only exceptions are menus, sometimes. I'll provide screenshots asap.

Tryied to change the window manager (from kwin to openbox) but doesn't seem related, both with and without compositor enabled.

Regards.

comment:17 Changed 4 years ago by michael

No screen shots needed, I can reproduce it. Don't know when I will get time to investigate though. If you want to speed things up, finding someone who can look at it on the KDE side is probably your best bet.

comment:18 Changed 4 years ago by TeddtheTiger

I would like to state that VirtualBox 5.0.12 with guest extensions does not solve the problem.

comment:19 Changed 3 years ago by sac

Unfortunately we don't get someone from KDE, but David mentioned the important changes from Plasma 4 to 5:

"If virtualbox has a bug, that's virtualboxes problem. We can't do anything. As a workaround, simply don't enable the 3D acceleration flag. As for what's changed, we're using QtQuick - testing with qmlscene is easier than starting plasma."  https://bugs.kde.org/show_bug.cgi?id=358100

comment:20 Changed 3 years ago by polrus

The bug still present in 5.0.14 (confirmed on Opensuse Leap 42)

comment:21 Changed 3 years ago by michael

As I said, we do not currently have time to look at this. If someone can debug it so that we do not have to that might make a difference. As I said, finding someone involved in KDE who can help with this might be a good bet, even if it probably really isn't their bug.

comment:22 Changed 3 years ago by Bigos

Hi. With the mantra of "If you want something done, do it yourself", I went and tried to debug this issue by myself.

First: You can start a working plasma 5 session by reverting to software rendering just for the plasmashell executable. I did it by:

  1. Start plasma 5. The display is unusable now.
  2. Start konsole (maybe using ALT+F2, typing "konsole" and hitting enter).
  3. Kill plasma by typing "killall plasmashell".
  4. Run plasma once again with forced software rendering, by typing "LIBGL_ALWAYS_SOFTWARE=1 plasmashell".

All of it has to be done without seeing the result, but after that the plasma session is at least barely usable. Some applications, like konsole and dolphin, just work.

After that, I have found an issue with chromium driver GLX patching while trying to start qmlscene (It looks like it has been reported previously [1]). It seems that Qt5 suffers from a similar problem to the one described as affecting "glut based apps" in src/VBox/Additions/common/crOpenGL/glx.c [2] (in function glXGetVisualFromFBConfig). The fix there doesn't help Qt5 and null is returned which makes the qt abort. The workaround is to run a dummy glx call before glXChooseFBConfig is called (I did it inside gdb session); after that the next glXChooseFBConfig call will already use a patched version.

It seems that it only affects OpenGL Qt applications (which includes QML).

After trying another application (kdevelop 5) I have found some other problems (segmentation fault in crPackExpandDrawElements) which I was unable to further debug.

I am overly unfamiliar with VirtualBox code and I don't really know what is the architecture of the Chromium driver (or why the patching is really needed in the first place...). I hope that my analysis helps somewhat.

[1] https://www.virtualbox.org/ticket/13648

[2] https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Additions/common/crOpenGL/glx.c

comment:23 Changed 3 years ago by michael

Just out of interest, did you try the Additions image on the Downloads page?

comment:24 Changed 3 years ago by snoopy1978

In my case I can say:
Of course I always installed the corresponding Guest Additions in the VM after Installing / Upgrading VirtualBox... with the results described at the beginning

comment:25 Changed 3 years ago by michael

The updated Additions image on the Downloads page is newer than the one in the 5.0.16 release, and might (or might not) make a difference here. Specifically, it does not do patching like Bigos referred to in comment:22.

comment:26 Changed 3 years ago by snoopy1978

Just gave the new versions a try actually...

I installed:
VirtualBox 5.0.16
VirtualBox 5.0.16 Oracle VM VirtualBox Extension Pack

at the Host and
VirtualBox 5.0.17 r105899 Guest Additions

in the Kubuntu 15.10 Guest.

With 3D accel. deactivated everything works fine but of course with a medium graphics performance. After that I activated 3D accel. and the only thing that worked were the menus of the control panel (including the K-Menu).
Neither had any application I started its window (or the windows seems to be behind the background), nor the desktop context menu appeared, so no changes with this.

So no really solution with the newest versions, therefore staying with VMware...

comment:27 Changed 3 years ago by Bigos

A few observations after trying the new guest additions image:

  1. plasmashell still displays the background in front of everything else.
  2. Since system (mesa's) libGL has been completely replaced by VBoxOGL one, no standard LIBGL_* environment variables work anymore. Specifically, adding LIBGL_ALWAYS_SOFTWARE=1 doesn't work, so plasmashell cannot be made to work on llvmpipe anymore.
  3. qmlscene works.
  4. kdevelop still segfaults on crPackExpandDrawElements. It does so while drawing the dashboard (which is a QML content). I think it was called in response to glDrawElements with type of GL_UNSIGNED_SHORT (I see a 16-bit read in the disassembly), though the pointer is invalid (very small value, close to NULL). Since the Qt library is optimized and I don't have debug information for VBoxOGL, I can't really investigate it further. I may try to make an apitrace trace out of it and see if it does reproduce.
  5. kwin OpenGL compositing doesn't work - black background is shown, though launching KRunner by ALT+F2 does show the small window properly.

The problems 1 and 5 are most important I would say, but they are really hard diagnose (at least by myself). Thankfully, they are easily reproducible.

comment:28 Changed 3 years ago by Bigos

Unfortunately, using apitrace won't work here. There seems to be a problem when trying to use apitrace on top of VBoxOGL and doing a trace on llvmpipe will make it unreplayable back on VBoxOGL due to feature disparity (like the lack of PBuffer support).

comment:29 Changed 3 years ago by michael

You can do a build of the Additions yourself if you want debugging information, but in the meantime here is one I just built (64-bit Linux Additions only, not the full Additions package):

https://www.virtualbox.org/download/testcase/VBoxGuestAdditions-Linux64-105913-dbg.iso

You can also ask me if you need a fresh build.

comment:30 follow-up: ↓ 31 Changed 3 years ago by Bigos

With these additions I got assertion failed in crStateBindTexture(target == GL_TEXTURE_2D, texture == 1) in Assert(crHashtableIsKeyUsed(...)) on line 1054.

From what I could gather, it was a texture name previously created by glGenTextures() but then removed by glDeleteTextures() (I got that by instrumenting these 2 calls in gdb and printing the texture names given/returned. Just before the faulty glBindTexture() call, name == 1 was deleted). It seems that this assertion doesn't hold in this case, but that is probably correct application behavior [1]. I think glBindTexture should silently allocate this texture name in this case too, as it probably does for a name that was never allocated.

I tried to inject a glGenTextures() call using gdb, but I got a VirtualBox error that forcefully aborted the VM.

[1]  https://www.opengl.org/sdk/docs/man2/xhtml/glBindTexture.xml

comment:31 in reply to: ↑ 30 ; follow-up: ↓ 32 Changed 3 years ago by sac

Replying to Bigos:

With these additions I got assertion failed in crStateBindTexture(target == GL_TEXTURE_2D, texture == 1) in Assert(crHashtableIsKeyUsed(...)) on line 1054.

From what I could gather, it was a texture name previously created by glGenTextures() but then removed by glDeleteTextures() (I got that by instrumenting these 2 calls in gdb and printing the texture names given/returned. Just before the faulty glBindTexture() call, name == 1 was deleted). It seems that this assertion doesn't hold in this case, but that is probably correct application behavior [1]. I think glBindTexture should silently allocate this texture name in this case too, as it probably does for a name that was never allocated.

I tried to inject a glGenTextures() call using gdb, but I got a VirtualBox error that forcefully aborted the VM.

[1]  https://www.opengl.org/sdk/docs/man2/xhtml/glBindTexture.xml

Has someone realized that 3d acceleration is working in Kubuntu 16.04. Xerial (daily live build 20.03. amd64). If I enable 3d acceleration in VB, then:

  • sudo apt install mesa-utils
  • glxinfo | grep direct

shows "direct rendering: Yes", so 3d acceleration seems to be enabled within the live session (was just new to me that we "only" have a problem here with VB Guest Utils ;))

comment:32 in reply to: ↑ 31 ; follow-up: ↓ 33 Changed 3 years ago by Bigos

Replying to sac:

Has someone realized that 3d acceleration is working in Kubuntu 16.04. Xerial (daily live build 20.03. amd64). If I enable 3d acceleration in VB, then:

  • sudo apt install mesa-utils
  • glxinfo | grep direct

shows "direct rendering: Yes", so 3d acceleration seems to be enabled within the live session (was just new to me that we "only" have a problem here with VB Guest Utils ;))

Did you check whether you're using Chromium as your OpenGL renderer or llvmpipe? Both of them will return "direct rendering: Yes", but the second one is just a software renderer.

For llvmpipe it would be (or something similar):

$ glxinfo | grep 'OpenGL renderer'
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 256 bits)

Also, what version of guest additions and VirtualBox are you using?

comment:33 in reply to: ↑ 32 ; follow-up: ↓ 34 Changed 3 years ago by sac

Replying to Bigos:

Did you check whether you're using Chromium as your OpenGL renderer or llvmpipe? Both of them will return "direct rendering: Yes", but the second one is just a software renderer.

it says: "OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)"

Also, what version of guest additions and VirtualBox are you using?

Tested with VB Version 5.0.16 r105871, but again no GuestAddiditions were used. Just the Kubuntu 16.04 Beta2 LiveDVD in a live session. I cannot test it with an installed image (the installer crashes for me), but I remember a Leap image that also worked with 3d in the live session, but was unusable after installed.

comment:34 in reply to: ↑ 33 Changed 3 years ago by Bigos

Replying to sac:

it says: "OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)"

Well, that is software rasterizer. It means that you have no 3D acceleration available and OpenGL 2.1 is implemented entirely on top of the CPU with AVX-256 instructions.

I imagine that if you were to install the guest additions image, the faulty VirtualBox 3D acceleration would kick in and you would have to disable it in virtual machine settings.

comment:35 Changed 3 years ago by xapienz

I'm almost sure the problem is neither in KDE nor Qt.

If I run simple glxgears (with HW acceleration enabled), the picture is always on top of all windows, even if the window is below others. Seems that KDE has the same problem, when some GL window is rendered above others despite the fact it should be below.

comment:36 Changed 3 years ago by Bigos

New VBox/additions 5.0.18 still misrenders plasmashell. Didn't test much else.

comment:37 Changed 3 years ago by daveshih

New VBox/additions 5.0.20 still does this. Windows 7 host / Kubuntu 16.04 guest.

comment:38 Changed 3 years ago by Jochen

Seen this with 5.0.16 on Gentoo Linux guest / Windows 10 host as well. Can't test 5.0.20 on Gentoo as it currently does not compile (known bug). [Sorry for the bug spam, trac as configured here does not support cc's unless commenting.]

comment:39 Changed 3 years ago by padde0711

I can confirm the issue with VirtualBox + Additions 5.0.20; Host: Windows 10, Guest: Kubuntu 16.04.

comment:40 Changed 3 years ago by Jahava

Confirm this is an issue on VirtualBox + Additions 5.0.20; Host: OSX 10.11.5, Guest: Kubuntu 16.04.

comment:41 Changed 3 years ago by daveshih

New VBox/additions 5.0.22 still does this. Windows 7 host / Kubuntu 16.04 guest.

comment:42 Changed 3 years ago by sac

According to other closed tickets related to 3d support this can take some years (cannot hurt to switch to VMWare until resolution).

Seems there were some devs available for a specific time ( https://www.virtualbox.org/ticket/475 ), however especially with Bigos debug work on this bug we might see some improvement.

Funny thing is that I guess many would donate here if there were any concrete plans to hire some dedicated guys for 3d support in general (which seems to be problematic with every new Windows / Unix distro version). Maybe it would make sense to wait for KDE Plasma 6 and concetrate the proper support there.

But I also don't understand KDE's unwillingness to align here with VB, which they are obsiously doing with VMWare. VMWare seems to be better backed by companies and they are forced to support the Cloud plattforms of all bigger companies that we know. I could start some evaualtion within my company to build a new platform with VB, but there's no chance if distros like LEAP, Fedora KDE which are used by the global top 30 customers are not fully supported. 2nd issue would be the supporting contracts & licenses (basically it's the other way round and every bigger company invests alot of effort to get rid of Oracle for DBs, because there are no simple licenses for cloud infrastructures).

Bottom line: Cloud & virtualization is not a top priority within Oracle and I guess some Oracle guys working on VB are stuck in conflict of aims. Vicious circle and in the end we're lacking ressources here to support 3d for Oracle VB. If this bug is not backed by the community, for sure it'll take time.

Last edited 3 years ago by sac (previous) (diff)

comment:43 Changed 3 years ago by michael

Created a wiki page regarding user support for X11 guest 3D. I'm afraid that hiring someone to work on this is more complicated than it might sound. That said, I would be interested to call your bluff and see if you can show that there would be people interested in donating to improve this (even better would be a possible candidate for hiring too!). Of course, we would not actually take the money unless we were sure that we could actually do the hiring. But if you actually had enough donations it might be possible for someone else to hire the developer and for us to work with them.

Last edited 3 years ago by michael (previous) (diff)

comment:44 Changed 3 years ago by michael

  • Component changed from 3D support to guest additions/x11/graphics

comment:45 Changed 3 years ago by michael

  • Cc sancelot added

Added sancelot to CC.

comment:46 Changed 23 months ago by andrzej1_1

Still not working... The best solution is to use VMware instead.

Changed 19 months ago by castil

Log from booting up to shutdown

comment:47 Changed 19 months ago by castil

I can confirm the persistence of this bug on the newest released VBox. And the Issue https://www.virtualbox.org/ticket/16316 seems to be a duplicate.

VirtualBox version: 5.2.4
Guest: Kubuntu 16.04.03 x64 with Plasma 5.8.8 and Guest Additions 5.2.4
Host: Windows 10 x64

Description of the problem:
if, and only if the 3D acceleration is enabled for the guest, the guest will boot and log in normally, but the taskbar, application launcher and any window won't appear until a VBox screen resize. But even then, after clicking anywhere, everything disappears again.
If I click anywhere where the things in the taskbar should be, they execute normally, but their windows dont appear. The only visible thing after clicked is the App Launcher, which, when clicked, shows up and I can navigate it, but from there no window opens as well.
If I get back to the log screen, it still shows with full functionality.

comment:48 follow-up: ↓ 49 Changed 15 months ago by NicolaF

Any update on this?

The issue persists with the following config:

  • Windows 10 x64 host
  • VirtualBox 5.2.10
  • Guest Additions 5.2.10
  • Plasma 5.8.6 on Debian 9 x64 guest

Best regards

comment:49 in reply to: ↑ 48 Changed 15 months ago by socratis

Replying to NicolaF:

Any update on this?

If you read the whole ticket, and mainly the comments by "michael" (a developer), you'll figure out that there will be no update on the matter. Not from the developers, not any time soon at least...

comment:50 Changed 6 months ago by ChrisWayg

3D Acceleration with KDE is still broken with the following configuration:

  • VirtualBox 6.0.0 & Guest Additions
  • 4096 MB Base Memory, 2 Processors
  • Video Memory 128MB, VMSVGA, 3D
  • Host: MacOS 10.14.2, 32 GB RAM, i7-4770
  • Guest: KDE Neon User Edition Plasma 5.14.5 (Ubuntu 18.04)

The text disappears on the Application Launcher menu, on the Task Manager and in the System Settings sidebar, while transparency effects work and the desktop is more responsive. Without 3D acceleration the text re-appears, there is no transparency when dragging a window, but KDE is very sluggish in all interactions.

https://i.gyazo.com/782a607c522aa46bd59e321cf687e96f.png

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use