Search by Tags

X-Server (Linux)



Compare with Revision

Subscribe for this article updates

The X-Server allows graphical user interfaces on a Linux system. Typically a desktop environment like Gnome, KDE or LXDE runs on top of this X-Server which allow starting other programs. If such a program is a X enabled graphical application it will connect to the X-Server directly to draw itself on the screen. Our default images ship with LXDE (a lightweight desktop environment, see

There is a related article which covers the topic of Display Output, Resolution and Timings.


Nowadays the X-Server comes with reasonable auto configuration functions. Nevertheless we ship our modules with a default configuration file (located under /etc/X11/xorg.conf). The xorg.conf mainly chooses which Device Dependent X (DDX) driver to load. Our default configuration files select the following driver:

Module SoC DDX driver
i.MX 6 vivante
i.MX 7 fbdev
Tegra 2 and 3 tegra (binary only)
Vybrid fbdev (Linux <= 4.1)
Vybrid modesetting (Linux >= 4.4)

Otherwise the default configuration does not alter a lot but uncommented examples show how to override automatically configured options.

If X-Server configuration is needed using the command line utility xrandr is the easiest way to do this. However, this configuration is not persistent. Either one should add those commands to the LXDE auto start settings (/etc/xdg/lxsession/LXDE/autostart) or try to create a static configuration using xorg.conf.

Tegra 2 and 3 based Modules

General Notes on xorg.conf

The Tegra driver uses XRandR extensions and those do not support the old style (Xinerama) multi head configuration. Instead, only one Screen section has to be active and the Monitors are linked by using Option "Monitor-$connector" "$monitor-section" in the Device section. Refer to our sample configuration on the module or for more information.

Interface Mode (Resolution)

On some connectors the hardware supports EDID. Our BSP makes use of that and allows the user to configure resolutions supported by the monitor.

Description Output 1 Output 2
Framebuffer boot name tegrafb0 tegrafb1
Framebuffer device /dev/fb0 /dev/fb1
X-Server name LVDS-1 HDMI-1
Connector on Evalboard LVDS/RGB/VGA DVI-D
Connector on Iris DVI-A DVI-D
Supports EDID (Software) No Yes

On DVI-D (HDMI-1 in X-Server terms) using XrandR

The supported resolutions and required timings are fetched through EDID on this output. One can check the currently used resolution and list the available resolutions:

root@colibri:~# xrandr
Screen 0: minimum 256 x 128, current 640 x 480, maximum 2048 x 2048
LVDS-1 connected 640x480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   640x480         0.0*+
HDMI-1 connected 640x480+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080      60.0 +   50.0
   1680x1050      59.9
   1280x1024      75.0     60.0
   1440x900       59.9
   1280x960       60.0
   1280x800       59.9
   1152x864       75.0
   1280x720       60.0     50.0
   1024x768       75.0     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   720x576        50.0
   720x480        59.9
   640x480        75.0     72.8     66.7     59.9*
   720x400        70.1

Set one of the available resolutions:

root@colibri:~# xrandr --output HDMI-1 --mode 1920x1080
[  237.924744] tegradc tegradc.1: Using mode 1920x1080 pclk=148500000 href=1 vref=1

Note: Display modes are solely negotiated through DDC/EDID, "xrandr --newmode" does not work.

On DVI-D (HDMI-1 in X-Server terms) using xorg.conf

An available resolution can be configured as "preferable" in the xorg.conf as well:

Section "Monitor"                                                                                       
    Identifier "HDMI-1"
    Option     "PreferredMode" "720x400"


Note: If the connected monitor does not provide the preferred resolution, the X-Server will automatically choose the next closest resolution.

Note2: There exists some NVIDIA proprietary dependency on the primary LVDS resolution having to be equal or higher than the secondary HDMI one. Alternatively one can directly put a manual xrandr configuration of the form 'xrandr --output HDMI-1 --mode 1280x720' into a graphical auto start file as explained here.

On LVDS, RGB or VGA (LVDS-1 in X-Server terms)

It is not possible to change resolution timings from X-Server directly. However, the mode is inherited from the framebuffer device (fbdev). Refer to the Display Output, Resolution and Timings (Linux) documentation to change default settings.

Dual Screen Layout


Please note that the vertical and horizontal resolution is limited to 2048 pixels by hardware:

root@colibri_t20:~# xrandr --output HDMI-1 --mode 1920x1080
root@colibri_t20:~# xrandr --output LVDS-1 --mode 1920x1080
root@colibri_t20:~# xrandr --output LVDS-1 --right-of HDMI-1
xrandr: screen cannot be larger than 2048x2048 (desired size 3840x1080)


The xorg.conf configuration files allow to configure the Dual Screen Layout using the Monitor section as well. This sample shows a clone with an X-Axis offset of 80 pixels:

Section "Monitor"                                                                                       
    Identifier "HDMI-1" 
    Option     "AboveOf" "LVDS-1"                                                                       
    Option     "Position" "80 0"

The keywords RightOf/LeftOf can be used as well, however LXDE seems to override those settings on start up. We therefore recommend to use the xrandr command and add that to the LXDE Session auto start entries.

Section "Monitor"
    Identifier "HDMI-1"
    Option     "RightOf" "LVDS-1"

Turning an output completely off can be archived by using the Option "Ignore":

Section "Monitor"                                                                                       
    Identifier "HDMI-1"                                                                                 
    Option     "Ignore" "true"

Colour Depth

By default, our X-Server configuration uses 16-Bit colour depth to save memory bandwidth (since the CPU and GPU share the memory, this leads to more bandwidth for the CPU). Lots of TFT displays can only show 18-Bit colours anyway.

In order to enable 24-Bit colour depth, use the "DefaultDepth" option in the screen section:

Section "Screen"
    DefaultDepth 16



root@colibri:~# xrandr --output HDMI-1 --mode 1680x1050 --rotation inverted
[  493.075971] tegradc tegradc.1: switching framebuffer to 1680x1050
[  493.076002] tegradc tegradc.1: using mode 1680x1050 pclk=119005000 href=1 vref=1
root@colibri:~# xrandr --output LVDS-1 --rotate inverted


Extend the monitor section with the Rotate option:

Section "Monitor"
    Option "Rotate" "inverted"

Possible options are: normal, left, right and inverted.

Note: Due to a limitation of the Tegra binary driver, this is only possible for the HDMI-1 output. However, the LVDS-1 output supports rotation through xrandr (see above). We recommend to use the xdg auto start method to call xrandr immediately on LXDE session initialisation.

Mouse Coordinates

Under certain circumstances the mouse coordinates might get swapped. When using the touchscreen calibration, this will be inverted automatically. However, one can swap this using X-Input:

root@colibri_t20:~# export DISPLAY=:0.0
root@colibri_t20:~# xinput list
⎡ Virtual core pointer                                id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                      id=4    [slave  pointer (2)]
⎜   ↳ wm97xx touchscreen                              id=6    [slave  pointer (2)]
⎜   ↳ MosArt Optical Mouse                            id=8    [slave  pointer (2)]
⎣ Virtual core keyboard                               id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                     id=5    [slave  keyboard (3)]
    ↳   SCISSORS Keyboard                             id=7    [slave  keyboard (3)]

List the X-Input properties:

root@colibri_t20:~# xinput list-props 8
Device 'MosArt Optical Mouse':
        Device Enabled (115):   1
        Coordinate Transformation Matrix (116): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (236):     0
        Device Accel Constant Deceleration (237):       1.000000
        Device Accel Adaptive Deceleration (238):       1.000000
        Device Accel Velocity Scaling (239):    10.000000
        Evdev Axis Inversion (72):      0, 0
        Evdev Axes Swap (71):   1
        Axis Labels (241):      "Rel X" (125), "Rel Y" (126)
        Button Labels (242):    "Button Left" (118), "Button Middle" (119), "But
ton Right" (120), "Button Wheel Up" (121), "Button Wheel Down" (122), "Button Horiz Wheel Left" (123), "Button Horiz Wheel Right" (124)
        Evdev Middle Button Emulation (243):    0
        Evdev Middle Button Timeout (244):      50
        Evdev Wheel Emulation (245):    0
        Evdev Wheel Emulation Axes (246):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (247):    10
        Evdev Wheel Emulation Timeout (248):    200
        Evdev Wheel Emulation Button (249):     4
        Evdev Drag Lock Buttons (250):  0

Configure a property accordingly:

root@colibri_t20:~# xinput set-prop 8 "Evdev Axes Swap" 0

To have this set automatically upon boot proceed as follows:

System - Preferences - Startup Applications
Name: Mouse Coordinate Fix
Command: xinput set-prop 8 "Evdev Axes Swap" 0

Keyboard Map

The X keyboard map can manually be set as follows (where ch is the layout and de the variant):

root@apalis-t30:~# setxkbmap ch de

To apply this setting over re-boots one can append the following to /etc/X11/xorg.conf:

Section "InputClass"
    Identifier        "Keyboard0"
    MatchIsKeyboard    "on"
    Option            "XkbRules"        "xorg"
    Option            "XkbModel"        "pc105"
    Option            "XkbLayout"       "ch"
    Option            "XkbVariant"      "de"

Plus one has to remove the /etc/X11/Xinit.d/12keymap file as it otherwise interferes.

Vybrid based modules

The Vybrid's display controller (DCU, Display Control Unit) supports only one output. Depending on the BSP version the Linux kernel and X-Server use a different driver for the display controller:

  • BSP Version 2.5 and earlier (BSP with Linux kernel 4.1 and older): fbdev kernel driver, fbdev DDX driver
  • BSP Version 2.6 and later (BSP with Linux kernel 4.4 and newer): DRM kernel driver, modesetting DDX driver


The lightweight desktop manager can temporarily be stopped as follows:

systemctl stop lxdm

Or permanently be disabled as follows:

systemctl disable lxdm.service
systemctl disable xinput-calibrator.service

BSP V1.x

Display Manager (BSP V1.x)

By default the display manager (/usr/lib/ now only supports 640x480 @ 60 Hz on the TFT/LCD aka VGA interface. To change it back to support all modes proceed as follows:

root@colibri_t20:~# ln -fs /usr/lib/ /usr/lib/

And reboot.

Dual Screen Setup (BSP V1.x)

Unfortunately due to some interoperability issue with the GNOME monitor preferences application (e.g. System - Preferences - Monitors) and NVIDIA's Tegra 2 X driver the only way to get a dual screen setup to work reliably is by manual configuration.

Deactivate regular gnome display manager

Just add an exit 0 towards the top of /etc/init.d/gdm as follows:

root@colibri_t20:~# vi /etc/init.d/gdm
#! /bin/sh
exit 0

Manually start NVIDIA Daemon and X Server

Now after rebooting the NVIDIA daemon and X server have to be manually started as follows:

root@colibri_t20:~# nvrm_daemon --daemon&
[  135.698108] tegra-i2c tegra-i2c.0:  no acknowledge
root@colibri_t20:~# X -ac -dumbSched -nolisten inet6&
X.Org X Server 1.9.4
Release Date: 2011-02-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.37-00004-g3462985 x86_64
Current Operating System: Linux colibri_t20 #5 SMP PREEMPT Sat Sep 24 01:48:04 CEST 2011 armv7l
Kernel command line: mem=384M@0M nvmem=128M@192M vmalloc=248M video=tegrafb envsector=2d00 nvsku=000-00000-0000-000 root=/dev/mtdblock0 ip=off rw rootfstype=yaffs2 mtdparts=tegra_nand:1018368K@28160K(userspace) console=ttyS0,115200n8
Build Date: 08 May 2011  05:38:34PM

Current version of pixman: 0.22.0
        Before reporting problems, check
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Feb 24 16:49:22 2014
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
NvRmModuleResetWithHold deassert MOD[32] INST[0]
root@colibri_t20:~# export DISPLAY=:0.0

Configure Dual Screen Layout

Please note that the total resolution is currently limited by 2 K:

root@colibri_t20:~# xrandr --output HDMI --mode 1920x1080
root@colibri_t20:~# xrandr --output TFTLCD --mode 1920x1080
root@colibri_t20:~# xrandr --output TFTLCD --right-of HDMI
xrandr: screen cannot be larger than 2048x2048 (desired size 3840x1080)
576p Side by Side
root@colibri_t20:~# xrandr --output HDMI --mode 720x576
root@colibri_t20:~# xrandr --output TFTLCD --mode 720x576
root@colibri_t20:~# xrandr --output TFTLCD --right-of HDMI

Application Positioning

As there is currently no window manager active, applications can manually be positioned as explained here


Unfortunately Firefox does not accept generic geometry parameters but accepts width and height:

root@colibri_t20:~# firefox -height 576 -width 720&
Xterm on the lower VGA Screen
root@colibri_t20:~# opkg install xterm
Installing xterm (266-r5.0.9) to root...
Configuring xterm.
root@colibri_t20:~# xterm -geometry 720x576+720+0&


NVIDIA's display manager /usr/lib/ can be setup to do software EDID. Software EDID will always take precedence if present. Customers requiring custom display timings can now proceed as follows to load their custom software EDID:

./ --load --EDID=output.edid --display=lvds --module=./

If you do not have a binary EDID handy our latest Linux packages also contain an EDID generator tool:


As follows an explanation of the required timing values:

Pixel Clk (in 10KHz)
H Active
H Blank (Horizontal sync width plus back porch plus front porch)
V Active
V Blank (Vertical sync width plus back porch plus front porch)
H Offset (Horizontal front porch)
H Pulse (Horizontal sync width)
V Offset (Vertical front porch)
V Pulse (Vertical sync width)
Example for 1024x768@70Hz timings for a CRT Monitor
Pixel Clk   7500 (7500 * 10kHz)
H Active    1024 (Pixel)
H Blank      304 (Pixel)
V Active     768 (Lines)
V Blank       38 (Lines)
H Offset      24 (Pixel)
H Pulse      136 (Pixel)
V Offset       3 (Lines)
V Pulse        6 (Lines)

The tools '' and 'generate_edid' can be found in the T20 Image tarball download. They are executed on your Linux host. Best practise is to mark the software EDID library with an explanatory ending and create a symbolic link to the one to be used. e.g.

/usr/lib/ ->

Remote X

To allow for remote X clients to connect to the X server running on the Colibri T20 one has to adjust either /etc/gdm/gdm.conf or /etc/gdm/custom.conf as follows:


After restarting GDM or rebooting one further has to explicitly disable access control as follows:

root@colibri_t20:~# export DISPLAY=:0                                           
root@colibri_t20:~# xhost +                                                     
access control disabled, clients can connect from any host

Now any X client can connect (note is my module's IP address):

sumo@sumo-PORTEGE-R700:~$ export DISPLAY=
sumo@sumo-PORTEGE-R700:~$ xclock
Warning: Missing charsets in String to FontSet conversion
Warning: Unable to load any usable fontset
sumo@sumo-PORTEGE-R700:~$ xdpyinfo
name of display:
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    10904000
X.Org version: 1.9.4
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x120001f, revert to Parent
number of extensions:    23
    Generic Event Extension
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1920x1080 pixels (508x285 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x5f
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0xfa8033
    KeyPressMask             KeyReleaseMask           EnterWindowMask          
    LeaveWindowMask          ExposureMask             StructureNotifyMask      
    SubstructureNotifyMask   SubstructureRedirectMask FocusChangeMask          
    PropertyChangeMask       ColormapChangeMask       
  number of visuals:    2
  default visual id:  0x21
    visual id:    0x21
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
    visual id:    0x5d
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits


As follows an example configuration file for an 800 by 480 touch TFT panel:

root@colibri_t20:~# cat /etc/X11/xorg.conf.tfttouch

# This is the minimal configuration necessary to use the Tegra driver.
# Please refer to the xorg.conf man page for more configuration
# options provided by the X server, including display-related options
# provided by RandR 1.2 and higher.

# Disable extensions not useful on Tegra.
Section "Module"
    Disable     "dri"
    Disable     "dri2"
    Disable     "glx"
    SubSection  "extmod"
        Option  "omit xfree86-dga"

Section "Device"
    Identifier  "Tegra"
    Driver      "tegra"

# VirtualDesktop indicates which virtual desktops should be used by X.
# X will use the specified virtual desktop *and* the next one.  In
# order for an external app to share a display with the X server, it
# needs to use the same virtual desktop.  Valid values are integers 0
# (default) or 1.

#    Option      "VirtualDesktop" "1"

# OverlayDepth is a 32-bit integer which is used to control overlay
# stacking order.  The overlay with the lowest depth is in front of
# all others.  This value has meaning only when multiple overlays are
# present on a display.

#    Option      "OverlayDepth" "255"

# OverlayCombineMode determines how the X overlay is combined with the
# overlay behind it during scanout.  Available modes are: Opaque
# (default), SourceAlphaBlend, and PremultSourceAlphaBlend.  This
# value has meaning only when an external process has created a
# display which is behind the X server.

#    Option      "OverlayCombineMode" "PremultSourceAlphaBlend"

# ARGBHWCursor controls whether the X driver uses an overlay to
# display 32-bit "true-color" cursors, or whether such cursors are
# emulated in software.  Valid values are "true" (default) to enable
# hardware cursors, and "false" to disable them.

    Option      "ARGBHWCursor" "false"

Section "ServerFlags"
# Set the basic blanking screen saver timeout in minutes.  0 to disable.

    Option      "blank time"    "0"

# Set the DPMS timeouts.  These are set here because they are global
# rather than screen-specific.  These settings alone don't enable DPMS.
# It is enabled per-screen (or per-monitor), and even then only when
# the driver supports it.

    Option      "standby time"  "0"
    Option      "suspend time"  "0"
    Option      "off time"      "0"

Section "Monitor"
    Identifier "TFTLCD"

Section "Screen"

    Identifier  "Screen TFTLCD"
    Device      "Tegra"
    Monitor     "TFTLCD"

    DefaultDepth 16

    SubSection "Display"
        Depth           16
        Modes           "800x480"
        ViewPort        0 0
        Virtual         800 480


Section "ServerLayout"
    Identifier  "TouchView"
    Screen      "Screen TFTLCD"

To use this configuration just rename /etc/X11/xorg.conf.tfttouch to /etc/X11/xorg.conf and reboot.

Note: Depth can be either 16 or 24 but the later requires a kernel change. See Display Output, Resolution and Timings (Linux) and adjust the colour depth (bits_per_pixel to 32) in the *[hdmi]_fb_data struct accordingly.


root@colibri_t20:~# export DISPLAY=:0
root@colibri_t20:~# xrandr
Screen 0: minimum 256 x 128, current 1920 x 1080, maximum 2048 x 2048
TFTLCD connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1920x1200      64.9
   1920x1080      72.1*
   1600x1200      77.9
   1680x1050      84.8
   1400x1050     101.7
   1280x1024     114.0
   1440x900      115.3
   1280x960      121.6
   1366x768      142.4
   1360x768      143.0
   1152x864      150.1
   1280x768      152.0
   1280x720      162.1
   1024x768      189.9
   1024x600      242.9
   800x600       310.7
   720x576       359.4
   848x480       366.1
   800x480       388.0
   720x480       431.0
   640x480       484.7
   480x272      1135.8
   320x240      1925.0
CRT disconnected (normal left inverted right x axis y axis)
HDMI connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0m
   1920x1080      72.1*+
   1280x720      162.1
   720x576       359.4
   720x480       431.0
root@colibri_t20:~# xrandr --output TFTLCD --mode 1280x720
root@colibri_t20:~# xrandr --output HDMI --mode 1280x720
NvRmModuleResetWithHold deassert MOD[32] INST[0]
root@colibri_t20:~# xrandr
Screen 0: minimum 256 x 128, current 1280 x 720, maximum 2048 x 2048
TFTLCD connected 1280x720+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1920x1200      64.9
   1920x1080      72.1
   1600x1200      77.9
   1680x1050      84.8
   1400x1050     101.7
   1280x1024     114.0
   1440x900      115.3
   1280x960      121.6
   1366x768      142.4
   1360x768      143.0
   1152x864      150.1
   1280x768      152.0
   1280x720      162.1*
   1024x768      189.9
   1024x600      242.9
   800x600       310.7
   720x576       359.4
   848x480       366.1
   800x480       388.0
   720x480       431.0
   640x480       484.7
   480x272      1135.8
   320x240      1925.0
CRT disconnected (normal left inverted right x axis y axis)
HDMI connected 1280x720+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1920x1080      72.1 +
   1280x720      162.1*
   720x576       359.4
   720x480       431.0

Note: DVI-D resp. HDMI display modes are solely negotiated through DDC/EDID while the parallel RGB resp. LVDS display mode has to be defined within the kernel, "xrandr --newmode" does not work.