CtrlAltF[1-6] takes you to an array of virtual terminals (aka. VT or VC, virtual console). The X server runs on top of one of them, which is the dsyfunctional black screen in this case.
Since you can log in on a VT, you can check the current X server log in /var/log
. This may or may not be useful. The logs are named with a format like this:
Xorg.N.log
Where N
is the display number, which is likely 0 in this case. The logs are rolled over once so there will also be a Xorg.0.log.old
. There's a lot of information there, just skim it to see if anything stands out to you as an error.
Next you can check the output of systemctl status lightdm
. Lightdm is the display manager used by default on Raspbian if you are using a graphical login.
I had to reboot my RPI when my web server was working.
This sounds like by "reboot" you mean pull the plug and power up again without having shut the system down properly. If it was busy doing I/O to the SD card at the time, this may have resulted in filesystem corruption. I'm pretty sure this should be checked automatically at boot, although NOOBs may complicate that. To make sure, edit your /boot/recovery.cmdline
(see here) and add:
fsck.mode=force
To the end. Note this file should remain all one line; this should be added after a space, not a newline. Then reboot.
You may want to remove that afterward since it will add some time every boot (about 10-20 seconds for an 8 GB root filesystem).
This may not fix the problem but it may fix something if there was corruption and it has gone unfixed -- you should notice boot messages about that if you switch to tty1 (with ctrl-alt-F1) as soon as possible during boot.
Note also if the filesystem fix was already done then there may have been corruption which is fixed in the sense the filesystem is now coherent, but data was lost causing your problem. If there is any content in /lost+found
that's a clue that this may have happened (since those fragments won't be dated properly on the pi, it is impossible to say if they are recent, however, unless you keep the directory clean).
You can also look through the end of /var/log/syslog
to see if any errors jump out there.