Here is my environment:
Host:
Windows 10 2004 "Version 10.0.19041 Build 19041"
Processor Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2208 Mhz, 6 Core(s), 12 Logical Processor(s)
Installed Physical Memory (RAM) 16.0 GB
No dedicated GPU
Vagrant 2.2.16 (latest)
* vagrant-persistent-storage (0.0.49, global) (latest)
* vagrant-vbguest (0.29.0, global) (latest)
Virtualbox 6.1.20
Guest:
Ubuntu 20.04 LTS with default ubuntu-desktop package
Guest Additions 6.1.20
VMSVGA 3D acceleration enabled
Any other details in joined Vagrantfile
Symptoms:
With VMSVGA, I can start and see the desktop environment. glxinfo shows direct rendering true. But the moment I resize, nothing change, it freezes. I can only see the mouse cursor moving but no click possible. I think this is related to ticket 19496.
Because I cannot add the Vagrantfile (form says "The extension is not allowed."), here is the content:
Code: Select all
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.box_version = "20210503.0.0"
config.vm.box_check_update = false
config.vm.provision "bootstrap", type: "shell" do |s|
s.inline= <<-'SHELL'
set -x -e
cd /root
aptInstall() {
echo "$(date --iso-8601=s) Installing " "$@" | sudo tee -a /var/log/vagrant_apt.log
( time sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt install "$@" -y 2>&1 | sudo tee -a /var/log/vagrant_apt.log ) >/dev/null
}
installDesktop() {
if ! ( dpkg -l ubuntu-desktop ) &>/dev/null ; then
sudo apt update -y
# Doing install with no install recommends leads to black screen at start with a flickering cursor.
#aptInstall --no-install-recommends ubuntu-desktop
aptInstall ubuntu-desktop
#aptInstall lubuntu-desktop
# Warning: enable autologin leads to black screen in Virtualbox.
#if ! grep --regex "^AutomaticLogin" /etc/gdm3/custom.conf >/dev/null ; then
#sudo sed /etc/gdm3/custom.conf -i -e 's,\[daemon\],\[daemon\]\nAutomaticLoginEnable=True\nAutomaticLogin=vagrant,g'
#fi
if ! grep --regex "^WaylandEnable" /etc/gdm3/custom.conf >/dev/null ; then
sudo sed /etc/gdm3/custom.conf -i -e 's,\[daemon\],\[daemon\]\nWaylandEnable=false,g'
# See ticket 19496#comment:47
echo 'export XDG_SESSION_TYPE="x11"'>/etc/profile.d/50-xdgx11.sh
fi
fi
# For terminal AZERTY.
sudo localectl --no-convert set-x11-keymap fr
sudo loadkeys fr
}
fixMultipathd() {
if ! grep VBOX /etc/multipath.conf >/dev/null ; then
cat <<EOF | sudo tee -a /etc/multipath.conf
blacklist {
device {
vendor "VBOX"
product "HARDDISK"
}
}
EOF
sudo systemctl restart multipathd.service
fi
}
fixMultipathd
installDesktop
sudo usermod -a -G sudo,vboxsf vagrant
sudo apt-get autoremove -y
echo "[INFO] $0 $(id -nu): End of bootstrap shell $(date --iso-8601=s)."
if test -f /var/run/reboot-required ; then
echo "Restart needed: /var/run/reboot-required exist."
sudo cat /var/run/reboot-required
sudo reboot
fi
SHELL
end
config.vbguest.auto_update = true
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 4096
v.cpus = 4
# Set the video memory to 128Mb, seems to be necessary to avoid black screen.
v.customize ["modifyvm", :id, "--vram", "128"]
v.customize ["modifyvm", :id, "--graphicscontroller", "vmsvga"]
v.customize ["modifyvm", :id, "--accelerate3d", "on"]
end
end