3D acceleration Virtualbox no longer working

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
kenyon
Level 1
Level 1
Posts: 20
Joined: Fri Aug 13, 2021 9:11 pm

Re: 3D acceleration Virtualbox no longer working

Post by kenyon »

rockadile wrote: Thu Aug 19, 2021 8:16 pmHowever, I've seen no reports outside of Cinnamon of any issues with the latest Mesa drivers.
FWIW, these latest Mesa updates have been causing problems outside of anything involving VirtualBox or Cinnamon. They're also known to break gradient rendering in Mate and XFCE:
viewtopic.php?f=206&t=354400
viewtopic.php?f=57&t=355265
User avatar
windyweather
Level 3
Level 3
Posts: 174
Joined: Wed Nov 09, 2011 8:34 pm
Location: Coos Bay, OR

ETA for a Mesa fix?

Post by windyweather »

Any ETA on the fix?
[Systems include LM 20 in VirtualBox / Win 10 Host on AMD Ryzen 3800x / AsRock A300 Ryzen 3200G]
daveysprockett
Level 1
Level 1
Posts: 3
Joined: Fri Aug 20, 2021 6:04 am

Re: 3D acceleration Virtualbox no longer working

Post by daveysprockett »

No ETA for a fix, but a set of instructions to revert to the last known good build that worked for me. YMMV.

As far as I know, the last known good version of MESA available on the Ubuntu servers is version 20.2.6-0ubuntu0.20.04.1

I didn't find an easy way to get the deb files via script, but the page

https://launchpad.net/ubuntu/+source/me ... d/20708104

lists all the binary packages produced by Mesa3d.

Clicking on each in turn, you can see and follow the link to download the corresponding .deb file.

Store all of them (or at least in my case those listed below), into, for example, /usr/local/localdebs/

(I ran the following in the VM with SW rendering to ensure packages weren't in use).

Add the local store to your apt sources:

# cd /usr/local/localdebs/ && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

# echo 'deb [trusted=yes] file:/usr/local/localdebs ./' > /etc/apt/sources.list.d/local.list

# apt-get update

# v=20.2.6-0ubuntu0.20.04.1
# apt install libglapi-mesa=${v} libd3dadapter9-mesa=${v} libegl-mesa0=${v} libegl1-mesa=${v} libg1=${v} \
libgl1-mesa-dev=${v} libgl1-mesa-dri=${v} libgl1-mesa-glx=${v} libglapi-mesa=${v} libgles2-mesa=${v} \
libglx-mesa0=${v} libosmesa6=${v} libxatracker2=${v} mesa-opencl-icd=${v} mesa-vdpau-drivers=${v} \
mesa-vulkan-drivers=${v}

I think those need to be all in one line to ensure cross-compatibility.
Now mark each of these as held, so as to aviod updates. Of course, this will mean you are blind to any fixes that may appear in future:

# for p in `apt list --all-versions | grep installed,upgradable | awk -F/ '/20.2.6/ {print $1}'`; do \
apt-mark hold ${p}; done

At this point I powered off the VM, set the acceleration back on in the VirtualBox and rebooted.

All good so far for me.

This will work also in Mint 20.1, which is also susceptible to the update to the later Mesa3d package, as they share the same Ubuntu basis (focal).

I imagine it will also work for vanilla Ubuntu systems, which I think I've now seen are suffering the same.

If you wish to try a newer version, you can run apt-mark unhold on each of them.
rockadile
Level 1
Level 1
Posts: 45
Joined: Mon Jun 24, 2013 3:15 pm

Re: 3D acceleration Virtualbox no longer working

Post by rockadile »

daveysprockett wrote: Mon Aug 23, 2021 3:16 pm No ETA for a fix, but a set of instructions to revert to the last known good build that worked for me. YMMV.

As far as I know, the last known good version of MESA available on the Ubuntu servers is version 20.2.6-0ubuntu0.20.04.1

I didn't find an easy way to get the deb files via script, but the page

https://launchpad.net/ubuntu/+source/me ... d/20708104

lists all the binary packages produced by Mesa3d.

Clicking on each in turn, you can see and follow the link to download the corresponding .deb file.

Store all of them (or at least in my case those listed below), into, for example, /usr/local/localdebs/

(I ran the following in the VM with SW rendering to ensure packages weren't in use).

Add the local store to your apt sources:

# cd /usr/local/localdebs/ && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

# echo 'deb [trusted=yes] file:/usr/local/localdebs ./' > /etc/apt/sources.list.d/local.list

# apt-get update

# v=20.2.6-0ubuntu0.20.04.1
# apt install libglapi-mesa=${v} libd3dadapter9-mesa=${v} libegl-mesa0=${v} libegl1-mesa=${v} libg1=${v} \
libgl1-mesa-dev=${v} libgl1-mesa-dri=${v} libgl1-mesa-glx=${v} libglapi-mesa=${v} libgles2-mesa=${v} \
libglx-mesa0=${v} libosmesa6=${v} libxatracker2=${v} mesa-opencl-icd=${v} mesa-vdpau-drivers=${v} \
mesa-vulkan-drivers=${v}

I think those need to be all in one line to ensure cross-compatibility.
Now mark each of these as held, so as to aviod updates. Of course, this will mean you are blind to any fixes that may appear in future:

# for p in `apt list --all-versions | grep installed,upgradable | awk -F/ '/20.2.6/ {print $1}'`; do \
apt-mark hold ${p}; done

At this point I powered off the VM, set the acceleration back on in the VirtualBox and rebooted.

All good so far for me.

This will work also in Mint 20.1, which is also susceptible to the update to the later Mesa3d package, as they share the same Ubuntu basis (focal).

I imagine it will also work for vanilla Ubuntu systems, which I think I've now seen are suffering the same.

If you wish to try a newer version, you can run apt-mark unhold on each of them.
Thanks. This worked for me. I was too lazy to go and find the packages. My list was different:

libegl-mesa0
libgbm1
libgl1-mesa-dri
libgl1-mesa-glx
libglapi-mesa
libglx-mesa0
libxatracker2
mesa-va-drivers
mesa-vdpau-drivers
mesa-vulkan-drivers

BTW, after locking the packages, the Update Manager was still showing a "mesa" update which I told it to ignore.
Alex B
Level 1
Level 1
Posts: 16
Joined: Fri Aug 20, 2021 10:55 am

Re: 3D acceleration Virtualbox no longer working

Post by Alex B »

daveysprockett wrote: Mon Aug 23, 2021 3:16 pm No ETA for a fix, but a set of instructions to revert to the last known good build that worked for me. ...
Thanks. Here is my version of the procedure:

Downloaded the following 9 files (only these are installed in this Mint Cinnamon instance).

libegl-mesa0_20.2.6-0ubuntu0.20.04.1_amd64.deb
libgbm1_20.2.6-0ubuntu0.20.04.1_amd64.deb
libgl1-mesa-dri_20.2.6-0ubuntu0.20.04.1_amd64.deb
libglapi-mesa_20.2.6-0ubuntu0.20.04.1_amd64.deb
libglx-mesa0_20.2.6-0ubuntu0.20.04.1_amd64.deb
libxatracker2_20.2.6-0ubuntu0.20.04.1_amd64.deb
mesa-va-drivers_20.2.6-0ubuntu0.20.04.1_amd64.deb
mesa-vdpau-drivers_20.2.6-0ubuntu0.20.04.1_amd64.deb
mesa-vulkan-drivers_20.2.6-0ubuntu0.20.04.1_amd64.deb

then in Nemo:
---------------------------------
opened /usr/local/ as root

created /usr/local/localdebs

copied the downloaded deb files there
---------------------------------

then in Terminal:
---------------------------------
sudo su

cd /usr/local/localdebs/ && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

echo 'deb [trusted=yes] file:/usr/local/localdebs ./' > /etc/apt/sources.list.d/local.list

apt-get update

apt install libegl-mesa0=20.2.6-0ubuntu0.20.04.1 libgbm1=20.2.6-0ubuntu0.20.04.1 libgl1-mesa-dri=20.2.6-0ubuntu0.20.04.1 libglapi-mesa=20.2.6-0ubuntu0.20.04.1 libglx-mesa0=20.2.6-0ubuntu0.20.04.1 libxatracker2=20.2.6-0ubuntu0.20.04.1 mesa-va-drivers=20.2.6-0ubuntu0.20.04.1 mesa-vdpau-drivers=20.2.6-0ubuntu0.20.04.1 mesa-vulkan-drivers=20.2.6-0ubuntu0.20.04.1

exit
---------------------------------


The problem is now fixed. I can use 3D (machine settings on the host) & Cinnamon HW accelaration (on the guest) again.

rockadile wrote: Tue Aug 24, 2021 1:55 pm ... BTW, after locking the packages, the Update Manager was still showing a "mesa" update which I told it to ignore.
I tried to lock the version in Synaptic, but that too was ineffective in Update Manager. The Mesa update to v 21.0.3 is still displayed. Perhaps this a good thing because it reminds to check if a later update is supposed to fix the problem. I never blindly apply updates, so I am not going to accidently update the Mesa files.


I attached a screenshot for those who have not experienced the problem. This is what is displayed on the guest after logging in and clicking the place where the menu button is supposed to be.

Image

Apparently color information is missing and everything is displayed as white except the dark backgrounds of the menu and the panel. If a correct place is clicked the icon that is supposed to be there still works, but whatever it opens, that too is invisible.

Edit: Fixed a couple of typos.
Last edited by Alex B on Wed Aug 25, 2021 10:06 pm, edited 2 times in total.
Alex B
Level 1
Level 1
Posts: 16
Joined: Fri Aug 20, 2021 10:55 am

Re: 3D acceleration Virtualbox no longer working

Post by Alex B »

rockadile wrote: Tue Aug 24, 2021 1:55 pm ... the Update Manager was still showing a "mesa" update which I told it to ignore.
Just noticed that this is indeed possible in Update Manager. The options "ignore the current update for this package" and "ignore all future updates for this package" are available by right-clicking.
Alex B
Level 1
Level 1
Posts: 16
Joined: Fri Aug 20, 2021 10:55 am

Re: 3D acceleration Virtualbox no longer working

Post by Alex B »

For comparison, here is a screenshot after downgrading the Mesa files. Once again, I logged in, opened the Cinnamon menu and took a screenshot on the host. Notice how the Mint-Y-Aqua accent color is visible in both screenshots. Maybe this comparison can help if someone is trying to fix the problem.

Image
Nite01
Level 1
Level 1
Posts: 10
Joined: Sun Jul 07, 2019 5:57 pm

Re: 3D acceleration Virtualbox no longer working

Post by Nite01 »

daveysprockett wrote: Mon Aug 23, 2021 3:16 pm Add the local store to your apt sources:

# cd /usr/local/localdebs/ && dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
Noob here. When I try this command I get :

Code: Select all

bash: Packages.gz: Permission denied
I tried adding sudo at beginning, but nothing changes.

EDIT - It worked using

Code: Select all

sudo su
before entering the command.

Next problem :
daveysprockett wrote: Mon Aug 23, 2021 3:16 pm # v=20.2.6-0ubuntu0.20.04.1
# apt install libglapi-mesa=${v} libd3dadapter9-mesa=${v} libegl-mesa0=${v} libegl1-mesa=${v} libg1=${v} \
libgl1-mesa-dev=${v} libgl1-mesa-dri=${v} libgl1-mesa-glx=${v} libglapi-mesa=${v} libgles2-mesa=${v} \
libglx-mesa0=${v} libosmesa6=${v} libxatracker2=${v} mesa-opencl-icd=${v} mesa-vdpau-drivers=${v} \
mesa-vulkan-drivers=${v}
This gives me an error saying "cannot find libgl".

I tried instead the command posted by Alex B, and that worked. The problem is I don't know if that covered everything.

Code: Select all

apt install libegl-mesa0=20.2.6-0ubuntu0.20.04.1 libgbm1=20.2.6-0ubuntu0.20.04.1 libgl1-mesa-dri=20.2.6-0ubuntu0.20.04.1 libglapi-mesa=20.2.6-0ubuntu0.20.04.1 libglx-mesa0=20.2.6-0ubuntu0.20.04.1 libxatracker2=20.2.6-0ubuntu0.20.04.1 mesa-va-drivers=20.2.6-0ubuntu0.20.04.1 mesa-vdpau-drivers=20.2.6-0ubuntu0.20.04.1 mesa-vulkan-drivers=20.2.6-0ubuntu0.20.04.1
Anyways, now the desktop seems to work correctly !
Thanks everyone !
dgregor
Level 1
Level 1
Posts: 1
Joined: Thu Sep 02, 2021 4:42 am

Re: 3D acceleration Virtualbox no longer working

Post by dgregor »

Could you check the recent test build of VirtualBox as described here https://www.virtualbox.org/ticket/20513#comment:4
bbradley
Level 1
Level 1
Posts: 1
Joined: Sat Sep 04, 2021 11:51 am

Re: 3D acceleration Virtualbox no longer working

Post by bbradley »

I can confirm that the latest test build of Virtualbox works. It also confirms that the cause of the issue is outdated coding in Virtualbox. The following excerpt from the VB thread goes into more detail:
It's an issue with incorrect translation of texture formats (used by the compositing window manager) in Mesa 21. Guess no one tested the latest code with vbox (which implements VMSVGA/3D at VGPU9 feature level currently which is where the buggy code is - I guess other implementations are already at VGPU10 level which uses pretty much a completely different code path).

We can't truly fix this but the latest test builds have a workaround which make a reasonable guess from the resulting "unknown" value.
Alex B
Level 1
Level 1
Posts: 16
Joined: Fri Aug 20, 2021 10:55 am

Re: 3D acceleration Virtualbox no longer working

Post by Alex B »

dgregor wrote: Thu Sep 02, 2021 5:14 amCould you check the recent test build of VirtualBox as described here https://www.virtualbox.org/ticket/20513#comment:4
Finally had some time to test this. I didn't want to touch my Windows host machine, which is now working fine with the old Mesa version, but I installed the test build v. 6.1.27r146688 on a different Linux host (Mint Cinnamon v. 20.2 host/VMSVGA 3D/Mint Cinnamon v. 20.2 guest/Mesa v. 21.0.3).

I did some quick testing and apparently the display is working normally. I didn't notice anything missing or drawn incorrectly.

I have not run any kind of extensive torture or speed tests. The hardware and host operating systems are different so performance comparisons would be useless anyway.
delanef
Level 1
Level 1
Posts: 6
Joined: Wed Aug 04, 2021 10:58 am

Re: 3D acceleration Virtualbox no longer working

Post by delanef »

Alex B wrote: Sat Sep 04, 2021 6:25 pm
dgregor wrote: Thu Sep 02, 2021 5:14 amCould you check the recent test build of VirtualBox as described here https://www.virtualbox.org/ticket/20513#comment:4
Finally had some time to test this. I didn't want to touch my Windows host machine, which is now working fine with the old Mesa version, but I installed the test build v. 6.1.27r146688 on a different Linux host (Mint Cinnamon v. 20.2 host/VMSVGA 3D/Mint Cinnamon v. 20.2 guest/Mesa v. 21.0.3).

I did some quick testing and apparently the display is working normally. I didn't notice anything missing or drawn incorrectly.

I have not run any kind of extensive torture or speed tests. The hardware and host operating systems are different so performance comparisons would be useless anyway.
Confirmed. Installed VBox 6.1.27 test package on lab machine and all seems to be working correctly. Don't forget to enable 3D excel on the display settings if it has be deselected to avoid the rendering issue.
KagariY
Level 1
Level 1
Posts: 1
Joined: Tue Sep 14, 2021 8:18 am

Re: 3D acceleration Virtualbox no longer working

Post by KagariY »

I can confirm by not installing the mesa package update the white screen doesn't happen after reboot
rockadile
Level 1
Level 1
Posts: 45
Joined: Mon Jun 24, 2013 3:15 pm

Re: 3D acceleration Virtualbox no longer working

Post by rockadile »

Unfortunately, the VirtualBox test build doesn't work with UEFI Secure Boot.
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

Re: 3D acceleration Virtualbox no longer working

Post by rattkjelke »

Today there was another mesa update.
It did not fix the problem, at least on my Cinnamon 5.11 kernel VM.
delanef
Level 1
Level 1
Posts: 6
Joined: Wed Aug 04, 2021 10:58 am

Re: 3D acceleration Virtualbox no longer working

Post by delanef »

New mesa package(21.0.3-0ubuntu0.3~20.04.1) did not resolve this issue. The only solutions, still: don't update mesa, use VB 6.1.27(dev), or disable 3D acceleration in VB config.
raymondjpg
Level 1
Level 1
Posts: 7
Joined: Fri Jan 04, 2013 9:43 pm

Re: 3D acceleration Virtualbox no longer working

Post by raymondjpg »

Stalemate.

Virtualbox sees this as a "...bug... actually in the Mesa 21 code which came to your Mint install with an update."

There is no indication that Mint is doing anything about it.

SNAFU.
jerson
Level 3
Level 3
Posts: 181
Joined: Thu Dec 08, 2016 1:19 pm
Location: Bombay, India

Re: 3D acceleration Virtualbox no longer working

Post by jerson »

My setup that works with some workarounds.

VB 5.2.42_Ubuntu r137960
LM 19.3 Tricia running Cinnamon Software rendering

In this config, VB does allow Win guest to have 3D acceleration. Once loaded, I do a CTRL+ALT+L to reset cinnamon (also SUPER+L+reset)

After doing the reset cinnamon, I have 3D working + cinnamon seems to render normally (not software) giving speed and low CPU usage ; I could be wrong on the render part as I'm no expert.

No other config either MATE or cinnamon default works. This is the only way I can start up 3d for my guest.
Regards
Jerson
User avatar
Peter Linu
Level 7
Level 7
Posts: 1877
Joined: Sun Nov 11, 2018 8:24 pm
Location: Sinny, Straya

Re: 3D acceleration Virtualbox no longer working

Post by Peter Linu »

I only installed Win10pro on a 2nd computer on the weekend. I had the same problem.
The fix for me was to turn off 3D acceleration. It's a Win10 problem because my other computer runs Win7 WITH 3D acceleration.
It's not worth the frustration in trying to make it work. Leave it alone and get on with the rest of your life!
Cinnamon 21.3 Thinkcentre M920Q + 2 Thinkpad T440p (modded) + Lenovo Y50-70 (all have VBs) + 2 PC NAS drives w XFCE21.2 + Q4OS-32bit on ASUS Atom (2011) + Asus UX305F-64bit
User avatar
rattkjelke
Level 3
Level 3
Posts: 196
Joined: Wed Jul 13, 2011 5:55 pm
Location: USA

Re: 3D acceleration Virtualbox no longer working

Post by rattkjelke »

Today VirtualBox 6.1.28 was released.
I downloaded it from their web site and installed it and it fixed the Cinnamon white screen 3d acceleration problem on my system.

https://www.virtualbox.org/wiki/Changelog
VirtualBox 6.1.28 (released October 19 2021)
VMSVGA: Fixed display corruption on Linux Mint (bug #20513)
Locked

Return to “Virtual Machines”