For screen output, Raspberry Pi has an HDMI and a composite output. Typically, you will run Raspberry Pi on an HDMI screen. That’s the easiest. At the same time, the digital audio signal is also transmitted and output if the screen has speakers.
When choosing the HDMI cable, you should pay attention to high-quality HDMI cable, because cheap are of questionable quality and often not all pins in the plug are occupied. As a result, running the Raspberry Pi on an HDMI screen becomes a gamble. However, this is not the raspberry pi hdmi port problem, but the manufacturer of the HDMI cable, which has interpreted the HDMI standard in his favor.
Whoever buys cheap here, buys twice
Raspberry Pi operates on an HDMI screen
When operating Raspberry Pi on a screen, it is important to note that the screen must first be connected to Raspberry Pi and turned on before operating Raspberry Pi with a power adapter. If you forget to connect it before turning on the screen, you will not get an HDMI signal from Raspberry Pi.
The reason is quite simple. When Raspberry Pi goes into operation, it checks to see if a screen is connected. If not, it turns off the HDMI interface. During operation, it is then no longer checked whether a screen is connected. Therefore, a screen does not receive an HDMI signal when subsequently switching on and connecting. Raspberry Pi does not have plug-and-play as you would expect with a PC.
Turn on plug-and-play on the Raspberry Pi HDMI output
To do this, open the boot configuration:
sudo nano /boot/config.txt
Then insert the following line here:
hdmi_force_hotplug = 1
Save, close and restart.
Operate Raspberry Pi via an HDMI adapter to a VGA projector or screen
In general, you will operate Raspberry Pi on an HDMI screen. Unfortunately, one does not always have an HDMI screen available. Often there are still old VGA screens around but are just as well suited for the image output of Raspberry Pi. Only one HDMI adapter is required, which has an HDMI input and a VGA output. Such an HDMI adapter converts the digital image signal into an analog VGA signal.
Enable, disable and show HDMI output
If Raspberry Pi is started without the monitor connected, the HDMI output will remain off. You can subsequently use the HDMI output during operation. But then you have to enter via VNC on the command line or an SSH connection.
Solution: Turn the HDMI output on and off
If you are connected to Raspberry Pi via SSH, then you can switch the HDMI interface and thus the HDMI monitor on and off.
Turn off the HDMI monitor:
vcgencmd display_power 0
Turn on the HDMI monitor:
vcgencmd display_power 1
Solution: Switch on the HDMI output afterward
If Raspberry Pi is started without a connected monitor (without Plug and Play), then the HDMI output remains off. You can subsequently use the HDMI output during operation.
It then goes to the monitor, but the picture remains black. But it should be displayed on the screen again something.
For the GUI display:
sudo /bin/chvt 6
sudo /bin/chvt 7
For the console:
sudo /bin/chvt 2
sudo /bin/chvt 1
Disable HDMI output:
Show the status of the HDMI output:
Switch off monitor standby at the HDMI output
Normally, when the user is inactive, the monitor will eventually be turned off or put on standby. Most operating systems are set by default to turn off the screen after a set amount of time. If you then move the mouse or operate the keyboard, the display will turn on again. But there are also situations where you do not want the screen to go out.
Set the screen resolution to the HDMI output
In general, the resolution (width and height) of Raspberry Pi’s screen display is based on the native resolution of the HDMI screen. And that usually automatically. That means, actually one does not have to adjust at the dissolution. Nevertheless, there may be reasons to set the resolution firmly.
raspberry pi hdmi port with 4K resolution
On the subject of Raspberry Pi and 4K resolution, there are many and sometimes contradictory information on the Internet. The fact is, with an actual Raspbian kernel, even an old Raspberry Pi can output a 4K resolution on the HDMI output.
But who wants to try 4K with Raspberry Pi, should be prepared for trial-and-error that it does not work with any TV or monitor. Not even if the official 4K can.