The Handbook

    Theme
    • Guides
        • Check a system before installing FreeBSD
        • Orient a Linux administrator on FreeBSD
        • Supported FreeBSD releases
        • Choose a FreeBSD documentation and support channel
        • Move files safely without GNU mv -t
        • Update, upgrade, or update packages?
        • Upgrade 14.4 or 15.0 to FreeBSD 15.1
        • Choose packages, ports, or poudriere
        • Choose the quarterly or latest package branch
        • Choose a FreeBSD download or package mirror
        • Make a system setting persistent
        • Configure locale, keyboard, and time zone
        • Configure a serial console for recovery
        • Choose a custom kernel, module, or loader setting
        • Run a Linux binary with the compatibility layer
        • Check desktop and laptop hardware before installation
        • Choose and check a graphics driver
        • Choose Xorg or Wayland
        • Build a maintainable desktop baseline
        • Install and check a desktop browser
        • Check laptop Wi-Fi, power, and suspend
        • Check multimedia readiness
        • Choose and configure a printing stack
        • Run Windows applications with Wine
        • Snapshot and replicate a ZFS dataset
        • Choose a filesystem and storage layout
        • Operate ZFS without losing the recovery path
        • Restore files from a ZFS snapshot
        • Read ZFS pool health and run a scrub
        • Replace a failed device in a ZFS mirror
        • Replicate a ZFS dataset over SSH
        • Change PF safely on a remote host
        • Configure a narrow WireGuard tunnel
        • Plan a FreeBSD home server
        • Choose a mail server or an outgoing relay
        • Publish a network service safely
        • Choose a jail network model
        • Choose native jails or a jail manager
        • Choose a jail or a bhyve virtual machine
        • Establish a FreeBSD security baseline
        • Choose a MAC policy
        • Audit security-relevant activity
        • Start a DTrace performance investigation
    • Integrations
        • Create a first jail with Bastille
        • Compare jail managers and OCI tooling
        • Publish a Bastille service through PF
        • Mount a ZFS dataset in a Bastille jail
        • Update and upgrade Bastille jails
        • Back up and restore a Bastille jail
        • Prepare bhyve and vm-bhyve
        • Choose NFS or Samba for file sharing
        • Choose ZFS backup automation
        • Operate a signed poudriere repository
        • Manage FreeBSD configuration with Ansible or Salt
        • Run Motion with webcamd on FreeBSD
        • Design a reverse proxy, certificates, and monitoring
    • FAQ
      • Troubleshooting
          • Recover an interrupted freebsd-update run
          • Resolve a package repository or ABI mismatch
          • Diagnose the FreeBSD boot path
          • Recover with a ZFS boot environment
          • Diagnose DNS, routing, and firewall paths
          • Diagnose network mbuf exhaustion
          • Bind a service to a low port without running it as root
          • Diagnose audio output or input
          • Diagnose webcamd, cuse, and a webcam
          • Fix USB device permissions without opening every device
      • About this handbook
      • Synopsis
      • Choose from requirements
      • Establish a small Xorg test
      • Establish a small Wayland test
      • Identify the active session
      • Test the boundary cases
      • Change stacks without obscuring the result
      • Primary references

      Choose Xorg or Wayland

      Last reviewed
      13 August 2026
      Applies to
      15.1-RELEASE, 15.0-RELEASE, 14.4-RELEASE

      Synopsis #

      Xorg is an X11 display server. Wayland is a protocol implemented by a compositor, and older X11 applications normally run through Xwayland. The practical choice is therefore not between two interchangeable packages. It is between a tested Xorg session and a particular Wayland compositor or desktop session on the installed graphics driver.

      Configure and verify the graphics driver before choosing either stack. A display protocol cannot compensate for a kernel driver that did not attach.

      Choose from requirements #

      RequirementPrefer Xorg whenPrefer Wayland when
      Existing desktop or window managerIts maintained FreeBSD path is X11It provides and documents a supported Wayland session
      Older X11 applicationsNative X11 behavior is importantThe applications work correctly through Xwayland
      Remote graphical useX11 forwarding or an established Xorg remote workflow is requiredThe compositor’s VNC or RDP method has been tested
      NVIDIA graphicsThe applicable driver has a stable Xorg path but compositor support is uncertainThe current DRM driver and selected compositor are documented to work together
      Minimal configurationA known Xorg desktop session already worksA compositor package provides a complete maintained session
      Input and screen-sharing toolsThey depend on X11 facilitiesTheir portal and compositor integration is available and tested

      Wayland can provide a modern isolation and rendering model, but results depend on the compositor, graphics driver, Xwayland, portals, and applications. Xorg has broader legacy compatibility but also retains the X11 security and architecture model. Neither label alone establishes that a complete workstation requirement is met.

      Establish a small Xorg test #

      Install Xorg only after the correct graphics module works:

      # pkg install xorg
      

      Confirm that the intended login is a member of video, start a fresh login session after any group change, and use a small window manager or the selected desktop’s documented startx procedure. The desktop baseline guide uses XFCE as one bounded Xorg test.

      If the server exits, inspect its log before generating configuration:

      $ grep -E '\(EE\)|\(WW\)' $HOME/.local/share/xorg/Xorg.0.log
      

      Some launches write /var/log/Xorg.0.log instead. Read the file that was modified by the failed attempt. Modern Xorg usually discovers the KMS device, monitor, and input devices without a monolithic xorg.conf.

      Establish a small Wayland test #

      The current FreeBSD Wayland chapter uses the wayland and seatd packages as the common base:

      # pkg install wayland seatd
      # sysrc seatd_enable=YES
      # service seatd start
      

      The selected compositor may install these as dependencies and has its own startup requirements. The seatd service provides non-root access to shared devices for the standalone compositors described in the FreeBSD Wayland chapter; a desktop with its own documented seat management can have a different boundary. The login needs access to graphics and input devices, and the official procedure places it in the video group. A GENERIC kernel includes evdev support, while a custom kernel must preserve it.

      Install one compositor or one desktop Wayland session and start it from a virtual terminal first. Keep the terminal output. Do not enable a graphical login manager until the manual session starts consistently.

      Install Xwayland when required by applications that do not support Wayland natively:

      # pkg install xwayland
      

      The compositor controls how Xwayland starts. A running Xwayland process proves compatibility support is present, not that every X11 application behaves identically.

      Identify the active session #

      Within a graphical terminal, inspect the session variables:

      $ echo "$XDG_SESSION_TYPE"
      $ echo "$DISPLAY"
      $ echo "$WAYLAND_DISPLAY"
      

      A native Wayland session normally has a WAYLAND_DISPLAY; Xwayland clients also receive a DISPLAY. An Xorg session normally has DISPLAY without WAYLAND_DISPLAY. Applications can still choose a backend independently, so use application diagnostic output when backend choice matters.

      Test the boundary cases #

      Before making a display manager start the session automatically, test:

      • login, logout, and return to a usable virtual terminal;
      • all attached displays, hotplug, resolution, rotation, and scaling;
      • keyboard layout, pointing devices, and accessibility input;
      • browser rendering, audio, camera access, and screen sharing;
      • suspend and resume on portable systems;
      • X11-only applications under Xwayland if Wayland is selected;
      • the actual remote-access method, not merely local rendering.

      Keep the desktop or compositor package, graphics package, FreeBSD release, and package branch with the result. These versions are necessary when a later package upgrade changes behavior.

      Change stacks without obscuring the result #

      Disable an existing display manager before enabling another. Test the replacement manually, then change the startup setting in one transaction. Retain a virtual-terminal login and the commands needed to disable the graphical manager if it loops or presents a black screen.

      Do not keep adding desktop environments to diagnose one failed session. Each environment adds services, session files, portals, and application defaults. A small known-working baseline makes the failed layer visible.

      Primary references #

      • FreeBSD Handbook: The X Window System
      • FreeBSD Handbook: Wayland
      • FreeBSD Handbook: Using Xwayland
      • Xorg(1)
      • startx(1)
      • evdev(4)

      Independent documentation. Not affiliated with or endorsed by the FreeBSD Project or the FreeBSD Foundation.

      Report a bug
      • Synopsis
      • Choose from requirements
      • Establish a small Xorg test
      • Establish a small Wayland test
      • Identify the active session
      • Test the boundary cases
      • Change stacks without obscuring the result
      • Primary references