Welcome to Firefly
Switch language
Firefly Docsss
Last Updated: 2026-08-27 07:36:09

X11/Xserver

X11 is the traditional display protocol widely used by Linux desktop systems. Xserver manages display devices, input devices, window rendering, and communication between client applications. Desktop environments, window managers, and graphics applications usually communicate with Xserver through the X11 protocol.

On Firefly Ubuntu/Debian firmware, X11 is commonly used for general desktop scenarios with a lightweight desktop environment and login manager:

LXDE/XFCE + Xserver + lightdm

X11 is suitable for traditional desktops, window management, mouse and keyboard interaction, browsers, and common GUI applications. Xserver logs are usually stored at:

/var/log/Xorg.0.log

Show the Xserver version:

grep "X.Org X Server" /var/log/Xorg.0.log

Check whether the current session is X11:

echo $XDG_SESSION_TYPE

If the output is x11, the current session is running on X11.

Rockchip X Server Enhancements

The X Server in Firefly Ubuntu/Debian firmware includes Rockchip platform adaptations and enhancements. The common configuration file is:

/etc/X11/xorg.conf.d/20-modesetting.conf

Common enhancements include:

  • Primary GPU selection: match the rockchip DRM driver through OutputClass and set PrimaryGPU to avoid display issues caused by automatic GPU enumeration.
  • Hardware acceleration: supports glamor and exa acceleration modes. glamor uses the GPU for rendering and composition; exa can use Rockchip RGA 2D hardware for rendering and composition.
  • DRI configuration: configure the X11 direct rendering interface with the DRI option. A common value is DRI 2.
  • Tear-free display: configure the tear-free policy with FlipFB. Setting it to always can reduce screen tearing, but may reduce performance.
  • Flip-rate limiting: use MaxFlipRate to limit the flip rate and drop frames to reduce the performance cost after tear-free display is enabled.
  • EDID control: use NoEDID to disable display EDID, useful when the display reports incorrect EDID information.
  • Gamma correction: use UseGammaLUT to enable the Gamma LUT and improve color display.
  • Virtual screen size: use VirtualSize to set a virtual screen size and scale through VOP hardware.
  • Display padding: use Padding to configure physical display edge padding.
  • Screen rotation: set the rotation direction with Rotate in the Monitor section. Common values include normal, left, and right.

Example configuration:

Section "OutputClass"
    Identifier  "RockchipDRM"
    MatchDriver "rockchip"
    Option      "PrimaryGPU" "yes"
EndSection

Section "Device"
    Identifier  "Rockchip Graphics"
    Driver      "modesetting"
    Option      "AccelMethod" "glamor"
    Option      "DRI" "2"
    Option      "FlipFB" "always"
    Option      "NoEDID" "true"
    Option      "UseGammaLUT" "true"
EndSection

Section "Monitor"
    Identifier  "Default Monitor"
    Option      "Rotate" "normal"
EndSection

After changing the Xserver configuration, restart the graphical service or reboot the system for the changes to take effect.

No Black Screen Implementation

During X11 desktop startup, a short black screen may appear between X service startup and the first desktop application frame. The duration depends on the desktop environment and application startup time. To keep the boot logo visible during this period, set XSERVER_FREEZE_DISPLAY during Xserver startup to temporarily freeze the display content, then unfreeze it after the desktop application is ready.

Add the following content before running Xorg.wrap in /usr/bin/X:

export XSERVER_FREEZE_DISPLAY=/.freeze_xserver
touch $XSERVER_FREEZE_DISPLAY
$(sleep 6; rm $XSERVER_FREEZE_DISPLAY)&

This example freezes the display for 6 seconds and then shows the desktop. Adjust the freeze time according to the actual product startup time.

You can also wait for a key desktop service before unfreezing the display, for example waiting for the panel service to start and finish drawing:

{
    export XSERVER_FREEZE_DISPLAY=/.freeze_xserver
    touch $XSERVER_FREEZE_DISPLAY
    while sleep .5; do
        pgrep panel && break
    done
    sleep 2
    rm $XSERVER_FREEZE_DISPLAY
}&

For production systems, use the target desktop application or key UI process as the ready condition. This avoids a fixed delay that is too short and still shows a black screen, or too long and slows visible startup.

On this page