Black screen when trying to login

Just my 5 cents: I encountered this problem after adding a new command line in my .profile file (qnap qsync launcher). For any reason, this action triggered the black screen problem.

Hello there I am having the exact same problem. I tried to do dynamic scaling using xrandr and I am using proprietary NVIDIA drivers I have GTX 1650. Whenever I login it basically opens a black screen and that’s the end. Can you please tell me the step step procedure to undo the hyper resolution effect ?

Okay I did some workaround myself and my solution is mentioned nowhere here so I’ll just post it for someone having this exact problem.

  1. When you reach your login screen with your username press Alt+F2 or Alt+F5
  2. You will come inside command line, login with your username and password
  3. It will ask for your sudo password once more so type in your password one more time
  4. Type “edit ~/.profile”
  5. This is the place where you should have added the scaling commands, so that your machine remembers them every time while u reboot. Go and search those line they will be usually in the last begining with “xrandr” and containing your custom resolution so it won’t be hard to find them
  6. Delete everything that has xrandr or any resolution in it since this file isn’t supposed to contain anything like that.
  7. Type “:w”
  8. Type “:q”
  9. Type “sudo reboot”
    You should login to your usual desktop now if you login. Hope this works!!

If I have this problem with Ubuntu-MATE, is it the same command to reinstall? I have an SD card on a Raspberry Pi that won’t boot up also. I get to the command line, but that’s about all…

Sorry - but I should point out - you should not use sudo** to edit any files in “~” - i.e. your home folder - the only time you will need sudo for this process is “sudo reboot”… Also a very quick “vi/vim” shortcut for “:w” and “:q” is “ZZ” (shift+zz).

Note also - in Ubuntuland - the virtual TTY’s are Alt+F3, F4, F5, F6 (and also - F7 - yeah - I know a lot of howto’s claim the GUI is at F7 - but it’s not in Ubuntu Gnome - since around Ubuntu 17.10 or so) - Alt+F2 is your running GUI, and Alt+F1 is your DM (e.g. LightDM or GDM in Ubuntu with gnome - i.e. GUI login).

** using sudo might make that edited file readable only by “root” - you don’t want that… Note : I’ve NEVER been prompted for my sudo password when logging into any Virtual TTY console…

edit :

also - I’d recommend “sudo sync” just before you “sudo reboot”… I always run “sync” before rebooting any NIX server or appliance…

2 Likes

At the login screen, bring up the terminal using one of the key combinations mentioned in this thread (ctrl+alt+f2 worked for me). Login via the terminal and install the nvidia driver version 4.5.0:

sudo apt install nvidia-driver-450

Reboot your machine and login via the GUI. The screen may go blank for a while but it should come back up soon after.

For me this happened because the disk was full (login into the shell with Ctrl-Alt-F5 and writing df -H showed 0% free on the / mount point). Clearing some space with sudo apt-get clean fixed the issue.

1 Like