Debian 11 VM shows blank screen after log-in

Discussions related to using VirtualBox on Linux hosts.
Post Reply
someonepleasehelp
Posts: 4
Joined: 13. Mar 2023, 06:33

Debian 11 VM shows blank screen after log-in

Post by someonepleasehelp »

Background and description of error:
- I just set up my PC running antiX 22 as the host for Virtualbox 1 week ago.
- Then I set up a Debian 11 VM. There were no hiccups. While setting up the debian VM, I restarted it a few times and made 4 snapshots along the way during the installation.
- Last Saturday morning (11 Mar), I ran `sudo update && sudo upgrade` on my host
- On Sunday evening (12 Mar), I shut down my Debian VM to take another snapshot. But when I booted the VM and logged in to my account, the screen was blank with only the mouse pointer showing. Left- or right-clicking on the mouse did not make any difference.

What I tried:
- I entered my VM's recovery mode and logged into `root`. That was fine but I am not proficient enough to debug the issue in the VM, i.e. the blank screen after logging into my non-root account via the GUI.
- I then restored the previous working snapshot but had the same issue. I went back to restore the earliest snapshot - again same issue.
- I have an old Windows XP 64 VM that I've been using for many years. I tried restarting that and it continues to run perfectly fine, i.e. no GUI log-in issue.

What I suspect:
- The issue arose due to the host update I did on Saturday. I have this suspicion because I had restored my Debian 11 VM all the way to the earliest snapshot which had been restarted many times with no issue.
- Unfortunately, I did not make a snapshot/recovery point before upgrading my antiX host so that option is not available.


I'm lost as to what to do. I am contemplating a few solutions:
(i) Try to debug the issue <== I don't know how/where to start, any help is appreciated!
(ii) Reinstall Virtualbox
(iii) Reinstall antiX host <== This is the most time-consuming, hopefully, it will not need to come to this



Really hope someone can help! Thanks in advance!
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Debian 11 VM shows blank screen after log-in

Post by scottgus1 »

I'm fuzzy on what to do here, since restoring earlier snapshots ought to have got round the problem I suspected, namely, low disk space in the VM.

Please try to make a brand-new Debian VM, see if it can get to the desktop.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Debian 11 VM shows blank screen after log-in

Post by fth0 »

In addition to what scottgus1 suggested:

There are settings in the VM configuration file (*.vbox) that are independent of the snapshots and therefore not changed back when restoring a snapshot. Those settings are kept in the ExtraData section, and some of them influence the VM's window.

Create a 2nd Debian VM and if it works, compare the ExtraData section in the VMs' configuration files.
someonepleasehelp
Posts: 4
Joined: 13. Mar 2023, 06:33

Re: Debian 11 VM shows blank screen after log-in

Post by someonepleasehelp »

Hi scottgus1 & fth0, thanks for your suggestions. I did further testing and think the issue might be with the VBox Guest Additions and full-scale mode during the signing-in phase, but I cannot be 100% sure.

(A) Below are the steps I took:
- Like both your suggestions, I took the fresh installation of my Debian 11 VM. So that booted up fine. I then installed VBox Guest Additions (based on the link below) and XFCE. I rebooted it 3 times in non-fullscreen mode, all which went ok.
- I then shut it down to test a cold boot, but the issue (blank screen) came up again.
- At the blank screen, I clicked on `Host keys + F` to toggle out of full-screen mode and suddenly the desktop came up.
- At this point, if I switch it back to fullscreen, shut it down and cold booted it, the blank screen problem might occur (i.e. I used 'might' because there was once it cold-booted in fullscreen mode ok, but failed immediately when I tried it again).


(B) Additional information
- As I am typing this message, I just replicated the `Host keys + F` 'trick' 4 times and they all worked to resolve the blank screen issue.
- Much earlier, I reinstalled the Guest Addition for my main debian 11 VM and it had been running fine for a few hours. I now suspect it ran fine because I had booted into recovery mode, changed it to non-fullscreen mode in order to refer to the commands on the website and then rebooted.
- I spun up an old Debian 10 VM which had an old Guest Addition and that had no problem entering the desktop. But it ran at a resolution of 800x600, so I am not sure if that's indicative of anything.


(C) Versions
- Virtualbox: `VirtualBox Graphical User Interface Version 7.0.6_Debian r155176`
- Vbox Guest Addition: `v6.1.22`
- Debian 11 ISO version: `debian-11.6.0-amd64-netinst.iso`

Unfortunately, I am not certain about the versions before I did the `sudo upgrade` on Saturday or whether the upgrade changed anything. Also, I installed and upgraded using the `antiX` repo, so the versions might not be the latest.


(D) Miscellaneous
- Reference for installing VBox Guest Additions: a webpage by `itslinuxfoss` titled `virtualbox-guest-additions-debian-11`


I will keep the cloned VM around so I can perform any test needed to help fix this bug. Just let me know :)


Edit 1: Added the Debian ISO version I used for my installation a week ago to aid in reproducibility
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Debian 11 VM shows blank screen after log-in

Post by scottgus1 »

someonepleasehelp wrote:I then installed VBox Guest Additions (based on the link below) and XFCE. I rebooted it 3 times in non-fullscreen mode, all which went ok.
- I then shut it down to test a cold boot, but the issue (blank screen) came up again.
- At the blank screen, I clicked on `Host keys + F` to toggle out of full-screen mode and suddenly the desktop came up.
That's interesting! So toggling Full-screen can undo the blankscreen! We've had other posts where the VM wasn't disk-full and had blackscreen going. You may have given us a good workaround. This is going in my notes!

This smacks of a bug to me. Fth0 will probably have more info, but I'd lean towards a good report on the Bugtracker being of great use to the devs.
someonepleasehelp
Posts: 4
Joined: 13. Mar 2023, 06:33

Re: Debian 11 VM shows blank screen after log-in

Post by someonepleasehelp »

scottgus1 wrote: That's interesting! So toggling Full-screen can undo the blankscreen! We've had other posts where the VM wasn't disk-full and had blackscreen going. You may have given us a good workaround. This is going in my notes!

This smacks of a bug to me. Fth0 will probably have more info, but I'd lean towards a good report on the Bugtracker being of great use to the devs.

Glad to have contributed, though I cannot be sure if my 'solution' can help in those situations faced by other users.

In any case, my VM certainly wasn't full (it had 55GB free out of 80GB capacity). My host OS still had 30% out of the 1TB free. So it's likely a bug due to the apt upgrade. Let's hear from Fth0 and if we don't have further tests for me to try, I'll gladly open a ticket in the Bugtracker.

My screen resolution: 1920 x 1080
Scale: 1x
Rate: 60Hz

Edit 1: Added screen resolution in case that matters
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Debian 11 VM shows blank screen after log-in

Post by fth0 »

Thank you for the detailed information. :)

If you had mentioned "full-screen mode" earlier, I had recognized the issue earlier (I'm getting old ;)). Your issue has been reported from time to time in the last years, and because of the easy workaround (Host+F twice), no-one has probably bothered investigating the issue.

Searching my own posts, I even found a post where I gave a short summary about some known reasons for blank screens in Linux guests: Re: Linux black screen when booting fullscreen workaround. (@scottgus1: Although I didn't mention "disk full" then, you might be interested in reading it, too. ;))

I'm not sure if a new ticket will be reacted on, but it might be worth a try. There is an old open ticket 19640 that indicates that the issue probably was introduced in VirtualBox 6.1.6.
someonepleasehelp
Posts: 4
Joined: 13. Mar 2023, 06:33

Re: Debian 11 VM shows blank screen after log-in

Post by someonepleasehelp »

fth0 wrote:If you had mentioned "full-screen mode" earlier, I had recognized the issue earlier (I'm getting old ;)). Your issue has been reported from time to time in the last years, and because of the easy workaround (Host+F twice), no-one has probably bothered investigating the issue.
It was serendipity that I stumbled on the potential cause to the fullscreen mode and solution to simply toggling out of and back into fullscreen. I took a circuitous route (not to mention many hours), with me initially suspecting the issue to be with the Guest Addition, so I reinstalled that many times.

Anyhow, if there's already an outstanding ticket, I'll see if I can add to it rather than create a duplicate. Meanwhile, I'll continue to use and monitor this issue. Thanks for all the help! :)
gusnan
Posts: 26
Joined: 24. Feb 2014, 13:32

Re: Debian 11 VM shows blank screen after log-in

Post by gusnan »

scottgus1 wrote: That's interesting! So toggling Full-screen can undo the blankscreen! We've had other posts where the VM wasn't disk-full and had blackscreen going. You may have given us a good workaround. This is going in my notes!

This smacks of a bug to me. Fth0 will probably have more info, but I'd lean towards a good report on the Bugtracker being of great use to the devs.
I believe it's enough to simply resize the window - that has been enough for me when running into this (On Debian host and Debian VM).
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Debian 11 VM shows blank screen after log-in

Post by fth0 »

gusnan wrote:I believe it's enough to simply resize the window - that has been enough for me when running into this (On Debian host and Debian VM).
How did you do this after starting in full-screen mode, without leaving full-screen mode first?
gusnan
Posts: 26
Joined: 24. Feb 2014, 13:32

Re: Debian 11 VM shows blank screen after log-in

Post by gusnan »

fth0 wrote:
gusnan wrote:I believe it's enough to simply resize the window - that has been enough for me when running into this (On Debian host and Debian VM).
How did you do this after starting in full-screen mode, without leaving full-screen mode first?
Alright, I don't. I never start in fullscreen mode - but I still sometimes run into the problem - boot up, get the login screen (in windowed mode), enter my password, loggin in, and when I expect a functional desktop - simply a black screen. It has happened pretty often for me. And it is solved by simply resizing the virtual machine window.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Debian 11 VM shows blank screen after log-in

Post by fth0 »

gusnan wrote:Alright, I don't.
Gotcha! ;)

Seriously, I had to ask because your advice didn't fit to the OP's situation. But it's valuable feedback nonetheless, thanks for that! :)
Post Reply