.. _SD.Kernel.DisplayConfigurationAndBringUp.CommonDisplayconfig:

.. include:: /content/swdocs.rsts

.. spelling::
   Acer
   downscaling
   fbcon
   fbconsole
   Flatron
   num
   nvimp
   Viewsonic
   HDMI
   dts
   html
   hdmi
   tegra
   dcb

Common Display configurations for all Platforms
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Setting the HDMI or the DP Screen Resolution
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

The screen resolution can be modified using the `xrandr <https://www.x.org/releases/current/doc/man/man1/xrandr.1.xhtml>`_ utility or `RandR protocol <https://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt>`_.


To change the default HDMI/DP screen resolution
###############################################

1. Export the ``DISPLAY`` variable::

      $ export DISPLAY=:0

2. Obtain the applicable resolutions list::

      $ xrandr

   The resulting output shows a list of the connected HDMI/DP settings.

   .. figure:: L4tDisplayConfigSettings.jpg
      :alt: xrandr list of display configuration settings
      :figwidth: 650px

3. Switch the resolution to the display resolution that you want::

      $ xrandr --output HDMI-0 --mode <res>
      $ xrandr --output DP-0 --mode <res>

   Where ``<res>`` is the desired resolution, for example, ``640x480``.

   The highest rate supported for the specified mode is automatically chosen.

4. Select a refresh rate::

      $ xrandr --output HDMI-0 --mode <res> --rate <refresh_rate>

   Where ``<refresh_rate>`` is the refresh rate you want, for example, ``60``.

   Use ``xrandr`` to display all supported refresh rates for a mode.

Mirroring or Extending Displays
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

When multiple displays are connected, you can choose the relative
position of each monitor (HDMI or DP).

To choose the relative position of each monitor
###############################################

1. Execute the following command to mirror the DP monitor on the HDMI monitor::

      $ xrandr --output DP-0 --same-as HDMI-0

2. Execute the following command to extend the display environment by
   placing the DP monitor to the left of the HDMI monitor::

      $ xrandr --output DP-0 --left-of HDMI-0

3. Execute the following command to place the DP monitor to the right of the HDMI monitor::

      $ xrandr --output DP-0 --right-of HDMI-0

