Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Discussions about using Linux guests in VirtualBox.
Post Reply
SantiagoF
Posts: 5
Joined: 21. Feb 2021, 02:27

Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by SantiagoF »

Hello all,

New to the forum, and looking for some guidance here.

I've been running Ubuntu 20.04 LTS for several months now - mostly without problems - as a guest on Virtualbox, with Windows 10 as the host OS.

Until not long ago, Virtualbox was 6.0 (possibly 6.0.22? can't recall) and recently I upgraded to 6.1.18 r142142. I regularly run apt update/upgrade on my Ubuntu VM and at a certain point, after one of these upgrades that affected the kernel, the 6.0 Guest Additions seemed to be "insufficient" and I started having trouble with my VM using the full screen size on my laptop (1920x1080 - the option was not even there to set manually). So I upgraded to Virtualbox 6.1, installed the 6.1 Guest Additions, and problem solved.

Except that seems to have introduced a new problem: now every time I start my VM, it boots, I get the login screen, I enter credentials... and end up with a blank screen (screen detection problems again?). Then I go to Machine --> Reset on the Virtualbox menu, it boots again, I get the login screen... and everything starts up normally (i.e. I access my GNOME desktop and everything is ok). This is consistent, it happens every time, and it's the only way I have found to access my VM once I started experiencing this problem.

Any suggestions on what this might be, and where I would start looking? Any pointers?

Your help will be much appreciated!

Thanks,
Santiago
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by scottgus1 »

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log and the hardening log next to it, zip them, and post the zip file, using the forum's Upload Attachment tab.
SantiagoF
Posts: 5
Joined: 21. Feb 2021, 02:27

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by SantiagoF »

Scott, thanks so much for assisting.

I've followed your instructions, and am uploading the zip file with both logs. There was no way for me to shut down the VM from within the OS, as it was just one black screen, so I closed the Virtualbox window for the VM and selected the Power Off option.

Hope the logs will allow to pinpoint this!

Regards,
Santiago
Attachments
Ubuntu 20.04 LTS Desktop-2021-02-22-20-26-46 - VBox and VBoxHardening logs.zip
VBox and VBoxHardening logs
(62.47 KiB) Downloaded 135 times
facboy
Posts: 28
Joined: 19. Jan 2016, 09:35

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by facboy »

is resuming from a save-state not supported (or a known issue)?

i have this problem with Centos, but only after resuming from a save-state, on clean boot it works fine.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by scottgus1 »

"Saved-state" in and of itself is still supported and works, like all computer programs, most of the time. Saved-state is directly tied into the CPU state and memory in the host PC and may have issues restarting on occasion if the host changes sufficiently, perhaps in CPU or memory. Also, save-stated VMs have gone bad for unknown reasons and have to discard the saved state to restart.

Saved State is best used when the host must shut down before the VM can (perhaps from power issues), or when the VM is stored on slow media, like an old hard drive. In many cases a regular shut down and reboot might be faster than a saved state turn-off-and-back-on, especially when the VM is stored on an SSD.

Logs from saved-state startup are missing some important diagnostic data, so we want logs from full shut down and restart rather than saved state for most troubleshooting situations.
SantiagoF
Posts: 5
Joined: 21. Feb 2021, 02:27

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by SantiagoF »

Hi Scott, and community... any chance of taking a peek at the uploaded logs, and see if you spot something that may be off there?
I would really appreciate it!
multiOS
Volunteer
Posts: 800
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by multiOS »

My inexpert eye suggests the underlying problem is probably this:
00:00:06.001112 CPUM: Logical host processors: 4 present, 4 max, 4 online, online mask: 000000000000000f
00:00:06.001113 CPUM: Physical host cores: 2
Windows 10 really needs a dual-core processor (2 physical cores) and, IME Ubuntu since version 19 also needs a dual-core processor (2 physical cores). Your Laptop can't provide that level of resource. You can try allocating 2 CPU's to the Ubuntu VM, but that is likely to stress the host if you are running any host software other than VirtualBox; and especially during Windows update or when the Windows carries out its other background maintenance processes.
SantiagoF
Posts: 5
Joined: 21. Feb 2021, 02:27

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by SantiagoF »

Thanks for pitching in, multiOS.

I wasn't expecting this could be a resources issue, mainly as this has been working on for several months now (8-10 maybe) without an issue, and this only appeared after upgrading Virtualbox 6.0 -> 6.1, or maybe after an "apt upgrade" shortly after the VB upgrade. But I don't know enough to challenge your theory. ;-)

Hopefully some other thing - one that I can fix more easily - can be spotted (?).
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by scottgus1 »

Sorry, Santiago, I forgot about this one. FWIW I have a 2-core hyperthreaded laptop and it runs 10 on the laptop and in a VM. Slow, but it works.

RAM is overcommitted on this run:
00:00:04.327834 Host RAM: 16222MB (15.8GB) total, 6973MB (6.8GB) available
00:00:04.636411 RamSize <integer> = 0x0000000200000000 (8 589 934 592, 8 192 MB, 8.0 GB)
But this might not be the problem. I don't see anything wrong with the Virtualbox side of things in this log. Could be a problem within the VM's OS itself. See if there is any advice in Ubuntu's help channels for troubleshooting black screen after the username & password. Web-searching "ubuntu black screen after login" yields interesting results.
SantiagoF
Posts: 5
Joined: 21. Feb 2021, 02:27

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by SantiagoF »

Thank you, Scott. I recently bumped up the VM's memory from 4Gb to 8Gb. It behaved the same with both, so yes, I'm not sure that's the cause, either.

I'll check on the Ubuntu side, as you suggest. And maybe just as this annoying problem came, it will disappear with some future upgrade!

Thanks for taking the time.
Zom-B
Posts: 2
Joined: 21. Oct 2020, 11:28

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by Zom-B »

I have've had the same problem with an Ubuntu host and Mint guest for the better part of this year (I don't remember when it started). I have 4 physical cores so the CPU theory can't be correct.
I had 4 cores configured for the guest, but after changing it to two it still happens.
It happens no matter how I shut down the guest (as long as it isn't "save state"),
 Edit:  even rebooting from within the guest.
Log of Startup→black→reset→ok attached.

VirtualBOX 6.1
Extension pack 6.1.18r142142 (internal updater says there's a new version, but the download keeps failing) 
Attachments
VBox.log.zip
(24.9 KiB) Downloaded 25 times
RobWilkens3
Posts: 1
Joined: 25. Apr 2022, 13:08

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by RobWilkens3 »

I was experiencing this problem, the solution for me appeared to be:
(1) Shut down (don't save state)
(2) Go into VM settings
(3) Go into Display settings
(4) Raise the video memory (I raised it to 128MB)

After I restarted, this problem appeared to go away.
wangJon
Posts: 1
Joined: 28. Apr 2022, 18:28

Re: Ubuntu 20.04 gives blank screen after login - VM reset needed to solve it

Post by wangJon »

RobWilkens3 wrote:I was experiencing this problem, the solution for me appeared to be:
(1) Shut down (don't save state)
(2) Go into VM settings
(3) Go into Display settings
(4) Raise the video memory (I raised it to 128MB)

After I restarted, this problem appeared to go away.
OK so this is my first time got right solution in this kind of such an ugly and old fashioned forum, not from stackoverflow etc
this solution solved my problem
Post Reply