> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/di-12-zhang-wayland-xi-tong/di-12.1-jie-wayland-gai-lun.md).

# 12.1 Wayland 概论

Wayland 是一种旨在取代 Xorg 等显示服务器的通信协议。它与 Xorg 在多个重要方面有所不同。

首先，Wayland 只是一个协议，它通过某种机制在客户端之间充当中介，从而去除了对 X 服务器的依赖。Xorg 同时包含 X11 协议（用于运行远程显示）和 X 服务器（用于接受连接并显示窗口）。而在 Wayland 下，合成器或窗口管理器提供显示服务器，而不是传统的 X 服务器。

由于 Wayland 不是 X 服务器，传统的 X 屏幕连接需要使用其他方法，如 VNC 或 RDP 进行远程桌面管理。其次，Wayland 可以作为一个独立的实体管理客户端与合成器之间的复合通信，而无需支持 X 协议。

X11 架构：

```sh
  网络
   │
X 客户端(远程) ──(X11)───┐
X 客户端(本地) ──(X11)───┴──> X 服务器
                         (显示服务器)
                              │
                              ▼
                             内核
                         (GPU 与输入)
```

Wayland 架构：

```sh
Wayland 协议本身不提供网络透明，远程客户端不能直接连接到本地混成器显示窗口。

Wayland 客户端 ──(Wayland)──> Wayland 混成器
(应用)                  (显示服务器 + 窗口管理器 + 混成器功能)
                                │
                                ▼
                               内核
                           (GPU 与输入)
                                │
                        (远程需要 VNC / RDP)
```

FreeBSD DRM 驱动移植仅覆盖了 Intel、AMD 和 NVIDIA 等 GPU，vmwgfx 和 virtio 等虚拟化 GPU 驱动尚不支持。

在 VMware、VirtualBox 或基于 Virtio 的虚拟环境中无法使用 Wayland，建议在虚拟环境中使用 X.org 而不是 Wayland。

无法移植到 Wayland 的传统 X11 应用程序将自动使用 Xwayland 作为 X11 传统客户端和 Wayland 混成器之间的代理。

## 参考文献

* freebsd/drm-kmod. Request to restore support for vboxvideo, vmwgfx and virtio DRM drivers #356\[EB/OL]. \[2026-04-04]. <https://github.com/freebsd/drm-kmod/issues/356>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/di-12-zhang-wayland-xi-tong/di-12.1-jie-wayland-gai-lun.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
