If you connect a display to the Raspberry Pi, you may need to adjust a few settings.
If the image needs to be rotated, open the config.txt file in the /boot directory. There you will find the following parameters:
# Flips the display using the LCD's inbuilt flip functionality. Rotation: 0 = normal, 1 = 90°, 2 = 180°, 3 = 270° # lcd_rotate=0 # Rotate in gpu instead. 90 and 270° require extra memory! # display_hdmi_rotate=0 # For legacy drivers, same as display_hdmi_rotate # display_lcd_rotate=0 # Deprecated, for backward compatibility # display_rotate=0
Here you can test which parameter works for your display. It is important that you delete the # in front of the parameter you change, otherwise it will be interpreted as a comment and your change will not work. After each change you have to reboot the Raspberry Pi.
Generally, quite a few video settings are set in this file. For a full explanation of the parameters visit https://www.raspberrypi.org/documentation/configuration/config-txt/video.md .
Display just shows console
Linux can have multiple displays. If the x servery uses the wrong one, only the console will be displayed. If this happens with our image, the x server starts the output on fb0 and fb1 is needed. In that case please change fb0 to fb1 like in this example:
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf Section "Device" Identifier "mhs35" Driver "fbdev" Option "fbdev" "/dev/fb1"
Problems installing special video drivers
Some displays, especially small ones not using hdmi as input, need installation und configuration of the special drivers. How this is done is described in the display documentation. If the installation fails, the reason might be a missing linux command. Often the git command is used, which is not installed by default. To make the installation succeed, install all missing commands. For the case of git this would be:
sudo apt update sudo apt install git