45

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.

11 Answers 11

32

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

10
  • 2
    Thank you good Samaritan. This worked for me, using latest ubuntu.
    – Blaze
    Jan 13, 2021 at 18:22
  • 1
    Awesome thanks, I've tried using a mainline kernel but this was the actual fix Mar 6, 2021 at 14:26
  • 1
    Unfortunately, this did not work for me on Ubuntu 20.04 I still see the blinking cursor instead of the login screen.
    – HadidAli
    Jul 20, 2021 at 9:42
  • 1
    Thanks a lot. Worked perfectly on Ubuntu 20.04. To people who did not reach the console, and are on a notebook, do not forget to check FnLock feature, you might be actually pressing something like volumeUp button instead of F3. Then you need to FnUnlock or press Fn as well.
    – Paloha
    Sep 1, 2021 at 5:27
  • 1
    If you know your disk are full, you can try removing around 1-2 GB of garbage before executing sudo service gdm3 restart Sep 14, 2021 at 8:32
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

3
  • 3
    This fixed it for me, thanks! Unfortunately I have to about 50% of the times, any idea why, and how to get it fixed for good?
    – akmur
    Jan 13, 2014 at 8:37
  • 1
    just accidently pressed ctrl+alt+function key, and got blank screen with cursor. Clicked ctrl+alt+F7, desktop back again. Thanks. Your answer give the hint. Aug 3, 2016 at 4:06
  • I m in the same situation but my computer doesn t recognize my credentials
    – HoCo_
    Feb 27, 2019 at 8:43
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.

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.

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.
1
  • The other answers were helpful, but ultimately it appears your solution best matches the issue I was seeing. My instance broke during package upgrade from 18.04 to 20.04. Thanks twitchyliquid! Mar 6, 2021 at 4:11
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.

2
  • gdm broke my computer even more, preventing me from using Ctrl+Alt+F1 to enter the command line. To switch back to lightdm, I had to hold Shift during boot to enter Recovery Mode, enter the root shell, mount the disk as rw, login as my user, and sudo dpkg-reconfigure lightdm. Feb 14, 2017 at 21:36
  • gdm has been upgraded to gdm3 in 18.04 and later.
    – karel
    Oct 25, 2020 at 6:28
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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .