Page 1 of 1

3d acceleration does not work in linux guests

Posted: 15. Oct 2016, 22:40
by plurgid
I am but a simple country developer who likes to write node.js and perl type stuff inside a linux vm.

I like Gnome 3, and so my go-to distros are Fedora or Ubuntu-Gnome, and i like to use the Atom text editor.
Apparently Atom (and everything that uses electron), needs 3d acceleration.

I *cannot* get 3d acceleration working properly under the latest and greatest virtualbox. I can run my VM with 3d acceleration disabled. This allows Atom to run, but very poorly. Also my Gnome desktop is way slow with or without 3d acceleration disabled, so I'm pretty sure something ain't right. I think this all worked at some point in the past, but I've not been paying close enough attention to tell you at what point things stopped working.

I can tell you this ... if you download the latest virtualbox + guest additions, and you install the latest version of Fedora or Ubuntu-Gnome inside a VM on an OS X or Windows host, 3d acceleration will definitely not work correctly, and this problem becomes very evident if you try to run Atom.

There clearly is a bug here, and there is no possible way on god's green earth I'm the only one whose run into it, yet I'm having serious problems googling up a solution.

Is there a solution?

Better yet, does anyone just know the last versions of everything that worked together? I don't really give a hoot about running the absolute latest and greatest, I just want a usable dev VM again.

Re: 3d acceleration does not work in linux guests

Posted: 15. Oct 2016, 22:56
by socratis
plurgid wrote:There clearly is a bug here, and there is no possible way on god's green earth I'm the only one whose run into it
I guess you haven't searched if others have been complaining, because you wouldn't have made that comment.

A bug is something that claims to be working with a certain way, yet it doesn't. Your case falls under limited feature, experimental feature of something similar. If my actual, physical 10 year old PC can't run my favorite game that just came out, it's not because it has a bug; it's because it's stuck in OpenGL 2.1 (for eternity) and the game requires OpenGL 4.0. You wouldn't call it a bug in the game, right?

The 3D graphics are virtual. And as such, they have shortcomings. They do not take advantage of your actual GPU. They try their best, by translating calls back and forth, but this is run-time consuming and (more importantly) really demanding from a development point of view. And with glitches.

Re: 3d acceleration does not work in linux guests

Posted: 15. Oct 2016, 23:19
by plurgid
Unnecessary snark is unnecessary, dude. I did not come here to get in a flame war over the symantics of the word "bug", as is quite obvious from my post. Chill. There is no need to rustle ones jimmies.

I have found a problem, and yes I've been googling it for days, and yes it is extremely reproducible as I've reproduced the problem on at least three different hardware platforms, two different host OSes and three Linux distros, so ... no, it is not my imagination, and yes I have done my due diligence, and yes I am aware of the way in which virtual box pipes 3D stuff to the host OS.

Something has gone wrong (something that used to work), but I don't have the background necessary to dig in pinpoint the problem, as I'm not an OS developer, also I next to nothing about 3D beyond webGL stuff, but I do know that's where the problem is.

Maybe that's something someone here on the forum could help me out with 'eh?

Re: 3d acceleration does not work in linux guests

Posted: 15. Oct 2016, 23:35
by Perryg
I have not had an issue with 3D acceleration in a mighty long time so we need more information to proceed. First step is to 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: 3d acceleration does not work in linux guests

Posted: 15. Oct 2016, 23:40
by socratis
Just to save you some time, if you open a bug report or add your experience to an existing one, the first thing that the developers are going to ask is "when did it work last time" so they can track down any changes that might be responsible. An "I don't know" answer is not going to go far. Try to downgrade several VirtualBox versions, document your findings and help the devs help you. That would include going back with Atom versions possibly, because their requirements might have changed.

PS. We're all volunteers here. We try to help you out. Not to do your homework, but to help you do your homework. And from where I'm sitting, somebody did actually complain about a bug. A clear one, if I'm not mistaken...

Re: 3d acceleration does not work in linux guests

Posted: 16. Oct 2016, 17:47
by plurgid
Thanks for your replies everyone. I know my OP was lacking specific details. Atom is a very popular text editor, Gnome is a very popular desktop, and virtualbox is an extremely popular virtualization suite. This problem is so easy to run into ... all you need to find it, is to install the latest versions of all three to find the problem. It's literally right behind the front door. It still boggles my mind how there's next to no mention of this anywhere on the internet. I can't be the only person in the world that likes to run Atom in a linux VM under virtualbox.

I was honestly hoping that I'd just come here, mention it, and someone would be all like "oh that ... here's how to fix it".

I've realized after thinking about this, that I do have a backup on a drive at work with versions of everything working together.
So I should be able to pull that up tomorrow morning and work backward from that. When I do, I'll come back to the thread and post an update.

I've made a mess on my home rig this weekend, monkeying around with pre-release versions trying to see if someone fixed this already, which is why I've not posted the requested logfile yet. If I find the time to revert everything back to the proper release versions today, I'll generate a log file and post it.

I strongly suspect the problem is between the Guest Additions and a version of some library or another in linux, because I didn't start seeing this problem until after pulling OS updates and installing them inside the linux host.

oh well ... now I seem to have found something this morning, that I couldn't find before but I'm not sure exactly what it means:

https://www.virtualbox.org/ticket/12738

am I reading this correctly? it's a known issue and there aren't the resources available to figure it out?

following that thread through to here:

https://github.com/atom/atom/issues/11574

it would appear that I need to downgrade to VirtualBox 5.0.20, using Guest Additions 5.0.16 ... so ... April '16 ... yeah ... that jives with my recolection. It's been a bout that long since all this worked right, but I've been so busy, I've just worked around it by using other text editors.

OK ... think I may have answered my own question here.

thanks everyone.

Re: 3d acceleration does not work in linux guests

Posted: 16. Oct 2016, 18:28
by socratis
plurgid wrote:it's a known issue and there aren't the resources available to figure it out?
Yeap, you're right, I completely forgot about that one. Just for completion, and for anyone else reading this, there is call for help from the developers for end-users to pitch in helping with this. 3D support for X11 guests.

Re: 3d acceleration does not work in linux guests

Posted: 18. Oct 2016, 23:10
by plurgid
OK ... so searching my backups at work, I have found something mighty odd ... which is a Linux VM, under the most recent version of Virtualbox (Version 5.1.6 r110634 (Qt5.5.1) but with Guest Additions 5.1.4) wherein atom works with 3d acceleration turned on.

In my mind this seems to suggest that the problem is not specifically with the VirtualBox release, but with the distinct combination of the various libraries installed on my linux VM, in combination with the version of guest additions which are installed.

Here's some info on the currently running guest additions:

Code: Select all

[root@alzarius opt]# uname -a
Linux alzarius 4.4.14-200.fc22.x86_64 #1 SMP Fri Jun 24 21:19:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@alzarius opt]# lsmod | grep -i vbox
vboxsf                 45056  1
vboxvideo              49152  3
vboxguest             266240  7 vboxsf,vboxvideo
ttm                    90112  1 vboxvideo
drm_kms_helper        126976  1 vboxvideo
drm                   335872  6 ttm,drm_kms_helper,vboxvideo
[root@alzarius opt]# modinfo vboxguest
filename:       /lib/modules/4.4.14-200.fc22.x86_64/misc/vboxguest.ko
version:        5.1.4 r110228
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     E0C9483329DC564255FBED4
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:        
vermagic:       4.4.14-200.fc22.x86_64 SMP mod_unload 

[root@alzarius opt]# modinfo vboxvideo
filename:       /lib/modules/4.4.14-200.fc22.x86_64/misc/vboxvideo.ko
version:        5.1.4 r110228
license:        GPL and additional rights
description:    Oracle VM VirtualBox Graphics Card
author:         Oracle Corporation
srcversion:     17590D9358AB3314436A0BC
alias:          pci:v000080EEd0000BEEFsv*sd*bc*sc*i*
depends:        drm,drm_kms_helper,ttm,vboxguest
vermagic:       4.4.14-200.fc22.x86_64 SMP mod_unload 
parm:           modeset:Disable/Enable modesetting (int)

Atom version is 1.11.1

attached file contains output of rpm -qa


So ... I'd like to think I've found an important clue here, in that I have found an example of everything working correctly. Unfortunately, I just don't have the necessary background to work backward from here to pinpoint the specific cause.

If anyone here has suggestions on how to proceed, I'll be happy to learn. Just point me in the right direction.

I'd love to see this working again with the latest and greatest releases. Atom is just the tip of the iceberg. Atom has problems with 3d interpolation on VirtualBox, because the electron framework that it's built on, does. That's a much, much larger problem, and one I'd like to help solve if possible.

Re: 3d acceleration does not work in linux guests

Posted: 18. Oct 2016, 23:26
by socratis
plurgid wrote:If anyone here has suggestions on how to proceed, I'll be happy to learn. Just point me in the right direction.
Usually developers just pass by here, so a better place would be to check out the "Contribute" section and the "Community" section. I'd either go with the IRC or the developer's list options.

Re: 3d acceleration does not work in linux guests

Posted: 18. Jan 2017, 06:25
by tcab
plurgid wrote:Atom is a very popular text editor, Gnome is a very popular desktop, and virtualbox is an extremely popular virtualization suite. This problem is so easy to run into ... all you need to find it, is to install the latest versions of all three to find the problem. It's literally right behind the front door. It still boggles my mind how there's next to no mention of this anywhere on the internet. I can't be the only person in the world that likes to run Atom in a linux VM under virtualbox.
You are definitely not alone - many people are reporting this annoying issue in the atom forum https://discuss.atom.io/t/atom-wont-ope ... 04-1/32026. I'm currently working around it with the suggested $ atom --disable-gpu but as you say, that's not ideal.

Atom is an electron based app http://electron.atom.io/. The same problem also happens with another popular electron based app which I use: Gitkraken https://www.gitkraken.com/. Again the workaround is the same, gitkraken --disable-gpu. As the atom forum thread suggests, all chromium based electron based apps are probably affected. Thats a whole lot of apps incl. possibly Slack - see the list of electron apps here: http://electron.atom.io/apps/

There is an issue ticket on the electron github https://github.com/electron/electron/issues/5755 where they blame virtualbox "Virtualbox has had unresolved problems with 3d acceleration for years" - there are some more links mentioned incl. misc speculation and finger pointing :?