Virtual box guest goes to black screen

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.
Locked
User avatar
LPH_[retired]
Level 2
Level 2
Posts: 80
Joined: Wed Dec 16, 2020 12:06 pm
Location: 3rd Rock
Contact:

Virtual box guest goes to black screen

Post by LPH_[retired] »

Host Machine runs Linux Mint 20.3 Cinnamon edition, Patched to current

Code: Select all

System:
  Kernel: 5.15.0-46-generic x86_64 bits: 64 Desktop: Cinnamon 5.2.7 
  Distro: Linux Mint 20.3 Una 
Machine:
  Type: Desktop System: Gigabyte product: B450 AORUS M v: N/A 
  serial: <filter> 
  Mobo: Gigabyte model: B450 AORUS M serial: <filter> 
  BIOS: American Megatrends LLC. v: F63b date: 05/11/2022 
CPU:
  Topology: 6-Core model: AMD Ryzen 5 5600G with Radeon Graphics bits: 64 
  type: MT MCP L2 cache: 3072 KiB 
  Speed: 1298 MHz min/max: 400/4464 MHz Core speeds (MHz): 1: 839 2: 1610 
  3: 737 4: 725 5: 725 6: 871 7: 859 8: 956 9: 801 10: 1014 11: 752 12: 753 
Graphics:
  Device-1: AMD driver: amdgpu v: kernel 
  Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: AMD RENOIR (DRM 3.42.0 5.15.0-46-generic LLVM 12.0.0) 
  v: 4.6 Mesa 21.2.6 
Audio:
  Device-1: AMD driver: snd_hda_intel 
  Device-2: AMD Family 17h HD Audio driver: snd_hda_intel 
  Sound Server: ALSA v: k5.15.0-46-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  driver: r8169 
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  Device-2: Broadcom and subsidiaries BCM4352 802.11ac Wireless Network 
  Adapter 
  driver: wl 
  IF: wlp5s0 state: down mac: <filter> 
  IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:
  Local Storage: total: 12.74 TiB used: 5.59 TiB (43.9%) 
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WD Green SN350 1TB 
  size: 931.51 GiB 
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO 500GB 
  size: 465.76 GiB 
  ID-3: /dev/sda vendor: Seagate model: ST6000VN0033-2EE110 size: 5.46 TiB 
  ID-4: /dev/sdb vendor: HGST (Hitachi) model: HDN724040ALE640 
  size: 3.64 TiB 
  ID-5: /dev/sdc vendor: HGST (Hitachi) model: HDN724030ALE640 
  size: 2.73 TiB 
Partition:
  ID-1: / size: 182.35 GiB used: 53.00 GiB (29.1%) fs: ext4 
  dev: /dev/nvme1n1p2 
  ID-2: /home size: 273.95 GiB used: 140.30 GiB (51.2%) fs: ext4 
  dev: /dev/nvme1n1p3 
  ID-3: swap-1 size: 30.0 MiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme1n1p1 
Sensors:
  System Temperatures: cpu: 34.0 C mobo: 27.0 C gpu: amdgpu temp: 33 C 
  Fan Speeds (RPM): cpu: 0 fan-1: 0 fan-3: 0 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/bashtop-monitor-bashtop-focal.list 
  1: deb http://ppa.launchpad.net/bashtop-monitor/bashtop/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
  1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/christian-boxdoerfer-fsearch-stable-focal.list 
  1: deb http://ppa.launchpad.net/christian-boxdoerfer/fsearch-stable/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/giuspen-ppa-focal.list 
  1: deb http://ppa.launchpad.net/giuspen/ppa/ubuntu focal main
  2: deb-src http://ppa.launchpad.net/giuspen/ppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/jcfp-nobetas-focal.list 
  1: deb http://ppa.launchpad.net/jcfp/nobetas/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/jcfp-sab-addons-focal.list 
  1: deb http://ppa.launchpad.net/jcfp/sab-addons/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/jtaylor-keepass-focal.list 
  1: deb http://ppa.launchpad.net/jtaylor/keepass/ubuntu focal main
  2: deb-src http://ppa.launchpad.net/jtaylor/keepass/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com una main upstream import backport
  2: deb http://mirror.lstn.net/ubuntu focal main restricted universe multiverse
  3: deb http://mirror.lstn.net/ubuntu focal-updates main restricted universe multiverse
  4: deb http://mirror.lstn.net/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  No active apt repos in: /etc/apt/sources.list.d/plexmediaserver.list 
  Active apt repos in: /etc/apt/sources.list.d/rvm-smplayer-focal.list 
  1: deb http://ppa.launchpad.net/rvm/smplayer/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/scootersoftware.list 
  1: deb https://www.scootersoftware.com/ bcompare4 non-free
  No active apt repos in: /etc/apt/sources.list.d/unit193-encryption-focal.list 
  Active apt repos in: /etc/apt/sources.list.d/virtualbox.list 
  1: deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian focal contrib
Info:
  Processes: 375 Uptime: 3h 31m Memory: 30.73 GiB used: 6.05 GiB (19.7%) 
  Shell: bash inxi: 3.0.38 
VirtualBox 6.1.36 deb from Oracles site installed. Matching release for Guest additions
Guest allocated
12 gig memory
4 cpus
PAE/NX and Nested VT-x/AMD-V both enabled
display allocated 128meg and controller set to VMSVGA
Strage allocated 30 gig
audio defaults
Network Bridged
default settins for the rest except shared folders.

guest inxi

Code: Select all

System:
  Kernel: 5.15.0-46-generic x86_64 bits: 64 Desktop: Cinnamon 5.4.9
    Distro: Linux Mint 21 Vanessa
Machine:
  Type: Virtualbox System: innotek GmbH product: VirtualBox v: 1.2
    serial: <superuser required>
  Mobo: Oracle model: VirtualBox v: 1.2 serial: <superuser required>
    BIOS: innotek GmbH v: VirtualBox date: 12/01/2006
CPU:
  Info: quad core model: AMD Ryzen 5 5600G with Radeon Graphics bits: 64
    type: MCP cache: L2: 2 MiB
  Speed (MHz): avg: 3893 min/max: N/A cores: 1: 3893 2: 3893 3: 3893
    4: 3893
Graphics:
  Device-1: VMware SVGA II Adapter driver: vmwgfx v: 2.19.0.0
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: vmware
    unloaded: fbdev,modesetting,vesa gpu: vmwgfx resolution: 1920x1080~60Hz
  OpenGL: renderer: SVGA3D; build: RELEASE; LLVM; v: 2.1 Mesa 22.0.5
Audio:
  Device-1: Intel 82801AA AC97 Audio driver: snd_intel8x0
  Sound Server-1: ALSA v: k5.15.0-46-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel 82540EM Gigabit Ethernet driver: e1000
  IF: enp0s3 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge
    driver: piix4_smbus
Drives:
  Local Storage: total: 32 GiB used: 164.36 GiB (513.6%)
  ID-1: /dev/sda vendor: VirtualBox model: VBOX HARDDISK size: 30 GiB
  ID-2: /dev/sdb vendor: VirtualBox model: VBOX HARDDISK size: 2 GiB
Partition:
  ID-1: / size: 27.88 GiB used: 10.07 GiB (36.1%) fs: ext4 dev: /dev/sda5
  ID-2: /boot/efi size: 512 MiB used: 4 KiB (0.0%) fs: vfat dev: /dev/sda3
Swap:
  ID-1: swap-1 type: file size: 1.32 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
  Message: No sensor data found. Is lm-sensors configured?
Repos:
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http://packages.linuxmint.com vanessa main upstream import backport
    2: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
  Processes: 213 Uptime: 11m Memory: 11.69 GiB used: 970.7 MiB (8.1%)
  Shell: Bash inxi: 3.3.13
The guest was running LinuxMint 20.3 Cinnamon edition prior to doing the upgrade to 21.0 as per the upgrade blog. Upgrade seemed to go as expected. This was primarily a test run for updating a physical machine to see if any issues would present themselves.

The issue is when I start the guest it boots to the desktop BUT there is no panel and no network connection. Within 5-8 seconds (didn't time it)
the desktop goes completely black. The session is unresponsive to anything other than a mouse right click where I can select Terminal.
If I enter 'shutdown -r 0' the session restarts and loads fine and runs fine (as far as I've tested). I'm not seeing errors in the VB logs for the session.

I should mention other guest are functioning fine. As did this guest prior to the 21.0 upgrade.

I'm at the point where I'll just destroy the guest and do a clean install of 21.0. However that's not the approach I want to take with the physical machine.

If anyone has any ideas on what action I might take to 'fix' the dual booting of the guest to get a working session, chime in.

Thanks
Last edited by LockBot on Mon Feb 13, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Alcohol is gods apology for making us self aware.
James May
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Virtual box guest goes to black screen

Post by Cosmo. »

I use a virtual LM 21 freshly installed, not an upgrade. This works as it should.

As a first step I would boot the vm with the iso-image for LM 21 to se, if this works well.

If I understand your post right, than you do not have a Timeshift snapshot and also no VB snapshot. Otherwise it would be easy to revert.
User avatar
LPH_[retired]
Level 2
Level 2
Posts: 80
Joined: Wed Dec 16, 2020 12:06 pm
Location: 3rd Rock
Contact:

Re: Virtual box guest goes to black screen

Post by LPH_[retired] »

Hi Cosmo

Thank you for responding. :)

I created a second disk for the guest so I could run Timeshift. But I didn't do a VB Snapshot. There's nothing of consequence on the guest so restoring isn't a goal.
Primarily testing the upgrade process.

I booted using the ISO and it runs fine. I went ahead and installed 21.0 over the top of the existing guest. It exhibits the same behavior (2 boots to working desktop)

An in-elegant solution as follows...

When the second boot of the guest behaves correctly and I can use the Keyboard app, I created a custom keyboard shortcut to restart Cinnamon. So when the initial guest boot fails I use the custom shortcut and Cinnamon starts correctly. So only one boot for now.

Bottom line, I don't think the is issue is with the upgrade process or 21.0 but rather a VirtualBox issue. I can't prove it though.
Alcohol is gods apology for making us self aware.
James May
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Virtual box guest goes to black screen

Post by Cosmo. »

LPH_[retired] wrote: Sat Aug 13, 2022 4:13 pm Bottom line, I don't think the is issue is with the upgrade process or 21.0 but rather a VirtualBox issue. I can't prove it though.
In this case it should be reproducible. I created my virtual LM 21 machine 4 weeks ago and I launch it daily. I should have noticed something.
User avatar
LPH_[retired]
Level 2
Level 2
Posts: 80
Joined: Wed Dec 16, 2020 12:06 pm
Location: 3rd Rock
Contact:

Re: Virtual box guest goes to black screen

Post by LPH_[retired] »

I've done some more tinkering and it appears to be the guest display setting causing the issue.

I had guest Graphics Controller setting set at VMSVGA with Enable 3D Accelleration checked.

Unchecking 3D Acceleration changes nothing. Cinnamon still requires a restart.

When I change guest Graphics Controller VMSVGA to either VBoxVGA or VBoxSVGA and leave 3D Acceleration unchecked the guest functions ok.

Edit additional info

Generally I start my vms in Full-Screen Mode (Host-F) rather than Seamless or Scaled. The problem occurs when booting in Full-Screen Mode. If i change view mode to Scaled and shutdown and then reboot the problem does not occur. Going to Full-Screen mode after the desktop and Cinnamon come up, everything works as expected. As long as I remove to revert to Scaled Mode before shutdown the problem will not occur.
Definitely a VirtualBox issue.
Alcohol is gods apology for making us self aware.
James May
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Virtual box guest goes to black screen

Post by Cosmo. »

VBoxVGA does not support 3D acceleration, the other 2 do, but VBoxSVGA for Windows and VMSSVGA for LInux. Your description would lead to the assumption, that 3d acceleration gives the problem, but like you I have on a 20.3 host the 21 guest (and others) running without that problem.

Create a new VM with LM 21 to check.
User avatar
LPH_[retired]
Level 2
Level 2
Posts: 80
Joined: Wed Dec 16, 2020 12:06 pm
Location: 3rd Rock
Contact:

Re: Virtual box guest goes to black screen

Post by LPH_[retired] »

I created a brand new Linux Mint 21 guest on Mint 20.3 host.
Install was successful.

Same issue. Using VMSVGA with or without 3D Acceleration enabled. Starting the guest from a stopped state in Full screen mode causes Cinnamon to not load. If
I reboot the guest in that state Cinnamon will load regardless of the screen mode.

Starting the guest from a stopped state in Scaled Mode causes Cinnamon to load properly.

At least I know what the problem/solution is
Alcohol is gods apology for making us self aware.
James May
lmvm
Level 1
Level 1
Posts: 1
Joined: Thu Aug 25, 2022 8:48 am

Re: Virtual box guest goes to black screen

Post by lmvm »

I confirm the issue. Exactly the same problems with LM21 in virtualbox and LM (or even Windows) as host. Thanks for the non FullScreen trick... it works!
User avatar
bbaker6212
Level 5
Level 5
Posts: 538
Joined: Wed Aug 12, 2015 6:35 pm

Re: Virtual box guest goes to black screen

Post by bbaker6212 »

I'm running 21.1 XFCE in a Virtualbox (Version 6.1.36_Ubuntu r152435) VM
and see similar black screen after the VM is left inactive for a while and Mint goes into screen saver (logged out) mode.
The VM was not running in full screen mode and the display setting was default VMSVGA and 3D was not enabled.
No mouse or keyboard actions could refresh the display.
What debug info might be helpful here?
Linux Mint XFCE 21.1 , Windows 11, Pop!_OS 22.04 Acer Aspire 5 A515-57 (linux-probe), Core i5-1235U, 16GB RAM
Lenovo Ideapad 330S-15IKB (linux-probe), Core i5-8250U, 20GB RAM
Locked

Return to “Virtual Machines”