47

I upgraded my operating system from Ubuntu 12.10 to Ubuntu 13.04, and after the process of upgrading it via Software Updater, it requested me to restart the computer.

I rebooted and on boot it proceeded to a purple screen with Ubuntu text and 5 dots below it and continued to a blank black screen with a blinking underscore character (_).

enter image description here

enter image description here

I have all my files in there and I can't access them. I tried the grub boot menu edit that other questions pointed out, but it didn't seem to do anything.

karel
  • 122,292
  • 133
  • 301
  • 332
Gab
  • 471

11 Answers11

35

In Ubuntu 18.04 and later lightdm login display manager has been replaced by gdm3 and the keyboard shortcut to access the virtual console has changed from Ctrl+Alt+F1 to Ctrl+Alt+F3. sudo dpkg-reconfigure lightdm has been replaced by sudo dpkg-reconfigure gdm3. sudo service lightdm restart has been replaced by sudo service gdm3 restart.

If you know your disk is full, you can try removing around 1-2 GB of unneeded files before executing sudo service gdm3 restart.

If the problem remains after reboot fix it by opening /etc/gdm3/custom.conf for editing in nano text editor with sudo nano /etc/gdm3/custom.conf and unmcommenting #WaylandEnable=false by removing the# character at the beginning of the line as follows: WaylandEnable=false

karel
  • 122,292
  • 133
  • 301
  • 332
17

Try the following:

press Ctrl+Alt+F1

You'll see a terminal for login, enter your credentials and execute the following command:

sudo service lightdm --full-restart

Enter your password again and you should see the login page

jobin
  • 28,567
vimtut0r
  • 171
  • 1
  • 3
13

Here’s what worked for me, on a Dell Precision M6800 laptop running Ubuntu 16.10:

First, at the black screen with the cursor in the top-left (which wasn’t blinking in my case), I followed this answer and pressed Ctrl+Alt+F1 to show a terminal, and logged in with my username and password.

That answer suggests running sudo service lightdm --full-restart, but the command only gave me an error. Instead, this answer’s solution of removing and reinstalling lightdm was what brought me forward. Note that a wired internet connection is required for the apt-get install part; wireless internet is apparently not set up yet at this stage in the boot process.

sudo apt-get purge lightdm
sudo apt-get update
sudo apt-get install lightdm
dpkg-reconfigure lightdm
sudo reboot

After this reboot, the login screen successfully showed, at the point in time where previously the one-line log message disappeared and the underline cursor appeared. But when I entered my correct password to log in, I only got the error “Failed to start session” in red text.

The article ‘Fix “Failed To Start Session” At Login In Ubuntu 14.04’ helped with that. At the login screen with the error message, I pressed Ctrl+Alt+F1 again to show a terminal, and logged in. Then I ran sudo apt-get install ubuntu-desktop, which installed ubuntu-desktop for the first time. Finally, I ran sudo reboot to reboot.

When the computer finished rebooting, I was able to successfully log in at the login screen and return to using the computer normally.

Rory O'Kane
  • 335
  • 3
  • 11
7

I dont know if this will help you but, this happened to me after I moved around harddrives from one computer to another. I had a black screen with a comand cursor blinking and taunting me everytime I tried to boot. After reformating and installing and reinstalling. I checked my setup and my comp was booting the wrong hard drive. I swapped the drive order and the bootloader came up.

Again, this was just my experience with the black screen cursur blinking. Solution was:

F2 > boot > swap boot order of drives.

Joe
  • 71
4

I was unable to switch to other TTYs as is recommended in other answers. I had a blinking cursor, but otherwise my system was unresponsive.

Root cause for me: Bad package upgrade (?improper shutdown?) left my system/dpkg in a broken state.

Detection: After using recovery mode to get to the root shell, I tried apt-get purge lightdm as per previous answers. This command failed, with a message: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Fix:

  1. Get to a root shell if you haven't already. You can do this by booting into 'recovery mode' from grub, and using the keyboard to select the root prompt option.
  2. Run dpkg --configure -a.
  3. If this was indeed your problem, it will resume some package installation that was not completed. For me, that was a kernel upgrade with an nvidia driver component.
  4. Be patient. After it is completed, try reboot and see if it has fixed your problem.
4

I had similar problem and solved it by following steps:

first press Ctrl+Alt+F1(or F2, F3, F4)

You'll see a terminal for login, enter your credentials and execute the following command:

ps -aux | grep --color "lightdm"

then, you will see processes that run lightdm, so you should kill those process:

kill -9 -15 <process number>

after that graphical login screen appears.

3

Apparently this is an issue that can happen, especially with SSD drives.

The solution would be to install gdm and use that instead.

sudo apt-get install gdm

and when prompted, select it. If you want to switych back to lightdm:

sudo dpkg-reconfigure gdm

This is the source.

akmur
  • 980
0

On Ubuntu 20 , I tried all other solutions , none worked instantly , I booted to recovery mode started networking, and opted for "dpkg" to reconfigure /fix packages , with all my trials I ended up getting this error "dpkg error processing package nvidia-340 ... returned exit status 10" , so the problem was , without my notice or during apt update , nvidia-340 package was installed .. my pc does not have integrated graphics but an old discrete Nvidia graphics card , after researching on nvidia-340 package , I found that I can remove it sudo apt-get purge --autoremove nvidia-340 , I , then I restarted gdp3 service sudo service gdm3--full-restart then I could reboot successfully to the login screen

0
sudo apt dist-upgrade

Solved my problem.
More information on the implications of this command here.

0

This probably only applies to newer ubuntu versions (those that come with nvidia proprietary drivers). It seems release updates don't automatically update nvidia drivers to the one recommended for the release which can cause issues.

  1. In the grub menu, select additional boot options and see if you can find one that successfully boots to a GUI and allows you to log in. Usually it's the kernel you had right before upgrading. You may need to try a couple to find one that works.
  2. If you manage to find one that successfully boots to GUI and you are able to log in, try rebooting from GUI and booting back to the original kernel, i.e. the Ubuntu option in the grub menu (sometimes this is all it takes to make it work)
  3. If it still returns a black screen with blinking underscore, go back to the kernel that successfully boots to GUI and search for the "Additional Drivers" in the application menu
  4. In the Additional Drivers, select the Additional Drivers tab and choose the option that says (proprietary, tested) and apply changes.
  5. Now reboot back to the latest kernel (Ubuntu option in the grub menu)

Hopefully this works

Rufus
  • 943
0

Have you tried the options listed at this My computer boots to a black screen, what options do I have to fix it? Also, do you have a discrete graphics card, possibly with Optimus technology? If yes, please install bumbleebee project from Bumblebee wiki.