Ubuntu – VirtualBox (Guest Ubuntu) login loop

14.04virtualbox

First of all, I know there has been a lot of threads about Ubuntu login loops. I have read them and I feel like I've tried everything they proposed but nothing works.

Background

I have VirtualBox installed with an Ubuntu 14.04 64 bits VM. I've had it for a while now, using it almost everyday. I've never had any problem with it. Two days ago, I installed a VirtualBox update and the latest Guest Additions. After installing the Guest Additions, I found that I couldn't mount my shared folder anymore, so I restarted the VM, tried again, and it still didn't work. I reinstalled the Guest Additions, restarted the VM, and then I could mount the shared folder just fine. However, I had lost the copy and paste function between my host (Windows 10) and my guest (Ubuntu). At the end of the day, I turned off the VM. The next day, I was stuck in a login loop (with my usual session and with the guest session). Before going back to the login page, I have a black screen that says:

* Starting LightDM Display Manager [OK]
* Stopping Send an event to indicate plymouth is up [OK]

What I tried

Checking virtualization

First, I checked the .xsession-errors file which indicated something about virtualization maybe being disabled and something about at-spi2-core. I didn't think of making a copy of this file and I deleted it since. I tried restarting several times since then and it stays empty now. Anyway, I checked that 3D Acceleration was still activated in the VM setting (it was) and that virtualization was still activated in the BIOS (it was).

Checking Guest Additions

I then tried reinstalling the Guest Additions using the following code :

# Insert Guest Additions
mkdir /tmp/cd
sudo mount /dev/sr0 /tmp/cd
sudo /tmp/cd/VBoxLinuxAdditions.run

The installation went normal, but it didn't help the login loop.

Checking permissions

Following some threads about login loops, I checked permissions in /tmp ; /home/myusername and /home/.Xauthority. Everything was fine.

Checking disk space

I also checked that my disk space wasn't full (even though it wouldn't have made sense since autocompletion worked) using df -h ; I still had 15 Gb of free space.

Checking updates

I also tried updating using sudo apt-get update && sudo apt-get dist-upgrade but there was nothing to update.

Checking lightdm

I also tried some code found on other threads regarding login loops and lightdm :

sudo dpkg-reconfigure lightdm
sudo service lightdm restart
sudo reboot

It didn't help.

Checking random stuff found on login loops threads cause I really need my VM to work

Didn't help:

sudo apt-get install --reinstall at-spi2-core
sudo apt-get install --reinstall unity
sudo apt-get install --reinstall ubuntu-desktop

Didn't work (but not sure it should work since I'm on a VM):

sudo apt-get purge --auto-remove fglrx*
sudo dpkg-reconfigure xserver-xorg
sudo apt-get install fglrx # didn't work

Checked that I didn't have Xenial or other packages mixed with Trusty packages (using apt-cache): I don't, they all seem to be Trusty packages.

I also tried adding a new user with sudo priviledges but I also can't login to the new user, I'm still in a login loop.

EDIT: Additional information

I don't know if this is relevant at all, but I made a new VM with a fresh install of Ubuntu 14.04 64 bits. I installed the Guest Additions, and each time I log into the VM, I have the following error message: VBoxClient: VBoxClient (seamless): failed to start. Stage: Setting guest IRQ filter mask Error: VERR_INTERNAL_ERROR.
The only things I did on this VM are installing updates & Guest Additions. I enabled the copy/paste function between host and guest but it doesn't work either.

My question

I ran out of options to help my login loop. I feel like I've tried everything I read on my Google searches. Does anyone have any input or idea about what I could try to make it work ?

Best Answer

check if you are running with Virtualbox Guest Additions 5.2.6. That version is buggy and causes login infinite loops like that ones you have experienced.

Important: The Guest Additions which come with VirtualBox 5.2.6 and 5.1.32 do not work properly on Linux guests with 3D enabled. Here are updated versions for 5.2.6 and 5.1.32.

Update for version 5.2.7 worked for me.

See https://www.virtualbox.org/ticket/17463