Raspberry Pi black screen after boot

Although it is not a common error, some users may encounter a black screen when using a Raspberry Pi. The error is most likely to occur when first booting the Raspberry Pi, giving users very little opportunity to perform any kind of investigation into the problem for troubleshooting. In this tutorial, we will look at some ways to solve the black screen problem that occurs when booting a Raspberry Pi. This will include a few different methods, as the exact cause can vary and sometimes be hard to pinpoint.

In this tutorial you will learn:

  • How to troubleshoot hardware video issues
  • How to change HDMI video settings in config.txt file
  • How to use raspi-config tool to change video settings
  • How to set primary, active monitor and change screen resolution
Raspberry Pi black screen after boot
Raspberry Pi black screen after boot
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Raspberry Pi
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Raspberry Pi black screen solutions




There are multiple causes for a black screen appearing when booting the Raspberry Pi. This error means that the system is completely unusable, at least via GUI. We will go through several potential solutions below. There is not a one size fits all solution, as there could be various causes to the black screen issue. By going through each solution below, one of them will most likely fix the problem.

NOTE
Since the GUI is not currently working, you will need another way to access the Raspberry Pi and apply the below solutions. Options include either connecting to Raspberry Pi via SSH, or if VNC has been enabled, connecting via VNC remote desktop.

Solution 1: Hardware Problems

When a Raspberry initially boots up, there will be a rainbow colored image that flashes across your screen. If you are seeing this, then it most likely means that your monitor is functioning correctly and you do not have a bad cable between the monitor and Raspberry Pi device.

If you are not seeing your monitor turn on at all, or you never see the rainbow palette appear, then you should consider that there could be a hardware problem with your monitor or with the cable that connects the two devices. To rule out these issues, try plugging in a different monitor with a different cable.

Solution 2: Editing config.txt

There is a configuration file located at /boot/config.txt that controls various video settings for the Rasperry Pi. Editing this file will often fix the black screen error. There are a lot of HDMI related settings in this file that can be changed. Rather than going through and changing them all, it is recommended to only change them one by one, then test to see if it fixes the problem, before going on to change a different setting.

Edit the file:

$ sudo vi /boot/config.txt
Opening the config.txt file on Raspberry Pi to fix black screen issues
Opening the config.txt file on Raspberry Pi to fix black screen issues

The following two settings will enable HDMI and set resolution to 1920 x 1080:

hdmi_group=2
hdmi_mode=82

If this does not work, you can also try uncommenting the hdmi_force_hotplug setting inside the file, which will turn the setting to 1 (on):

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1




Other relevant settings that you can try changing one by one to see if they fix your issue:

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

Solution 3: Editing Display Options in raspi-config

There are some settings in the raspi-config utility that can affect your video display.

  1. Connect to the command line and execute the following line to open the config tool:
    $ sudo raspi-config
    
  2. Open up display options:
    Open the 'display options' menu within the Raspi config utility
    Open the ‘display options’ menu within the Raspi config utility
  3. Next, open up the composite settings:
    Accessing the composite settings screen in Raspi config
    Accessing the composite settings screen in Raspi config
  4. Then, adjust one or more of the following settings to match your current setup, then reboot the Raspberry Pi and see if they fixed the issue:

    Adjusting HDMI and composite settings on Raspberry Pi
    Adjusting HDMI and composite settings on Raspberry Pi



Solution 4: Changing Default Resolution

If you manage to make it back to the GUI by way of VNC or another remote desktop method, you can ensure that the resolution is set to the appropriate setting by going through the following steps:

  1. Go to the application launcher > Preferences > Screen Configuration.
    Accessing screen configuration settings in Raspberry Pi
    Accessing screen configuration settings in Raspberry Pi
  2. Navigate to Layout > Screens > select your screen (probably HDMI 1) > Resolution. While in this menu, you should also make sure that the ‘Active’ and ‘Primary’ options are checkmarked as seen in the screenshot below:
    Change resolution and screen settings on Raspberry Pi
    Change resolution and screen settings on Raspberry Pi

Closing Thoughts




In this tutorial, we saw how to troubleshoot the black screen error on a Raspberry Pi system. We went through four different solutions for the problem, and then broke down those solutions into even more sub-solutions, which should cover a wide array of causes for the black screen issue. Usually this error just means that your hardware does not like one of the default HDMI settings within config.txt, and a simple change will fix it. Other times, the problem can be more complex with a hardware issue or resolution setting being the culprit.



Comments and Discussions
Linux Forum