精华内容
下载资源
问答
  • 2021-11-17 13:42:01

    service路径:/etc/systemd/system/graphical.target.wants/weston.service

    1、weston命令

    Using config file ‘/etc/xdg/weston/weston.ini’

    2、Weston.ini配置文件
    https://zhuanlan.zhihu.com/p/396168706

    https://cloud.tencent.com/developer/article/1446331

    3、shell
    –shell=fullscreen-shell.so

    4、backend 后端
    –backend=rdp-backend.so

    5、service

    /lib/systemd/system/weston@.service
    

    6、csdn
    https://blog.csdn.net/weixin_42892101/article/details/107696652?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522163711408216780274193908%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=163711408216780274193908&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-1-107696652.pc_search_result_cache&utm_term=weston%40.service&spm=1018.2226.3001.4187

    ====================================================
    [core]
    gbm-format=argb8888
    idle-time=0
    #use-g2d=1
    xwayland=true
    #enable-overlay-view=1

    [shell]
    size=1920x1080

    [libinput]
    touchscreen_calibrator=true

    #[output]
    #name=HDMI-A-1
    #mode=1920x1080@60
    #transform=90

    #[output]
    #name=HDMI-A-2
    #mode=off

    WIDTHxHEIGHT Resolution size width and height in pixels

    off Disables the output

    preferred Uses the preferred mode

    current Uses the current crt controller mode

    #transform=90ckend=rdp-backend.so^L

    [screen-share]
    command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize

    更多相关内容
  • 创建目录 /etc/xdg/weston/;将配置文件拷贝到这个目录下;重启weston
  • Orbital是Wayland的合成器和外壳,使用Qt5和Weston。 该项目的目标是构建一个简单但灵活且外观漂亮的Wayland桌面。 它不是成熟的DE,而是X11世界中WM的类似物,例如Awesome或Fluxbox。 依存关系 轨道取决于两件事:...
  • 虽然可以通过加载 xwayland.so 模块在 Weston 中运行 X 客户端,但是在普通的 Weston 会话中运行 X 显示管理器和窗口管理器是行不通的,因为 Weston 通常使用它自己的窗口管理器。 Xweston 应该允许将 Xwayland 作为...
  • (工作正在进行中!) 韦斯顿 绑定libweston / libweston-desktop ,核心,参考合成。 特色: 使用libweston静态链接的自定义build.rs构建-无autoconf,无共享库插件 ...MIT许可证,与Weston本身相
  • nuclear:Weston的Shell插件

    2021-05-22 05:33:40
    Nuclear是Weston的Shell插件。 它实现了一种自定义协议以与Shell客户端(例如进行同步,但是它本身并不携带客户端,因此如果没有客户端,它就。 依存关系 除了要构建它的工具链外,Nuclear仅依赖于Weston 1.4,即C +...
  • 该文档详细描述了weston上层与底层硬件的连接 《Using Linux Media Controller for Wayland/Weston Renderer》 •Wayland/Weston Overview • Porting Weston to R-Car • Why Linux Media Controller Renderer?...
  • Wayland与Weston简介

    千次阅读 2021-04-19 14:23:53
    weston-screenshooter和weston-screensaver分别用于截屏和屏保,它们都是有需要才由Weston启动的。前者在截屏快捷键按下时启动,后者在需要锁屏时启动。 另外,Weston启动时会读取weston.ini这个配置文件,其中可以...

    先来简单说一下X11 和Wayland的区别:

          x11是一个很古老的系统,有了几十年的历史,一开始设计之初,是受限于个人电脑的弱小,所以将所有渲染相关的计算都放在服务端,所谓的X Server. 所有的客户端可以试运行在本地的,也可以试运行在网络上的,称之为客户端XClient. X Server和XClient通信的手段就是X Protocol. 所有的客户端接收到鼠标,键盘等等事件,都要通知Server,然后Server经过计算,通知Driver进行描画。这在当时是唯一可行的方式,但是在现在看来却过时了。因为客户端也有很强大的渲染能力

          所以Wayland诞生了。Wayland的原理是,所有的渲染都发生在客户端,客户端接收到输入事件之后,自行计算需要渲染的区域,然后再内存中开辟一段(可以是共享内存,也可以是显存,取决于实际硬件),然后将绘制好的图像放入buffer中,然后通知Wayland的Server,称之为 Compositor,Compositor会监听所有client的请求,然后做一件很简单的工作,就是把Client绘制好的图片合成一下,然后发送到渲染器渲染就行了。这样就大大减少了Client和Server的频繁交互和数据传递。效率大大提高

    简单地说,Wayland是一套display server(Wayland compositor)与client间的通信协议,而Weston是Wayland compositor的参考实现。其官网为http://wayland.freedesktop.org/

          它们定位于在Linux上替换X图形系统。X图形系统经历了30年左右的发展,其设计在今天看来已略显陈旧。在X系统中,X Server作为中心服务,连接client和硬件以及compositor。但时至今日,原本在X Server中做的事很多已被移到kernel或者单独的库中因此X Server就显得比较累赘了。Wayland在架构上去掉了这个中间层,将compositor作为display server,使client与compositor直接通信从而在灵活性和性能等方面上能够比前辈更加出色

    Wayland既可以用于传统的桌面又适用于移动设备,已经被用于Tizen,Sailfish OS等商业操作系统,同时越来越多的窗口和图形系统开始兼容Wayland协议。Wayland基于domain socket实现了一套display server与client间通信的库(简单的基于例子的介绍可以参见http://blog.csdn.net/jinzhuojun/article/details/40264449),并且以XML形式定义了一套可扩展通信协议。这个协议分为Wayland核心协议和扩展协议(位于Weston中)。Weston作为Wayland compositor的参考实现,一般和Wayland同步发布。其它Wayland compositor实现还有如mutter, Kwin, Lipstick, Enlightenment, Clayland等。

    下面分别从架构,源码及模块结构,渲染流水线,窗口和输入管理几个方面介绍下Wayland/Weston的实现。

    架构

    Wayland的系统体系架构可以参见官方文档或者https://zgdy-czg.blog.csdn.net/article/details/115760945 这里不再累述。Weston从内部体系结构来看,主要分为窗口管理(shell)合成器(compositor)输入管理几个部分。

    可见,如果拿Android作类比,从功能上看它等同于InputManagerServiceWindowManagerServiceSurfaceFlinger

    从大体的流程上来看,输入管理模块接受用户输入,然后一方面shell作出相应的窗口管理操作(如窗口堆栈的改变focus的变化等),另一方面将该input event传给之前注册了相应输入事件的client。client收到后会在handler中做相应动作,如调整视图然后重绘。如有重绘发生,新buffer渲染完成后client将其handle传给server,接着server端生成z-order序的窗口列表,之后compositor用renderer进行合成最后输出(比如到framebuffer)。

    \

    Weston是主要服务进程,它的事件处理模型采用的是典型的Reactor模式。根据Linux中万物皆文件的原则,主循环通过epoll机制等待在一系列的文件fd上。这种模型与基于线程的binder不同,是一种串行的事件处理模型。在此模型上的过程调用在不加额外同步机制的情况下是异步的。好处是不会有竞争问题,数据同步开销较小。缺点是当有一个事件处理比较耗时或者在等待IO,则有可能使整个系统性能下降或响应不及时。

    \

    主循环上等待的几个核心fd包括:
    • Server/Client通信:listener fd在Weston启动时建立,并一直监听新的client连接。一个client连接后会与Weston建立一对domain socket,Wayland就是基于它来通信的
    • 输入处理:一方面通过udev monitor监听设备的添加删除事件。另一方面如有新设备添加时会将该设备打开并监听该fd来得到输入事件
    • 其它:监听如timer(用于如睡眠锁屏等场景)和signal(如收到SIGINT, SIGTERM, SIGQUIT时退出主循环)等事件。timer和signal可以分别用timerfd和signalfd来用fd来表示。另外还有logind的dbus连接等。
    除这些外,在event loop中还会维护一个idle list。Weston中需要异步处理的操作可以放在其中。每轮循环都会检查其中是否有任务,有的话拿出来执行。

    下面看下Weston的运行时进程模型。Weston设计时是可以用一般用户运行的,但就需要用weston-launch来启动。当需要进行一些需要root权限的工作,比如关于DRM, TTY, input device的相关操作,就交由weston-launch去做。

    Weston会在启动时或按需起一些子进程,它们本质上是Weston的client,它们会通过专用的协议做一些系统应用的工作。如系统应用weston-desktop-shell负责一些系统全局的界面,比如panel, background, cursor, app launcher, lock screen等。它不作为Weston服务本身的一部分,而是作为一个client。其作用有点类似于Android中的SystemUI。这样便可方便地替换成定制的界面。weston-keyboard是软键盘面板。weston-screenshooter和weston-screensaver分别用于截屏屏保,它们都是有需要才由Weston启动的。前者在截屏快捷键按下时启动,后者在需要锁屏时启动。

    \

    另外,Weston启动时会读取weston.ini这个配置文件,其中可以配置桌面,动画和后端等等信息。详细配置见http://manpages.ubuntu.com/manpages/raring/man5/weston.ini.5.html

    源码与模块结构

    wayland/weston/libinput等项目源码位于http://cgit.freedesktop.org/wayland下。

    Wayland的协议定义在protocol目录,通信协议实现在src目录。

    它主要编译出三个库,libwayland-client,libwayland-server和libwayland-cursor

    第一个为协议的client端实现,第二个为协议的server端实现,第三个是协议中鼠标相关处理实现。

    编译时会首先编译出wayland-scanner这个可执行文件,它利用expat这个库来解析xml文件,将wayland.xml生成相应的wayland-protocol.cwayland-client-protocol.hwayland-server-protocol.h它们会被Wayland的client和server在编译时用到。同时wayland-scanner也需要在生成Weston中的Wayland扩展协议中起同样作用。

    \

    Wayland主要依赖于两个库,一个上面提到的expat协议,另一个libffi用于在跨进程过程调用中根据函数描述生成相应calling convention跳板代码

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Weston的主要实现在src目录下。与Wayland类似,protocol目录下放着Wayland协议定义。在clients目录下是一些client的例子,也包括了desktop-shell和keyboard等核心client的例子,也包含了如simple-egl, simple-shm, simple-touch等针对性的简单用例。

    Weston启动过程中会分别加载几个backend(后端):shell backendrender backendcompositor backend。它们分别用于窗口管理合成渲染合成内容输出

    \

    由于这些后端都有不同的实现,为了逻辑上的独立性和结构上的灵活性,他们都编译成动态链接库从而可以在Weston初始化时被加载进来。这种方式在Weston中被广泛采用,一些功能比如屏幕共享等都是以这种形式加载的。

    举例来说,compositor backend主要决定了compositor合成完后的结果怎么处置。从数据结构上,weston_output是output设备的抽象,而下面的backend会实现具体的output设备。
    fbdev:直接输出至linux的framebuffer设备。接口通用。
    • headless:和noop-renderer配合使用,可以在没有窗口系统的机子(比如server上)测试逻辑。
    • RPI:用于Raspberry Pi平台。
    • RDP:合成后通过RDP传输到RDP peer显示,用于远程桌面。
    DRM:Direct redering manager,桌面上一般用这个。
    x11:Wayland compositor作为X server的client。它可以让Wayland client运行在X11上。
    wayland:Wayland composiotr作为server同时,也作为另一个Wayland compositor的client。用于nested compositor。

    Renderer backend主要作为compositor的合成之用,除去noop-renderer外,有gl-renderer和pixman-renderer两种。前者为GPU硬件渲染,后者为软件渲染。shell backend用于实现具体的窗口管理。相应的实现分别在desktop-shell,fullscreen-shell和ivi-shell目录中。

    Wayland/Weston运行时依赖的库主要有下面几个,其相互关系大体如下。

    \

    libEGL, libGLES:本地窗口系统与图形driver的glue layer,mesa提供了开源版本的实现。
    libdrm:封装KMS,GEM等图形相关接口。平台相关。
    libffi:用于在运行时根据调用接口描述生成函数跳板并调用。
    pixman:用于像素操作的库,包括region, box等计算。用了许多平台相关的优化。
    cairo:软件渲染库,类似于skia。也有OpenGL后端。
    libinput:输入处理,依赖于mtdev, libudev, libevdev等库。
    libxkbcommon:主要用于键盘处理。
    libjpeg, libpng, libwebp:用于加载各种图片文件,像壁纸,面板和鼠标等都需要。

    渲染流水线

    一个Wayland client要将内存渲染到屏幕上,首先要申请一个graphic buffer绘制完后传给Wayland compositor并通知其重绘。Wayland compositor收集所有Wayland client的请求,然后以一定周期把所有提交的graphic buffer进行合成,合成完后进行输出。

    本质上,client需要将窗口内容绘制到一个和compositor共享的buffer上。这个buffer可以是普通共享内存,也可以是DRM中的GBM或是gralloc提供的可供硬件(如GPU)操作的graphic buffer。在大多数移动平台上,没有专门的显存,因此它们最终都来自系统内存,区别在于图形加速硬件一般会要求物理连续且符合对齐要求的内存。如果是普通共享内存,一般是物理不连续的,多数情况用于软件渲染。有些图形驱动也支持用物理不连续内存做硬件加速,但效率相对会低一些。根据buffer类型的不同client可以选择自己绘制,或是通过Cairo,OpenGL绘制,或是更高层的如Qt,GTK+这些widget库等绘制。绘制完后client将buffer的handle以及需要重绘的区域传给server。在server端,compositor将该buffer转为纹理(如果是共享内存使用glTexImage2D上传纹理,硬件加速buffer用GL_OES_EGL_image_external扩展生成外部纹理)。最后将其与其它的窗口内容进行合成。下面是抽象的流程图。

    \


    注意Wayland设计中默认buffer是从client端分配的。这和Android中在server端分配buffer的策略是不同的。

    这样,client可以自行设计buffer的管理策略。理论上,client可以始终只用一块buffer,但因为这块buffer在client和server同时访问会产生竞争,所以一般client端都会实现buffer queue

    流水线上比较关键的一环是buffer跨进程的传输,也就是client和server间的有效传递。buffer当然不可能通过拷贝传输,因此这里只会传handle,本质上是传buffer的fd。我们知道fd是per-process的。而可以传递fd的主要IPC机制有binder, domain socket和pipe等

    Wayland底层用的是domain socket,因此可以用于传fd。

    在这条流水线上,可以看到,client和server端都会发生绘制。client绘制本地的窗口内容,server端主要用于合成时渲染。注意两边都可独立选择用软件或者硬件渲染

    现在的商用设备上,多是硬件加速渲染。和Android上的SurfaceFlinger和Ubuntu上的Mir一样,Wayland同样基于EGL接口。EGL用于将本地窗口系统与OpenGL关联起来,与WGL, GLX等作用类似,只是它是用于Embedded platform的。在Wayland/Weston系统中,Wayland定义了用于EGL的窗口抽象,来作为EGL stack(也就是厂商的图形驱动)和Wayland协议的glue layer。它对EGL进行了扩展,增加了比如eglBindWaylandDisplayWL, eglUnbindWaylandDisplayWL, eglQueryWaylandBufferWL等接口,对Wayland友好的EGL库应该提供它们的实现,也就是说要提供Wayland EGL platform,比如mesa(src/egl/main/eglapi.c中)。另一种做法是像libhybris中eglplatform一样通过EGL wrapper的方式加上这些支持(hybris/egl/platforms/common/eglplatformcommon.cpp)。同时,EGL stack需要提供厂商相关的协议扩展使client能与compositor共享buffer。wayland-egl库提供了Wayland中surface和EGL粘合的作用。一个要用硬件加速的EGL window可以基于Wayland的surface创建,即通过wayland-egl提供的接口创建wl_egl_window。wl_egl_window结构中包含了wl_surface,然后wl_egl_window就可以被传入EGL的eglCreateWindowSurface()接口。这样就将Wayland surface与EGL stack联系在一起了。

    窗口管理

    前面提到,buffer需要有surface为载体,这个surface可以理解为一个窗口的绘制表面。如果一个Wayland client的窗口要被窗口管理器(Shell)所管理,则需要为这个surface创建相应的shell surface。理一下这里相关的几个核心概念:surfaceviewshell surface。首先,surface是Weston中的核心数据结构之一。Surface代表Wayland client的一个绘图表面。Client通过将画好的buffer attach到surface上来更新窗口,因此说surface是buffer的载体

    在Weston中,shell是窗口管理器,因此一个surface要想被窗口管理器管理,需要创建相应的shell surface。同时shell surface对应的其实是surface的一个view。view是surface的一个视图。换句话说,同一个surface理论上可以有多个view,因此weston_surface结构中有view的列表。这里和我们逻辑上的窗口的概念最近似的是view,因为它对应用户所看到的一个窗口。而当surface与view是1:1关系时(绝大多数情况下),surface也可近似等同于窗口。在server端它们的数据结构是相互关联的。

    \

    如果从Server/Client角度,它们的相互对应关系如下:

    \

     

    另外subsurface可以作为surface的附属绘图表面,它与父surface保持关联,但拥有独立的绘图surface,类似于Android中的SurfaceView,作用也是类似。主要用于Camera,Video等应用。

    窗口管理不是直接管理view,而是分为两层进行管理。Layer是中间层,系统中的layer大体有下面几个,按从上到下顺序为:
    • Fade layer
    • Lock layer
    • Cursor layer
    • Input panel layer
    • Fullscreen layer
    • Panel layer
    Workspace layers
    • Background layer


    其中的workspace layer是一个数组,默认是一个,也可以有多个,其数量可以在weston.ini中指定。大部分的普通应用窗口就是在这个layer中。这些layer被串成list。每次在要做合成时,会首先将这些layer的view按顺序合并到一个view list中。这样,在composition过程中compositor只需访问这个view list。

    \

    可以看到,这是一个二层有序列表合成一个有序列表的过程。这和Android中的WMS通过为每种类型的窗口定义一段z轴区域的原理类似。WMS中每个类型的窗口对定一个基数(定义在WindowManager.java),它会乘以乘数再加上偏移从而得到z轴上的区域边界。区别在于Weston中不是以数值而是有序列表表示z-order。结合具体的数据结构:

    \


     

    输入管理

    为了提高输入管理部分的重用性模块性。Weston将对输入设备(键盘,鼠标,触摸屏等)的处理分离到一个单独的库,也就是libinput中。这样,其它的图形处理系统也可以共用这部分,比如X.Org Server和Mir。

    具体地,它提供了设备检测设备处理输入事件处理等基本功能,类似于Android中的EventHub。此外它还有pointer acceleration,touchpad support及gesture recognition等功能。libinput更像是一个框架,它将几个更底层的库的功能整合起来。它主要依赖于以下几个库:
    mtdev:Multi-touch设备处理,比如它会将不带tracking ID的protocol A转化为protocol B
    libevdev处理kernel中evdev模块对接。
    libudev:主要用于和udevd的通信,从而获取设备的增加删除事件。也可从kernel获取。

    Weston中的输入管理模块与libinput对接,它实现了两大部分的功能:一是对输入设备的维护二是对输入事件的处理。对于输入事件既会在Weston中做处理,也会传给相应的client。从事件处理模型上来看,libinput的主循环监听udev monitor fd,它主要用于监听设备的添加删除事件。如果有设备添加,会打开该设备并把fd加入到libinput的主循环上。另一方面,Weston中会将libinput的epoll fd加入主循环。这样形成级联的epoll,无论是udev monitor还是input device的fd有事件来,都会通知到Weston和libinput的主循环。这些事件通过libinput中的事件缓冲队列存储,而Weston会作为消费者从中拿事件并根据事件类型进行处理。

    \

     

    Weston中支持三种输入设备,分别是键盘触摸鼠标。一套输入设备属于一个seat(严格来说,seat中包括一套输入输出设备)。因此,weston_seat中包含weston_keyboardweston_pointerweston_touch三个结构。系统中可以有多个seat,它们的结构被串在weston_compositor的seat_list链表中。相应的数据结构如下。

    \

    可以看到,对于焦点处理,每个设备有自己的focus,它指向焦点窗口,用于拖拽和输入等。成员focus_resource_list中包含了焦点窗口所在client中输入设备proxy对应的resource对象。在这个list中意味着可以接收到相应的事件。

    最后,Wayland/Weston作为正在活跃开发的项目,还有其它很多功能已被加入或正被加入进来。本文只是粗线条的介绍了Wayland/Weston主要结构及功能,具体细节之后再展开。

     

    展开全文
  • man weston WESTON(1) General Commands Manual WESTON(1) NAME weston - the reference Wayland ...

     man weston

    WESTON(1)                                                                              General Commands Manual                                                                              WESTON(1)
    
    NAME
           weston - the reference Wayland server
    
    SYNOPSIS
           weston
    
    DESCRIPTION
           weston  is the reference implementation of a Wayland server. A Wayland server is a display server, a window manager, and a compositor all in one. Weston has several backends as loadable mod‐
           ules: it can run on Linux KMS (kernel modesetting via DRM), as an X client, or inside another Wayland server instance.
    
           Weston supports fundamentally different graphical user interface paradigms via shell plugins. Two plugins are provided: the desktop shell, and the tablet shell.
    
           When weston is started as the first windowing system (i.e. not under X nor under another Wayland server), it should be done with the command weston-launch to set up proper privileged  access
           to devices. If your system supports the logind D-Bus API and the support has been built into weston as well, it is possible to start weston with just weston.
    
           Weston also supports X clients via XWayland, see below.
    
    BACKENDS
           drm-backend.so
                  The DRM backend uses Linux KMS for output and evdev devices for input.  It supports multiple monitors in a unified desktop with DPMS. See weston-drm(7), if installed.
    
           wayland-backend.so
                  The Wayland backend runs on another Wayland server, a different Weston instance, for example. Weston shows up as a single desktop window on the parent server.
    
           x11-backend.so
                  The X11 backend runs on an X server. Each Weston output becomes an X window. This is a cheap way to test multi-monitor support of a Wayland shell, desktop, or applications.
    
           rdp-backend.so
                  The  RDP  backend  runs  in memory without the need of graphical hardware. Access to the desktop is done by using the RDP protocol. Each connecting client has its own seat making it a
                  cheap way to test multi-seat support. See weston-rdp(7), if installed.
    
    SHELLS
           Each of these shells have its own public protocol interface for clients.  This means that a client must be specifically written for a shell protocol, otherwise it will not work.
    
           Desktop shell
                  Desktop shell is like a modern X desktop environment, concentrating on traditional keyboard and mouse user interfaces and the familiar desktop-like window  management.  Desktop  shell
                  consists of the shell plugin desktop-shell.so and the special client weston-desktop-shell which provides the wallpaper, panel, and screen locking dialog.
    
           Fullscreen shell
                  Fullscreen shell is intended for a client that needs to take over whole outputs, often all outputs. This is primarily intended for running another compositor on Weston. The other com‐
                  positor does not need to handle any platform-specifics like DRM/KMS or evdev/libinput.  The shell consists only of the shell plugin fullscreen-shell.so.
    
           IVI-shell
                  In-vehicle infotainment shell is a special purpose shell that exposes a GENIVI Layer Manager compatible API to controller modules, and a very simple shell  protocol  towards  clients.
                  IVI-shell starts with loading ivi-shell.so, and then a controller module which may launch helper clients.
    
    XWAYLAND
           XWayland  requires  a  special X.org server to be installed. This X server will connect to a Wayland server as a Wayland client, and X clients will connect to the X server. XWayland provides
           backwards compatibility to X applications in a Wayland stack.
    
           XWayland is activated by instructing weston to load the XWayland module, see EXAMPLES.  Weston starts listening on a new X display socket, and exports it in the environment variable DISPLAY.
           When the first X client connects, Weston launches a special X server as a Wayland client to handle the X client and all future X clients.
    
           It has also its own X window manager where cursor themes and sizes can be chosen using XCURSOR_PATH and XCURSOR_SIZE environment variables. See ENVIRONMENT.
    
    OPTIONS
       Weston core options:
           -Bbackend.so, --backend=backend.so
                  Load backend.so instead of the default backend. The file is searched for in /home/maze/Wayland/install/lib/x86_64-linux-gnu/weston, or you can pass an absolute path. The default back‐
                  end is drm-backend.so unless the environment suggests otherwise, see DISPLAY and WAYLAND_DISPLAY.
    
           -cconfig.ini, --config=config.ini
                  Load config.ini instead of weston.ini.  The argument can also be an absolute path starting with a /.  If the path is not absolute, it will be searched in the normal config paths,  see
                  weston.ini(5).  If also --no-config is given, no configuration file will be read.
    
           --debug
                  Enable debug protocol extension weston_debug_v1 which any client can use to receive debugging messages from the compositor.
    
                  WARNING:  This  is  risky for two reasons. First, a client may cause a denial-of-service blocking the compositor by providing an unsuitable file descriptor, and second, the debug mes‐
                  sages may expose sensitive information.  Additionally this will expose weston-screenshooter interface allowing the user to take screenshots of the outputs  using  weston-screenshooter
                  application, which can lead to silently leaking the output contents.  This option should not be used in production.
    
           -lscope1,scope2, --logger-scopes=scope1,scope2
                  Specify to which log scopes should subscribe to. When no scopes are supplied, the log "log" scope will be subscribed by default. Useful to control which streams to write data into the
                  logger and can be helpful in diagnosing early start-up code.
    
           -fscope1,scope2, --flight-rec-scopes=scope1,scope2
                  Specify to which scopes should subscribe to. Useful to control which streams to write data into the flight recorder. Flight recorder has limited space, once  the  flight  recorder  is
                  full new data will overwrite the old data. Without any scopes specified, it subscribes to 'log' and 'drm-backend' scopes.
    
           --version
                  Print the program version.
    
           -h, --help
                  Print a summary of command line options, and quit.
    
           -iN, --idle-time=N
                  Set the idle timeout to N seconds. The default timeout is 300 seconds. When there has not been any user input for the idle timeout, Weston enters an inactive mode. The screen fades to
                  black, monitors may switch off, and the shell may lock the session.  A value of 0 effectively disables the timeout.
    
           --log=file.log
                  Append log messages to the file file.log instead of writing them to stderr.
    
           --xwayland
                  Ask Weston to load the XWayland module.
    
           --modules=module1.so,module2.so
                  Load the comma-separated list of modules. Only used by the test suite. The file is searched for in /home/maze/Wayland/install/lib/x86_64-linux-gnu/weston, or you can pass an  absolute
                  path.
    
           --no-config
                  Do not read weston.ini for the compositor. Avoids e.g. loading compositor modules via the configuration file, which is useful for unit tests.
    
           -Sname, --socket=name
                  Weston  will  listen  in the Wayland socket called name.  Weston will export WAYLAND_DISPLAY with this value in the environment for all child processes to allow them to connect to the
                  right server automatically.
    
           --wait-for-debugger
                  Raises SIGSTOP before initializing the compositor. This allows the user to attach with a debugger and continue execution by sending SIGCONT. This is useful for debugging  a  crash  on
                  start-up when it would be inconvenient to launch weston directly from a debugger. There is also a weston.ini option to do the same.
    
       DRM backend options:
           See weston-drm(7).
    
       Wayland backend options:
           --display=display
                  Name of the Wayland display to connect to, see also WAYLAND_DISPLAY of the environment.
    
           --fullscreen
                  Create a single fullscreen output
    
           --output-count=N
                  Create N Wayland windows to emulate the same number of outputs.
    
           --width=W, --height=H
                  Make all outputs have a size of WxH pixels.
    
           --scale=N
                  Give all outputs a scale factor of N.
    
           --use-pixman
                  Use  the  pixman  renderer.   By  default, weston will try to use EGL and GLES2 for rendering and will fall back to the pixman-based renderer for software compositing if EGL cannot be
                  used.  Passing this option will force weston to use the pixman renderer.
    
       X11 backend options:
           --fullscreen
    
           --no-input
                  Do not provide any input devices. Used for testing input-less Weston.
    
           --output-count=N
                  Create N X windows to emulate the same number of outputs.
    
           --width=W, --height=H
                  Make the default size of each X window WxH pixels.
    
           --scale=N
                  Give all outputs a scale factor of N.
    
           --use-pixman
                  Use the pixman renderer.  By default weston will try to use EGL and GLES2 for rendering.  Passing this option will make weston use the pixman library for software compsiting.
    
       RDP backend options:
           See weston-rdp(7).
    
    FILES
           If the environment variable is set, the configuration file is read from the respective path.
    
           $XDG_CONFIG_HOME/weston.ini
           $HOME/.config/weston.ini
    
    ENVIRONMENT
           DISPLAY
                  The X display. If DISPLAY is set, and WAYLAND_DISPLAY is not set, the default backend becomes x11-backend.so.
    
           WAYLAND_DEBUG
                  If set to any value, causes libwayland to print the live protocol to stderr.
    
           WAYLAND_DISPLAY
                  The name of the display (socket) of an already running Wayland server, without the path. The directory path is always taken from XDG_RUNTIME_DIR.  If WAYLAND_DISPLAY is not  set,  the
                  socket name is "wayland-0".
    
                  If WAYLAND_DISPLAY is already set, the default backend becomes wayland-backend.so.  This allows launching Weston as a nested server.
    
           WAYLAND_SOCKET
                  For Wayland clients, holds the file descriptor of an open local socket to a Wayland server.
    
           WESTON_CONFIG_FILE
                  Weston sets this variable to the absolute path of the configuration file it loads, or to the empty string if no file is used. Programs that use weston.ini will read the file specified
                  by this variable instead, or do not read any file if it is empty. Unset variable causes falling back to the default name weston.ini.
    
           XCURSOR_PATH
                  Set the list of paths to look for cursors in. It changes both libwayland-cursor and libXcursor, so it affects both Wayland and X11 based clients. See xcursor (3).
    
           XCURSOR_SIZE
                  This variable can be set for choosing an specific size of cursor. Affect Wayland and X11 clients. See xcursor (3).
    
           XDG_CONFIG_HOME
                  If set, specifies the directory where to look for weston.ini.
    
           XDG_RUNTIME_DIR
                  The directory for Weston's socket and lock files.  Wayland clients will automatically use this.
    
    BUGS
           Bugs should be reported to the freedesktop.org bugzilla at https://bugs.freedesktop.org with product "Wayland" and component "weston".
    
    WWW
           http://wayland.freedesktop.org/
    
    EXAMPLES
           Launch Weston with the DRM backend on a VT
                  weston-launch
    
           Launch Weston with the DRM backend and XWayland support
                  weston-launch -- --xwayland
    
           Launch Weston (wayland-1) nested in another Weston instance (wayland-0)
                  WAYLAND_DISPLAY=wayland-0 weston -Swayland-1
    
           From an X terminal, launch Weston with the x11 backend
                  weston
    
    SEE ALSO
           weston-bindings(7), weston-debug(1), weston-drm(7), weston-rdp(7), weston.ini(5)
    
    Weston 9.0.90                                                                                 2019-03-23                                                                                    WESTON(1)
    
    1. weston作为display-sever window-manager compositor三者合一的server,显示,窗口管理,合成
    2. 关于drm-backend.so 输出是kms,输入是evdev
    3. 关于socket,这个可以实现多个weston同时存在[多个weston的存在,监听不同的socket,对应不同的/dev/dri/cardX]
      1. 我告诉weston我有多块显卡[因为基于drm-backend的weston与driver的约定接口是/dev/dri/cardX]
      2. 启动多个weston,对应的client使用不同的socket,使用的功能方式可以是多种多样的[因为weston与client的约定接口是socket]
    4. 关于debug 
    • 1.--debug方法的使用,对应weston-debug工具一起用
    • 2.--wait-for-debugger工具的使用
    • 3.WAYLAND_DEBUG环境变量的使用,打印的是libwayland的protocol

    ==========

    man weston.ini 

    weston.ini(5)                                                                            File Formats Manual                                                                            weston.ini(5)
    
    NAME
           weston.ini - configuration file for Weston - the reference Wayland compositor
    
    INTRODUCTION
           Weston obtains configuration from its command line parameters and the configuration file described here.
    
    DESCRIPTION
           Weston uses a configuration file called weston.ini for its setup.  The weston.ini configuration file is searched for in one of the following places when the server is started:
    
               $XDG_CONFIG_HOME/weston.ini   (if $XDG_CONFIG_HOME is set)
               $HOME/.config/weston.ini      (if $HOME is set)
               weston/weston.ini in each
                   $XDG_CONFIG_DIR           (if $XDG_CONFIG_DIRS is set)
               /etc/xdg/weston/weston.ini    (if $XDG_CONFIG_DIRS is not set)
    
           where environment variable $HOME is the user's home directory, and $XDG_CONFIG_HOME is the user specific configuration directory, and $XDG_CONFIG_DIRS is a colon ':' delimited listed of con‐
           figuration base directories, such as /etc/xdg-foo:/etc/xdg.
    
           The weston.ini file is composed of a number of sections which may be present in any order, or omitted to use default configuration values. Each section has the form:
    
               [SectionHeader]
               Key1=Value1
               Key2=Value2
                   ...
    
           The spaces are significant.  Comment lines are ignored:
    
               #comment
    
           The section headers are:
    
               core           The core modules and options
               libinput       Input device configuration
               shell          Desktop customization
               launcher       Add launcher to the panel
               output         Output configuration
               input-method   Onscreen keyboard input
               keyboard       Keyboard layouts
               terminal       Terminal application options
               xwayland       XWayland options
               screen-share   Screen sharing options
    
           Possible value types are string, signed and unsigned 32-bit integer, and boolean. Strings must not be quoted, do not support any escape sequences, and run till the end of the line.  Integers
           can be given in decimal (e.g. 123), octal (e.g. 0173), and hexadecimal (e.g. 0x7b) form. Boolean values can be only 'true' or 'false'.
    
    CORE SECTION
           The core section is used to select the startup compositor modules and general options.
    
           shell=desktop-shell.so
                  specifies  a  shell  to  load  (string).  This  can  be  used  to  load  your  own  implemented  shell  or  one  with Weston as default. Available shells in the /home/maze/Wayland/in‐
                  stall/lib/x86_64-linux-gnu/weston directory are:
    
                     desktop-shell.so
    
           xwayland=true
                  ask Weston to load the XWayland module (boolean).
    
           modules=cms-colord.so,screen-share.so
                  specifies the modules to load (string). Available modules in the /home/maze/Wayland/install/lib/x86_64-linux-gnu/weston directory are:
    
                     cms-colord.so
                     screen-share.so
    
           backend=headless-backend.so
                  overrides defaults backend. Available backend modules in the /home/maze/Wayland/install/lib/x86_64-linux-gnu/libweston-10 directory are:
    
                     drm-backend.so
                     fbdev-backend.so
                     headless-backend.so
                     rdp-backend.so
                     wayland-backend.so
                     x11-backend.so
    
           repaint-window=N
                  Set the approximate length of the repaint window in milliseconds. The repaint window is used to control and reduce the output latency for clients. If the window  is  longer  than  the
                  output refresh period, the repaint will be done immediately when the previous repaint finishes, not processing client requests in between. If the repaint window is too short, the com‐
                  positor may miss the target vertical blank, increasing output latency. The default value is 7 milliseconds. The allowed range is from -10 to 1000 milliseconds. Using a negative  value
                  will force the compositor to always miss the target vblank.
    
           gbm-format=format
                  sets the GBM format used for the framebuffer for the GBM backend. Can be xrgb8888, xrgb2101010, rgb565.  By default, xrgb8888 is used.
    
           idle-time=seconds
                  sets Weston's idle timeout in seconds. This idle timeout is the time after which Weston will enter an "inactive" mode and screen will fade to black. A value of 0 disables the timeout.
    
                  Important  :  This  option  may also be set via Weston's '-i' command line option and will take precedence over the current .ini option. This means that if both weston.ini and command
                  line define this idle-timeout time, the one specified in the command-line will be used. On the other hand, if none of these sets the value, default idle timeout will  be  set  to  300
                  seconds.
    
           require-input=true
                  require an input device for launch
    
           pageflip-timeout=milliseconds
                  sets Weston's pageflip timeout in milliseconds.  This sets a timer to exit gracefully with a log message and an exit code of 1 in case the DRM driver is non-responsive.  Setting it to
                  0 disables this feature.
    
           wait-for-debugger=true
                  Raises SIGSTOP before initializing the compositor. This allows the user to attach with a debugger and continue execution by sending SIGCONT. This is useful for debugging  a  crash  on
                  start-up when it would be inconvenient to launch weston directly from a debugger. Boolean, defaults to false.  There is also a command line option to do the same.
    
           remoting=remoting-plugin.so
                  specifies  a  plugin for remote output to load (string). This can be used to load your own implemented remoting plugin or one with Weston as default. Available remoting plugins in the
                  __libweston_modules_dir__ directory are:
    
                     remoting-plugin.so
    
           use-pixman=true
                  Enables pixman-based rendering for all outputs on backends that support it.  Boolean, defaults to false.  There is also a command line option to do the same.
    
    LIBINPUT SECTION
           The libinput section is used to configure input devices when using the libinput input device backend. The defaults are determined by libinput and vary according to what is most sensible  for
           any given device.
    
           Available configuration are:
    
           enable-tap=false
                  Enables tap to click on touchpad devices.
    
           tap-and-drag=false
                  For  touchpad  devices  with  enable-tap enabled. If the user taps, then taps a second time, this time holding, the virtual mouse button stays down for as long as the user keeps their
                  finger on the touchpad, allowing the user to click and drag with taps alone.
    
           tap-and-drag-lock=false
                  For touchpad devices with enable-tap and tap-and-drag enabled.  In the middle of a tap-and-drag, if the user releases the touchpad for less than a certain number of milliseconds, then
                  touches it again, the virtual mouse button will remain pressed and the drag can continue.
    
           disable-while-typing=true
                  For devices that may be accidentally triggered while typing on the keyboard, causing a disruption of the typing.  Disables them while the keyboard is in use.
    
           middle-button-emulation=false
                  For pointer devices with left and right buttons, but no middle button.  When enabled, a middle button event is emitted when the left and right buttons are pressed simultaneously.
    
           left-handed=false
                  Configures  the  device  for  use  by  left-handed  people.  Exactly what this option does depends on the device. For pointers with left and right buttons, the buttons are swapped. On
                  tablets, the tablet is logically turned upside down, because it will be physically turned upside down.
    
           rotation=n
                  Changes the direction of the logical north, rotating it n degrees clockwise away from the default orientation, where n is a whole number between 0 and 359 inclusive. Needed for track‐
                  balls, mainly. Allows the user to orient the trackball sideways, for example.
    
           accel-profile={flat,adaptive}
                  Set  the  pointer  acceleration  profile.  The pointer's screen speed is proportional to the physical speed with a certain constant of proportionality.  Call that constant alpha. flat
                  keeps alpha fixed. See accel-speed.  adaptive causes alpha to increase with physical speed, giving the user more control when the speed is slow, and more reach when the speed is high.
                  adaptive is the default.
    
           accel-speed=v
                  If  accel-profile  is  set to flat, it simply sets the value of alpha.  If accel-profile is set to adaptive, the effect is more complicated, but generally speaking, it will change the
                  pointer's speed.  v is normalised and must lie in the range [-1, 1]. The exact mapping between v and alpha is hardware-dependent, but higher values cause higher cursor speeds.
    
           natural-scroll=false
                  Enables natural scrolling, mimicking the behaviour of touchscreen scrolling.  That is, if the wheel, finger, or fingers are moved down, the surface is scrolled up instead of down,  as
                  if the finger, or fingers were in contact with the surface being scrolled.
    
           scroll-method={two-finger,edge,button,none}
                  Sets  the  scroll  method.  two-finger  scrolls with two fingers on a touchpad. edge scrolls with one finger on the right edge of a touchpad.  button scrolls when the pointer is moved
                  while a certain button is pressed. See scroll-button. none disables scrolling altogether.
    
           scroll-button={BTN_LEFT,BTN_RIGHT,BTN_MIDDLE,...}
                  For devices with scroll-method set to button. Specifies the button that will trigger scrolling. See /usr/include/linux/input-event-codes.h for the complete list of possible values.
    
           touchscreen_calibrator=true
                  Advertise the touchscreen calibrator interface to all clients. This is a potential denial-of-service attack vector, so it should only be enabled on  trusted  userspace.  Boolean,  de‐
                  faults to false.
    
                  The  interface  is required for running touchscreen calibrator applications. It provides the application raw touch events, bypassing the normal touch handling.  It also allows the ap‐
                  plication to upload a new calibration into the compositor.
    
                  Even though this option is listed in the libinput section, it does affect all Weston configurations regardless of the used backend. If the backend does not use libinput, the interface
                  can still be advertised, but it will not list any devices.
    
           calibration_helper=/bin/echo
                  An optional calibration helper program to permanently save a new touchscreen calibration. String, defaults to unset.
    
                  The  given  program  will  be  executed with seven arguments when a calibrator application requests the server to take a new calibration matrix into use.  The program is executed syn‐
                  chronously and will therefore block Weston for its duration. If the program exit status is non-zero, Weston will not apply the new calibration. If the helper is unset or  the  program
                  exit status is zero, Weston will use the new calibration immediately.
    
                  The program is invoked as:
    
                     calibration_helper syspath m1 m2 m3 m4 m5 m6
    
                  where  syspath is the udev sys path for the device and m1  through m6 are the calibration matrix elements in libinput's LIBINPUT_CALIBRATION_MATRIX udev property format.  The sys path
                  is an absolute path and starts with the sys mount point.
    
    SHELL SECTION
           The shell section is used to customize the compositor. Some keys may not be handled by different shell plugins.
    
           The entries that can appear in this section are:
    
           client=file
                  sets the path for the shell client to run. If not specified weston-desktop-shell is launched (string).
    
           background-image=file
                  sets the path for the background image file (string).
    
           background-type=tile
                  determines how the background image is drawn (string). Can be centered, scale, scale-crop or tile (default).  Centered shows the image once centered. If the image is smaller than  the
                  output, the rest of the surface will be in background color. If the image size does fit the output it will be cropped left and right, or top and bottom.  Scale means scaled to fit the
                  output precisely, not preserving aspect ratio.  Scale-crop preserves aspect ratio, scales the background image just big enough to cover the output, and centers it. The image  ends  up
                  cropped from left and right, or top and bottom, if the aspect ratio does not match the output. Tile repeats the background image to fill the output.
    
           background-color=0xAARRGGBB
                  sets the color of the background (unsigned integer). The hexadecimal digit pairs are in order alpha, red, green, and blue.
    
           clock-format=format
                  sets the panel clock format (string). Can be none, minutes, seconds.  By default, minutes format is used.
    
           panel-color=0xAARRGGBB
                  sets the color of the panel (unsigned integer). The hexadecimal digit pairs are in order transparency, red, green, and blue. Examples:
    
                     0xffff0000    Red
                     0xff00ff00    Green
                     0xff0000ff    Blue
                     0x00ffffff    Fully transparent
    
           panel-position=top
                  sets the position of the panel (string). Can be top, bottom, left, right, none.
    
           locking=true
                  enables screen locking (boolean).
    
           animation=zoom
                  sets the effect used for opening new windows (string). Can be zoom, fade, none.  By default, no animation is used.
    
           close-animation=fade
                  sets the effect used when closing windows (string). Can be fade, none.  By default, the fade animation is used.
    
           startup-animation=fade
                  sets the effect used for opening new windows (string). Can be fade, none.  By default, the fade animation is used.
    
           focus-animation=dim-layer
                  sets the effect used with the focused and unfocused windows. Can be dim-layer, none.  By default, no animation is used.
    
           allow-zap=true
                  whether the shell should quit when the Ctrl-Alt-Backspace key combination is pressed
    
           binding-modifier=ctrl
                  sets  the  modifier  key  used  for common bindings (string), such as moving surfaces, resizing, rotating, switching, closing and setting the transparency for windows, controlling the
                  backlight and zooming the desktop. See weston-bindings(7).  Possible values: none, ctrl, alt, super (default)
    
           num-workspaces=6
                  defines the number of workspaces (unsigned integer). The user can switch workspaces by using the binding+F1, F2 keys. If this key is not set, fall back to one workspace.
    
           cursor-theme=theme
                  sets the cursor theme (string).
    
           cursor-size=24
                  sets the cursor size (unsigned integer).
    
           lockscreen-icon=path
                  sets the path to lock screen icon image (string). (tablet shell only)
    
           lockscreen=path
                  sets the path to lock screen background image (string). (tablet shell only)
    
           homescreen=path
                  sets the path to home screen background image (string). (tablet shell only)
    
    LAUNCHER SECTION
           There can be multiple launcher sections, one for each launcher.
    
           icon=icon
                  sets the path to icon image (string). Svg images are not currently supported.
    
           path=program
                  sets the path to the program that is run by clicking on this launcher (string).  It is possible to pass arguments and environment variables to the program. For example:
    
                      path=GDK_BACKEND=wayland gnome-terminal --full-screen
    
    OUTPUT SECTION
           There can be multiple output sections, each corresponding to one output. It is currently only recognized by the drm and x11 backends.
    
           name=name
                  sets a name for the output (string). The backend uses the name to identify the output. All X11 output names start with a letter X.  All Wayland output names start with the letters WL.
                  The available output names for DRM backend are listed in the weston-launch(1) output.  Examples of usage:
    
                     LVDS1    DRM backend, Laptop internal panel no.1
                     VGA1     DRM backend, VGA connector no.1
                     X1       X11 backend, X window no.1
                     WL1      Wayland backend, Wayland window no.1
    
                  See weston-drm(7) for more details.
    
           mode=mode
                  sets  the  output  mode  (string). The mode parameter is handled differently depending on the backend. On the X11 backend, it just sets the WIDTHxHEIGHT of the weston window.  The DRM
                  backend accepts different modes, along with an option of a modeline string.
    
                  See weston-drm(7) for examples of modes-formats supported by DRM backend.
    
           transform=normal
                  How you have rotated your monitor from its normal orientation (string).  The transform key can be one of the following 8 strings:
    
                     normal               Normal output.
                     rotate-90            90 degrees clockwise.
                     rotate-180           Upside down.
                     rotate-270           90 degrees counter clockwise.
                     flipped              Horizontally flipped
                     flipped-rotate-90    Flipped and 90 degrees clockwise
                     flipped-rotate-180   Flipped and upside down
                     flipped-rotate-270   Flipped and 90 degrees counter clockwise
    
           scale=factor
                  The scaling multiplier applied to the entire output, in support of high resolution ("HiDPI" or "retina") displays, that roughly corresponds to the pixel ratio of the display's  physi‐
                  cal  resolution to the logical resolution.  Applications that do not support high resolution displays typically appear tiny and unreadable. Weston will scale the output of such appli‐
                  cations by this multiplier, to make them readable. Applications that do support their own output scaling can draw their content in high resolution, in which case they avoid compositor
                  scaling. Weston will not scale the output of such applications, and they are not affected by this multiplier.
    
                  An integer, 1 by default, typically configured as 2 or higher when needed, denoting the scaling multiplier for the output.
    
           seat=name
                  The  logical  seat name that this output should be associated with. If this is set then the seat's input will be confined to the output that has the seat set on it. The expectation is
                  that this functionality will be used in a multiheaded environment with a single compositor for multiple output and input configurations. The default seat is called "default" and  will
                  always be present. This seat can be constrained like any other.
    
           allow_hdcp=true
                  Allows HDCP support for this output. If set to true, HDCP can be tried for the content-protection, provided by the backends, on this output. By default, HDCP support is always allowed
                  for an output. The content-protection can actually be realized, only if the hardware (source and sink) support HDCP, and the backend has the implementation of content-protection  pro‐
                  tocol. Currently, HDCP is supported by drm-backend.
    
           app-ids=app-id[,app_id]*
                  A  comma  separated  list of the IDs of applications to place on this output.  These IDs should match the application IDs as set with the xdg_shell.set_app_id request. Currently, this
                  option is supported by kiosk-shell.
    
    INPUT-METHOD SECTION
           path=/home/maze/Wayland/install/libexec/weston-keyboard
                  sets the path of the on screen keyboard input method (string).
    
    KEYBOARD SECTION
           This section contains the following keys:
    
           keymap_rules=evdev
                  sets the keymap rules file (string). Used to map layout and model to input device.
    
           keymap_model=pc105
                  sets the keymap model (string). See the Models section in xkeyboard-config(7).
    
           keymap_layout=us,de,gb
                  sets the comma separated list of keyboard layout codes (string). See the Layouts section in xkeyboard-config(7).
    
           keymap_variant=euro,,intl
                  sets the comma separated list of keyboard layout variants (string). The number of variants must be the same as the number of layouts above. See the Layouts section  in  xkeyboard-con‐
                  fig(7).
    
           keymap_options=grp:alt_shift_toggle,grp_led:scroll
                  sets the keymap options (string). See the Options section in xkeyboard-config(7).
    
           repeat-rate=40
                  sets the rate of repeating keys in characters per second (unsigned integer)
    
           repeat-delay=400
                  sets the delay in milliseconds since key down until repeating starts (unsigned integer)
    
           numlock-on=false
                  sets the default state of the numlock on weston startup for the backends which support it.
    
           vt-switching=true
                  Whether to allow the use of Ctrl+Alt+Fn key combinations to switch away from the compositor's virtual console.
    
    TERMINAL SECTION
           Contains settings for the weston terminal application (weston-terminal). It allows to customize the font and shell of the command line interface.
    
           font=DejaVu Sans Mono
                  sets the font of the terminal (string). For a good experience it is recommended to use monospace fonts. In case the font is not found, the default one is used.
    
           font-size=14
                  sets the size of the terminal font (unsigned integer).
    
           term=xterm-256color
                  The terminal shell (string). Sets the $TERM variable.
    
    XWAYLAND SECTION
           path=/usr/bin/Xwayland
                  sets the path to the xserver to run (string).
    
    SCREEN-SHARE SECTION
           command=/home/maze/Wayland/install/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
                  sets the command to start a fullscreen-shell server for screen sharing (string).
    
    SEE ALSO
           weston(1), weston-bindings(7), weston-drm(7), xkeyboard-config(7)
    
    Weston 9.0.90                                                                                 2019-03-26                                                                                weston.ini(5)
    
    1. 保证渲染间隔repaint-window
    2. 确认是否需要input设备require-input
    3. 设置某个屏幕是分辨率[多个选一个][output];name=Virtual-1;mode=1920x1080
    4. 设置热插拔是否灭屏force-on
    5. 设置合成是否纯gpu  export WESTON_FORCE_RENDERER=1

    man weston-drm

    WESTON-DRM(7)                                                                      Miscellaneous Information Manual                                                                     WESTON-DRM(7)
    
    NAME
           weston-drm - the DRM backend for Weston
    
    SYNOPSIS
           weston-launch
    
           weston --backend=drm-backend.so
    
    DESCRIPTION
           The  DRM  backend  is  the native Weston backend for systems that support the Linux kernel DRM, kernel mode setting (KMS), and evdev input devices.  It is the recommended backend for desktop
           PCs, and aims to provide the full Wayland experience with the "every frame is perfect" concept.  It also relies on the Mesa GBM interface.
    
           With the DRM backend, weston runs without any underlying windowing system. The backend uses the Linux KMS API to detect connected monitors. Monitor hot-plugging is supported.  Input  devices
           are  found  automatically by udev(7).  Compositing happens mainly in GL ES 2, initialized through EGL. It is also possible to take advantage of hardware cursors and overlays, when they exist
           and are functional. Full-screen surfaces will be scanned out directly without compositing, when possible.  Hardware accelerated clients are supported via EGL.
    
           The backend chooses the DRM graphics device first based on seat id.  If seat identifiers are not set, it looks for the graphics device that was used in boot. If that is not found, it finally
           chooses the first DRM device returned by udev(7).  Combining multiple graphics devices is not supported yet.
    
           The DRM backend relies on weston-launch for managing input device access and DRM master status, so that weston can be run without root privileges. On switching away from the virtual terminal
           (VT) hosting Weston, all input devices are closed and the DRM master capability is dropped, so that other servers, including Xorg(1), can run on other VTs. On switching back to Weston's  VT,
           input devices and DRM master are re-acquired through the parent process weston-launch.
    
           The  DRM backend also supports virtual outputs that are transmitted over an RTP session as a series of JPEG images (RTP payload type 26) to a remote client. Virtual outputs are configured in
           the remote-output section of weston.ini.
    
    CONFIGURATION
           The DRM backend uses the following entries from weston.ini.
    
       Section output
           name=connector
                  The KMS connector name identifying the output, for instance LVDS1.
    
           mode=mode
                  Specify the video mode for the output. The argument mode can be one of the words off to turn the output off, preferred to use the monitor's preferred video mode, or current to use the
                  current video mode and avoid a mode switch.  It can also be a resolution as:
    
           mode=widthxheight
    
           mode=widthxheight@refresh_rate
                  Specify a mode with a given refresh-rate measured in Hz.
    
           mode=widthxheight@refresh_rate ratio
                  Here  ratio  is  Picture Aspect-Ratio which can have values as 4:3, 16:9, 64:27, and 256:135. This resolution-format helps to select a CEA mode, if such a video mode is present in the
                  mode-list of the output.
    
                  CEA defines the timing of a video mode, which is considered as a standard for HDMI spcification and compliance testing. It defines each and every parameter of a video mode, like  hac‐
                  tive,  vactive,  vfront,  vback  etc.,  including aspect-ratio information. For CEA modes, the drm layer, stores this aspect-ratio information in user-mode (drmModeModeInfo) flag bits
                  19-22. For the non-CEA modes a value of 0 is stored in the aspect-ratio flag bits.
    
                  Each CEA-mode is identified by a unique, Video Identification Code (VIC).  For example, VIC=4 is 1280x720@60 aspect-ratio 16:9. This  mode  will  be  different  than  a  non-CEA  mode
                  1280x720@60  0:0.  When  the  video  mode 1280x720@60 0:0 is applied, since its timing doesn't exactly match with the CEA information for VIC=4, it would be treated as a non-CEA mode.
                  Also, while setting the HDMI-AVI-Inforframe, VIC parameter will be given as '0'. If video mode 1280x720@60 16:9 is applied, its CEA timimgs matches with that of video mode with VIC=4,
                  so the VIC parameter in HDMI-AVI-Infoframe will be set to 4.
    
                  Many  a  times, an output may have both CEA and non-CEA modes, which are similar in all resepct, differing only in the aspect-ratio. A user can select a CEA mode by giving the aspect-
                  ratio, along with the other arguments for the mode.  By omitting the aspect-ratio, user can specify the non-CEA modes.  This helps when certification testing is done,  in  tests  like
                  7-27, the HDMI-analyzer applies a particular CEA mode, and expects the applied mode to be with exactly same timings, including the aspect-ratio and VIC field.
    
                  The resolution can also be a detailed mode line as below.
    
           mode=dotclock hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotal hflag vflag
                  Use the given detailed mode line as the video mode for this output.  The definition is the same as in xorg.conf(5), and cvt(1) can generate detailed mode lines.
    
           transform=transform
                  Transform  for  the  output,  which  can be rotated in 90-degree steps and possibly flipped. Possible values are normal, rotate-90, rotate-180, rotate-270, flipped, flipped-rotate-90,
                  flipped-rotate-180, and flipped-rotate-270.
    
           pixman-shadow=boolean
                  If using the Pixman-renderer, use shadow framebuffers. Defaults to true.
    
           same-as=name
                  Make this output (connector) a clone of another. The argument name is the name value of another output section. The referred to output section must exist. When this key is present  in
                  an output section, all other keys have no effect on the configuration.
    
                  NOTE:  cms-colord  plugin  does  not  work correctly with this option. The plugin chooses an arbitrary monitor to load the color profile for, but the profile is applied equally to all
                  cloned monitors regardless of their properties.
    
           force-on=true
                  Force the output to be enabled even if the connector is disconnected.  Defaults to false. Note that mode=off will override force-on=true.  When a connector is disconnected,  there  is
                  no EDID information to provide a list of video modes. Therefore a forced output should also have a detailed mode line specified.
    
       Section remote-output
           name=name
                  Specify unique name for the output.
    
           mode=mode
                  Specify the video mode for the output. The argument mode is a resolution setting, such as:
    
           mode=widthxheight
    
           mode=widthxheight@refresh_rate
                  If refresh_rate is not specified it will default to a 60Hz.
    
           host=host
                  Specify the host name or IP Address that the remote output will be transmitted to.
    
           port=port
                  Specify the port number to transmit the remote output to. Usable port range is 1-65533.
    
           gst-pipeline=pipeline
                  Specify  the gstreamer pipeline. It is necessary that source is appsrc, its name is "src", and sink name is "sink" in pipeline.  Ignore port and host configuration if the gst-pipeline
                  is specified.
    
    OPTIONS
           When the DRM backend is loaded, weston will understand the following additional command line options.
    
           --current-mode
                  By default, use the current video mode of all outputs, instead of switching to the monitor preferred mode.
    
           --drm-device=cardN
                  Use the DRM device cardN instead of the default heuristics based on seat assignments and boot VGA status. For example, use card0.
    
           --seat=seatid
                  Use graphics and input devices designated for seat seatid instead of the seat defined in the environment variable XDG_SEAT. If neither is specified, seat0 will be assumed.
    
           --tty=x
                  Launch Weston on tty x instead of using the current tty.
    
           --continue-without-input
                  Allow Weston to start without input devices. Used for testing purposes.
    
    ENVIRONMENT
           WESTON_LIBINPUT_LOG_PRIORITY
                  The minimum libinput verbosity level to be printed to Weston's log.  Valid values are debug, info, and error. Default is info.
    
           WESTON_TTY_FD
                  The file descriptor (integer) of the opened tty where weston will run. Set by weston-launch.
    
           WESTON_LAUNCHER_SOCK
                  The file descriptor (integer) where weston-launch is listening. Automatically set by weston-launch.
    
           XDG_SEAT
                  The seat Weston will start on, unless overridden on the command line.
    
    SEE ALSO
           weston(1)
    
    Weston 9.0.90                                                                                 2012-11-27                                                                                WESTON-DRM(7)
    
    

     里面的same-as功能值得深究;seatid到底对应什么

    --drm-device=cardN实现多个card对应多个weston

     man weston-debug

    WESTON-DEBUG(1)                                                                        General Commands Manual                                                                        WESTON-DEBUG(1)
    
    NAME
           weston-debug - a tool for getting debug messages from compositor.
    
    SYNOPSIS
           weston-debug [options] [names]
    
    DESCRIPTION
           weston-debug  is  a  debugging tool which uses weston_debug_v1 interface to get the debug messages from the compositor. The debug messages are categorized into different debug streams by the
           compositor (example: logs, proto, list, etc.,) and the compositor requires a file descriptor to stream the messages.
    
           This tool accepts a file name or a file descriptor (not both) and any desired debug stream names from the user as command line arguments and subscribes the desired streams from the  composi‐
           tor by using the weston_debug_v1 interface. After the subscription, the compositor will start to write the debug messages to the shared file descriptor.
    
           If no file name or file descriptor argument is given, the tool will use the stdout file descriptor.
    
    OPTIONS
           weston-debug accepts the following command line options.
    
           -h, --help
                  Print the help text and exit with success.
    
           -l, --list
                  List the available debug streams supported by the compositor. May be used together with --all or a list of debug stream names.
    
           -a, --all
                  Bind all debug streams offered by the compositor. Mututally exclusive with explicitly specifying stream names.
    
           -o FILE, --output FILE
                  Direct output to file named FILE. Use - for stdout.  Stdout is the default. Mutually exclusive with -f.
    
           -f FD, --outfd FD
                  Direct output to the file descriptor FD.  Stdout (1) is the default. Mutually exclusive with -o.
    
           [names]
                  A list of debug streams to bind to. Mutually exclusive with --all.
    
    Weston 9.0.90                                                                                 2018-09-11                                                                              WESTON-DEBUG(1)
    

    weston-debug是一个非常非常详细的debug工具,要依赖于weston启动的时候是否开启debug功能。 

    Weston scene graph at 4876172.824156981:
    
    Output 0 (VGA-1):
    	position: (0, 0) -> (1920, 975)
    	mode: 1920x975@59.964Hz
    	scale: 1
    	repaint status: no repaint
    	Head 0 (VGA-1): connected
    
    Layer 0 (pos 0xffffffff):
    	[no views]
    
    Layer 1 (pos 0xfffffffe):
    	[no views]
    
    Layer 2 (pos 0xb0000000):
    	[no views]
    
    Layer 3 (pos 0x80000000):
    	View 0 (role (null), PID 441375, surface ID 18, panel for output VGA-1, 0x5623c003c630):
    		position: (0, 0) -> (1920, 32)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    Layer 4 (pos 0x50000001):
    	[no views]
    
    Layer 5 (pos 0x50000000):
    	View 0 (role xdg_toplevel, PID 441382, surface ID 16, top-level window 'maze@maze-VirtualBox: ~/Wayland/install/bin', 0x5623c00b65f0):
    		position: (397, 70) -> (1203, 929)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    Layer 6 (pos 0x2):
    	View 0 (role (null), PID 441375, surface ID 19, background for output VGA-1, 0x5623c00f2ca0):
    		position: (0, 0) -> (1920, 975)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    [2021-01-13 19:27:46.813][proto] client 0x5623bfab4830 rq weston_debug_v1@4.subscribe("drm-backend", fd 46, new id weston_debug_stream_v1@8)
    [2021-01-13 19:27:46.813][proto] client 0x5623bfab4830 rq weston_debug_v1@4.subscribe("content-protection-debug", fd 47, new id weston_debug_stream_v1@9)
    [2021-01-13 19:27:46.813][proto] client 0x5623bfab4830 rq weston_debug_v1@4.destroy()
    [2021-01-13 19:27:46.813][proto] client 0x5623bfab4830 ev wl_display@1.delete_id(4)
    [2021-01-13 19:27:46.813][proto] client 0x5623bfab4830 rq weston_debug_stream_v1@5.destroy()
    [2021-01-13 19:27:46.813][proto] client 0x5623bfab4830 ev wl_display@1.delete_id(5)
    [2021-01-13 19:27:46.814][proto] client 0x5623c0049420 rq wl_surface@16.frame(new id wl_callback@23)
    [2021-01-13 19:27:46.814][proto] client 0x5623c0049420 rq wl_surface@16.attach(wl_buffer@28, 0, 0)
    [2021-01-13 19:27:46.814][proto] client 0x5623c0049420 rq wl_surface@16.damage(0, 0, 806, 859)
    [2021-01-13 19:27:46.814][proto] client 0x5623c0049420 rq wl_surface@16.commit()
    { "id":1, "type":"weston_surface", "desc":"top-level window 'maze@maze-VirtualBox: ~/Wayland/install/bin'" }
    { "T":[4876172, 824797508], "N":"core_commit_damage", "ws":1 }
    { "id":2, "type":"weston_output", "name":"VGA-1" }
    { "T":[4876172, 824816554], "N":"core_repaint_req", "wo":2 }
    { "T":[4876172, 824828386], "N":"core_repaint_enter_loop", "wo":2 }
    		[atomic] applying output 0 (VGA-1) state
    			[CRTC:33] 23 (MODE_ID) -> 45 (0x2d)
    			[CRTC:33] 22 (ACTIVE) -> 1 (0x1)
    			[CONN:35] 20 (CRTC_ID) -> 33 (0x21)
    			[PLANE:31] 17 (FB_ID) -> 46 (0x2e)
    			[PLANE:31] 20 (CRTC_ID) -> 33 (0x21)
    			[PLANE:31] 9 (SRC_X) -> 0 (0x0)
    			[PLANE:31] 10 (SRC_Y) -> 0 (0x0)
    			[PLANE:31] 11 (SRC_W) -> 125829120 (0x7800000)
    			[PLANE:31] 12 (SRC_H) -> 63897600 (0x3cf0000)
    			[PLANE:31] 13 (CRTC_X) -> 0 (0x0)
    			[PLANE:31] 14 (CRTC_Y) -> 0 (0x0)
    			[PLANE:31] 15 (CRTC_W) -> 1920 (0x780)
    			[PLANE:31] 16 (CRTC_H) -> 975 (0x3cf)
    			[PLANE:31] FORMAT: XRGB8888
    [atomic] drmModeAtomicCommit
    	[CRTC:33] setting pending flip
    [atomic][CRTC:33] flip processing started
    { "T":[4876172, 825052396], "N":"core_repaint_finished", "wo":2, "vblank_monotonic":[4876172, 825017000] }
    [atomic][CRTC:33] flip processing completed
    [repaint] Beginning repaint; pending_state 0x5623c004a6a0
    Weston scene graph at 4876172.834122804:
    
    Output 0 (VGA-1):
    	position: (0, 0) -> (1920, 975)
    	mode: 1920x975@59.964Hz
    	scale: 1
    	repaint status: repaint scheduled
    	next repaint: 4876172.834693672
    	Head 0 (VGA-1): connected
    
    Layer 0 (pos 0xffffffff):
    	[no views]
    
    Layer 1 (pos 0xfffffffe):
    	[no views]
    
    Layer 2 (pos 0xb0000000):
    	[no views]
    
    Layer 3 (pos 0x80000000):
    	View 0 (role (null), PID 441375, surface ID 18, panel for output VGA-1, 0x5623c003c630):
    		position: (0, 0) -> (1920, 32)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    Layer 4 (pos 0x50000001):
    	[no views]
    
    Layer 5 (pos 0x50000000):
    	View 0 (role xdg_toplevel, PID 441382, surface ID 16, top-level window 'maze@maze-VirtualBox: ~/Wayland/install/bin', 0x5623c00b65f0):
    		position: (397, 70) -> (1203, 929)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		SHM buffer
    			format: 0x0 ARGB8888
    
    Layer 6 (pos 0x2):
    	View 0 (role (null), PID 441375, surface ID 19, background for output VGA-1, 0x5623c00f2ca0):
    		position: (0, 0) -> (1920, 975)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    { "T":[4876172, 834166720], "N":"core_repaint_begin", "wo":2 }
    	[repaint] preparing state for output VGA-1 (0)
    	[repaint] trying planes-only build state
    			[view] evaluating view 0x5623c003c630 for output VGA-1 (0)
    				[view] not assigning view 0x5623c003c630 to plane (no buffer available)
    		[view] failing state generation: placing view 0x5623c003c630 to renderer not allowed
    	[repaint] could not build planes-only state, trying mixed
    		[state] using renderer FB ID 46 for mixed mode for output VGA-1 (0)
    		[state] scanout will use for zpos 0
    			[view] evaluating view 0x5623c003c630 for output VGA-1 (0)
    				[view] not assigning view 0x5623c003c630 to plane (no buffer available)
    				[view] view 0x5623c003c630 will be placed on the renderer
    			[view] evaluating view 0x5623c00b65f0 for output VGA-1 (0)
    			[plane] started with zpos 18446744073709551615
    				[plane] plane 32 added to candidate list
    				[plane] not adding plane 31 to candidate list: view already assigned to a plane
    				[plane] plane 32 picked from candidate list, type: cursor
    				[cursor] not assigning view 0x5623c00b65f0 to cursor plane (positioning requires cropping or scaling)
    				[view] view 0x5623c00b65f0 will be placed on the renderer
    			[view] evaluating view 0x5623c00f2ca0 for output VGA-1 (0)
    				[view] not assigning view 0x5623c00f2ca0 to plane (no buffer available)
    				[view] not assigning view 0x5623c00f2ca0 to plane (occluded by renderer views)
    				[view] view 0x5623c00f2ca0 will be placed on the renderer
    		[atomic] testing output 0 (VGA-1) state
    			[CRTC:33] 23 (MODE_ID) -> 45 (0x2d)
    			[CRTC:33] 22 (ACTIVE) -> 1 (0x1)
    			[CONN:35] 20 (CRTC_ID) -> 33 (0x21)
    			[PLANE:31] 17 (FB_ID) -> 46 (0x2e)
    			[PLANE:31] 20 (CRTC_ID) -> 33 (0x21)
    			[PLANE:31] 9 (SRC_X) -> 0 (0x0)
    			[PLANE:31] 10 (SRC_Y) -> 0 (0x0)
    			[PLANE:31] 11 (SRC_W) -> 125829120 (0x7800000)
    			[PLANE:31] 12 (SRC_H) -> 63897600 (0x3cf0000)
    			[PLANE:31] 13 (CRTC_X) -> 0 (0x0)
    			[PLANE:31] 14 (CRTC_Y) -> 0 (0x0)
    			[PLANE:31] 15 (CRTC_W) -> 1920 (0x780)
    			[PLANE:31] 16 (CRTC_H) -> 975 (0x3cf)
    			[PLANE:31] FORMAT: XRGB8888
    [atomic] drmModeAtomicCommit
    	[repaint] Using mixed state composition
    	[repaint] view 0x5623c003c630 using renderer composition
    	[repaint] view 0x5623c00b65f0 using renderer composition
    	[repaint] view 0x5623c00f2ca0 using renderer composition
    { "T":[4876172, 834611643], "N":"core_flush_damage", "ws":1, "wo":2 }
    [2021-01-13 19:27:46.824][proto] client 0x5623c0049420 ev wl_buffer@28.release()
    [2021-01-13 19:27:46.831][proto] client 0x5623c0049420 ev wl_callback@23.done(581205529)
    [2021-01-13 19:27:46.831][proto] client 0x5623c0049420 ev wl_display@1.delete_id(23)
    { "T":[4876172, 841675375], "N":"core_repaint_posted", "wo":2 }
    		[atomic] applying output 0 (VGA-1) state
    			[CRTC:33] 23 (MODE_ID) -> 45 (0x2d)
    			[CRTC:33] 22 (ACTIVE) -> 1 (0x1)
    			[CONN:35] 20 (CRTC_ID) -> 33 (0x21)
    			[PLANE:31] 17 (FB_ID) -> 44 (0x2c)
    			[PLANE:31] 20 (CRTC_ID) -> 33 (0x21)
    			[PLANE:31] 9 (SRC_X) -> 0 (0x0)
    			[PLANE:31] 10 (SRC_Y) -> 0 (0x0)
    			[PLANE:31] 11 (SRC_W) -> 125829120 (0x7800000)
    			[PLANE:31] 12 (SRC_H) -> 63897600 (0x3cf0000)
    			[PLANE:31] 13 (CRTC_X) -> 0 (0x0)
    			[PLANE:31] 14 (CRTC_Y) -> 0 (0x0)
    			[PLANE:31] 15 (CRTC_W) -> 1920 (0x780)
    			[PLANE:31] 16 (CRTC_H) -> 975 (0x3cf)
    			[PLANE:31] FORMAT: XRGB8888
    [atomic] drmModeAtomicCommit
    	[CRTC:33] setting pending flip
    [repaint] flushed pending_state 0x5623c004a6a0
    [atomic][CRTC:33] flip processing started
    { "T":[4876172, 841982869], "N":"core_repaint_finished", "wo":2, "vblank_monotonic":[4876172, 841897000] }
    [atomic][CRTC:33] flip processing completed
    [repaint] Beginning repaint; pending_state 0x5623bfa81f10
    Weston scene graph at 4876172.851671100:
    
    Output 0 (VGA-1):
    	position: (0, 0) -> (1920, 975)
    	mode: 1920x975@59.964Hz
    	scale: 1
    	repaint status: repaint scheduled
    	next repaint: 4876172.851573672
    	Head 0 (VGA-1): connected
    
    Layer 0 (pos 0xffffffff):
    	[no views]
    
    Layer 1 (pos 0xfffffffe):
    	[no views]
    
    Layer 2 (pos 0xb0000000):
    	[no views]
    
    Layer 3 (pos 0x80000000):
    	View 0 (role (null), PID 441375, surface ID 18, panel for output VGA-1, 0x5623c003c630):
    		position: (0, 0) -> (1920, 32)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    Layer 4 (pos 0x50000001):
    	[no views]
    
    Layer 5 (pos 0x50000000):
    	View 0 (role xdg_toplevel, PID 441382, surface ID 16, top-level window 'maze@maze-VirtualBox: ~/Wayland/install/bin', 0x5623c00b65f0):
    		position: (397, 70) -> (1203, 929)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    Layer 6 (pos 0x2):
    	View 0 (role (null), PID 441375, surface ID 19, background for output VGA-1, 0x5623c00f2ca0):
    		position: (0, 0) -> (1920, 975)
    		[not opaque]
    		outputs: 0 (VGA-1) (primary)
    		[buffer not available]
    
    { "T":[4876172, 851712019], "N":"core_repaint_exit_loop", "wo":2 }
    [atomic] drmModeAtomicCommit
    [repaint] flushed pending_state 0x5623bfa81f10
    [2021-01-13 19:27:46.905][proto] client 0x5623c0049420 ev wl_keyboard@19.key(911, 581205620, 28, 0)
    [2021-01-13 19:27:47.936][proto] client 0x5623c0049420 ev wl_keyboard@19.key(912, 581206650, 29, 1)
    [2021-01-13 19:27:47.936][proto] client 0x5623c0049420 ev wl_keyboard@19.modifiers(912, 4, 0, 0, 0)
    [2021-01-13 19:27:48.031][proto] client 0x5623c0049420 ev wl_keyboard@19.key(913, 581206746, 46, 1)
    

     

     ./weston-debug -h
    Usage: weston-debug [options] [names]
    Where options may be:
      -h, --help
         This help text, and exit with success.
      -l, --list
         Print a list of available debug streams to stderr.
      -a, --all-streams
         Bind to all available streams.
      -o FILE, --output FILE
         Direct output to file named FILE. Use - for stdout.
         Stdout is the default. Mutually exclusive with -f.
      -f FD, --outfd FD
         Direct output to the file descriptor FD.
         Stdout (1) is the default. Mutually exclusive with -o.
    Names are whatever debug stream names the compositor supports.
    
    ./weston-debug -l
    log
    scene-graph
    timeline
    proto
    gl-shader-generator

     

    https://fossies.org/dox/all.html //weston源码相关的结构体,强大

    展开全文
  • Weston启动流程分析 Weston是Wayland Compositor的实现。其Server端作为独立的进程运行在系统中。MakeFile中编译成果为,“weston”的可执行程序 MakeFile.am(weston 2.0.0) bin_PROGRAMS += weston weston_...

    Weston启动流程分析

    • Weston是Wayland Compositor的实现。其Server端作为独立的进程运行在系统中。MakeFile中编译成果为,“weston”的可执行程序
    • MakeFile.am(weston 2.0.0)
    bin_PROGRAMS += weston
    
    weston_LDFLAGS = -export-dynamic
    weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON 		\
    				 -DMODULEDIR='"$(moduledir)"' \
    				 -DXSERVER_PATH='"@XSERVER_PATH@"'
    weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
    weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
    	$(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
    	$(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
    	$(CLOCK_GETRES_LIBS) \
    	-lm
    
    weston_SOURCES = 					\
    	compositor/main.c				\
    	compositor/weston-screenshooter.c		\
    	compositor/text-backend.c			\
    	compositor/xwayland.c
    

    启动流程分析

    • 流程图:
      在这里插入图片描述

    • main函数:入口函数。其实现在 weston-2.0.0/compositor/main.c

    • 主要内容分析

    int main(int argc, char *argv[])
    {
    	// Log日志初始化
    	weston_log_set_handler(vlog, vlog_continue);
    	weston_log_file_open(log);
    	// 启动Log
    	weston_log("%s\n"
    		   STAMP_SPACE "%s\n"
    		   STAMP_SPACE "Bug reports to: %s\n"
    		   STAMP_SPACE "Build: %s\n",
    		   PACKAGE_STRING, PACKAGE_URL, PACKAGE_BUGREPORT,
    		   BUILD_ID);
    
    	// 创建全局唯一的Display
    	display = wl_display_create();
    	
    	// 读取weston.ini文件中的配置
    	if (load_configuration(&config, noconfig, config_file) < 0)
    		goto out_signals;
    	// 创建Compositor
    	ec = weston_compositor_create(display, &user_data);
    	if (ec == NULL) {
    		weston_log("fatal: failed to create compositor\n");
    		goto out;
    	}
    	// 加载backend(默认为drm-backend)
    	if (load_backend(ec, backend, &argc, argv, config) < 0) {
    		weston_log("fatal: failed to create compositor backend\n");
    		goto out;
    	}
    
    	// 捕获异常Signal
    	catch_signals();
    
    	if (fd != -1) {
    		// ...
    		// 默认走 else if,创建socket
    	} else if (weston_create_listening_socket(display, socket_name)) {
    		goto out;
    	}
    
       // 加载shell
    	if (wet_load_shell(ec, shell, &argc, argv) < 0)
    		goto out;
    
       // 唤醒compositor
    	weston_compositor_wake(ec);
    	// run:循环监听client端请求
    	wl_display_run(display);
    
    }
    
    • 可以看出其大致的过程为:
    1. 初始化Log系统
    2. 创建Display(全局唯一)
    3. 加载配置文件(ini文件)
    4. 创建Compositor
    5. 加载backend
    6. 创建socket
    7. 加载shell
    8. 开启循环

    初始化Log系统

    • weston-2.0.0/libweston/log.c
    // 将vlog作为 log_handler
    WL_EXPORT void
    weston_log_set_handler(log_func_t log, log_func_t cont)
    {
    	log_handler = log;
    	log_continue_handler = cont;
    }
    
    // 使用log_handler进行输出,实际上使用的是main.c中传递过来的
    // vlog
    WL_EXPORT int
    weston_vlog(const char *fmt, va_list ap)
    {
    	return log_handler(fmt, ap);
    }
    
    // 代码中使用到的log输出接口
    WL_EXPORT int
    weston_log(const char *fmt, ...)
    {
    	int l;
    	va_list argp;
    
    	va_start(argp, fmt);
    	l = weston_vlog(fmt, argp);
    	va_end(argp);
    
    	return l;
    }
    
    • 实际上,log系统 使用vlog和vlog_continue这两个函数。两者的定义,在main.c中 。
    static FILE *weston_logfile = NULL;
    static void
    weston_log_file_open(const char *filename)
    {
    	wl_log_set_handler_server(custom_handler);
    
    	if (filename != NULL) {
    		weston_logfile = fopen(filename, "a");
    		if (weston_logfile)
    			os_fd_set_cloexec(fileno(weston_logfile));
    	}
    
    	if (weston_logfile == NULL)
    		weston_logfile = stderr;
    	else
    		setvbuf(weston_logfile, NULL, _IOLBF, 256);
    }
    
    static int
    vlog(const char *fmt, va_list ap)
    {
    	int l;
    
    	l = weston_log_timestamp();
    	l += vfprintf(weston_logfile, fmt, ap);
    
    	return l;
    }
    
    static int
    vlog_continue(const char *fmt, va_list argp)
    {
    	return vfprintf(weston_logfile, fmt, argp);
    }
    
    • 默认情况下weston_log_file_open函数,参数为NULL。所以log信息会输出到stderr中 。

    创建Global Display

    • wl_display_create:wayland1.13.0/src/wayland-server.c
    WL_EXPORT struct wl_display *
    wl_display_create(void)
    {
    	struct wl_display *display;
    	const char *debug;
    
    	debug = getenv("WAYLAND_DEBUG");
    	if (debug && (strstr(debug, "server") || strstr(debug, "1")))
    		debug_server = 1;
    
    	display = malloc(sizeof *display);
    	if (display == NULL)
    		return NULL;
    	// 创建Loop
    	display->loop = wl_event_loop_create();
    	if (display->loop == NULL) {
    		free(display);
    		return NULL;
    	}
    	// list初始化
    	wl_list_init(&display->global_list);
    	wl_list_init(&display->socket_list);
    	wl_list_init(&display->client_list);
    	wl_list_init(&display->registry_resource_list);
    	wl_list_init(&display->protocol_loggers);
    	// signal初始化
    	wl_priv_signal_init(&display->destroy_signal);
    	wl_priv_signal_init(&display->create_client_signal);
    
    	display->id = 1;
    	display->serial = 0;
    
    	display->global_filter = NULL;
    	display->global_filter_data = NULL;
    	wl_array_init(&display->additional_shm_formats);
    
    	return display;
    }
    
    • wl_event_loop_create:wayland-1.13.0/src/event-loop.c
    WL_EXPORT struct wl_event_loop *
    wl_event_loop_create(void)
    {
    	struct wl_event_loop *loop;
    
    	loop = malloc(sizeof *loop);
    	if (loop == NULL)
    		return NULL;
    	// 最终调用epoll_create
    	loop->epoll_fd = wl_os_epoll_create_cloexec();
    	if (loop->epoll_fd < 0) {
    		free(loop);
    		return NULL;
    	}
    	wl_list_init(&loop->check_list);
    	wl_list_init(&loop->idle_list);
    	wl_list_init(&loop->destroy_list);
    
    	wl_signal_init(&loop->destroy_signal);
    
    	return loop;
    }
    
    • 这部分主要就是初始化了Display结构体,使用epoll_create创建了loop。

    加载配置文件

    • 配置文件:weston提供了配置文件,可以动态的改变运行配置(需要重启Server端进程),比如使用哪种shell、动画的类型、backend的类型等等。
    • compostior/main.c
    static int
    load_configuration(struct weston_config **config, int32_t noconfig,
    		   const char *config_file)
    {
        // 默认的配置文件为 weston.ini
    	const char *file = "weston.ini";
    	const char *full_path;
    
    	*config = NULL;
    
    	if (config_file)
    		file = config_file;
    	
    	// 解析配置文件
    	if (noconfig == 0)
    		*config = weston_config_parse(file);
    
    	if (*config) {
    		full_path = weston_config_get_full_path(*config);
    
    		weston_log("Using config file '%s'\n", full_path);
    		setenv(WESTON_CONFIG_FILE_ENV_VAR, full_path, 1);
    
    		return 0;
    	}
    
    	if (config_file && noconfig == 0) {
    		weston_log("fatal: error opening or reading config file"
    			   " '%s'.\n", config_file);
    
    		return -1;
    	}
    
    	weston_log("Starting with no config file.\n");
    	setenv(WESTON_CONFIG_FILE_ENV_VAR, "", 1);
    
    	return 0;
    }
    
    • weston_config_parse函数负责具体解析配置文件。最终会解析成链表的数据结构。该函数代码行数较多,这里不再介绍。
    • 官方提供的weston.ini
    [core]
    #modules=cms-colord.so
    #xwayland=true
    #shell=desktop-shell.so
    #gbm-format=xrgb2101010
    #require-input=true
    
    [shell]
    background-image=/usr/share/backgrounds/gnome/Aqua.jpg
    background-color=0xff002244
    background-type=tile
    clock-format=minutes
    panel-color=0x90ff0000
    locking=true
    animation=zoom
    startup-animation=fade
    #binding-modifier=ctrl
    #num-workspaces=6
    #cursor-theme=whiteglass
    #cursor-size=24
    
    #lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
    #lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
    #homescreen=/usr/share/backgrounds/gnome/Blinds.jpg
    #animation=fade
    
    [launcher]
    icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
    path=/usr/bin/gnome-terminal
    
    [launcher]
    icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
    path=@bindir@/weston-terminal
    
    [launcher]
    icon=/usr/share/icons/hicolor/24x24/apps/google-chrome.png
    path=/usr/bin/google-chrome
    
    [launcher]
    icon=/usr/share/icons/gnome/24x24/apps/arts.png
    path=@abs_top_builddir@/weston-flower
    
    [input-method]
    path=@libexecdir@/weston-keyboard
    
    #[output]
    #name=LVDS1
    #mode=1680x1050
    #transform=90
    #icc_profile=/usr/share/color/icc/colord/Bluish.icc
    
    #[output]
    #name=VGA1
    #mode=173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    #transform=flipped
    
    #[output]
    #name=X1
    #mode=1024x768@60
    #transform=flipped-90
    
    #[libinput]
    #enable_tap=true
    
    #[touchpad]
    #constant_accel_factor = 50
    #min_accel_factor = 0.16
    #max_accel_factor = 1.0
    
    [screen-share]
    command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
    
    #[xwayland]
    #path=@bindir@/Xwayland
    

    创建Compositor

    • weston_compositor_create:libweston/compostior.c
    WL_EXPORT struct weston_compositor *
    weston_compositor_create(struct wl_display *display, void *user_data)
    {
    	struct weston_compositor *ec;
    	struct wl_event_loop *loop;
    
    	ec = zalloc(sizeof *ec);
    	if (!ec)
    		return NULL;
    	// display为之前创建的全局display
    	ec->wl_display = display;
    	ec->user_data = user_data;
    	// 初始化一系列signal
    	wl_signal_init(&ec->destroy_signal);
    	wl_signal_init(&ec->create_surface_signal);
    	wl_signal_init(&ec->activate_signal);
    	wl_signal_init(&ec->transform_signal);
    	wl_signal_init(&ec->kill_signal);
    	wl_signal_init(&ec->idle_signal);
    	wl_signal_init(&ec->wake_signal);
    	wl_signal_init(&ec->show_input_panel_signal);
    	wl_signal_init(&ec->hide_input_panel_signal);
    	wl_signal_init(&ec->update_input_panel_signal);
    	wl_signal_init(&ec->seat_created_signal);
    	wl_signal_init(&ec->output_pending_signal);
    	wl_signal_init(&ec->output_created_signal);
    	wl_signal_init(&ec->output_destroyed_signal);
    	wl_signal_init(&ec->output_moved_signal);
    	wl_signal_init(&ec->output_resized_signal);
    	wl_signal_init(&ec->session_signal);
    	ec->session_active = 1;
    
    	ec->output_id_pool = 0;
    	ec->repaint_msec = DEFAULT_REPAINT_WINDOW;
    
    	ec->activate_serial = 1;
    	// 这几步比较关键。再weston代码中可以看多很多这种调用。
    	// wl_global_create有四个参数
    	// display、interface、version、bind_func
    	// 可以理解为:Display有一个全局对象List,这里为这个全局对象List中,加入一个新的全局对象。该对象的具体接口的实现,就是wl_compositor_interface。
    	if (!wl_global_create(ec->wl_display, &wl_compositor_interface, 4,
    			      ec, compositor_bind))
    		goto fail;
    	// 同上wl_subcompositor_interface接口实现。
    	if (!wl_global_create(ec->wl_display, &wl_subcompositor_interface, 1,
    			      ec, bind_subcompositor))
    		goto fail;
    	// 同上
    	if (!wl_global_create(ec->wl_display, &wp_viewporter_interface, 1,
    			      ec, bind_viewporter))
    		goto fail;
    	// 同 上
    	if (!wl_global_create(ec->wl_display, &wp_presentation_interface, 1,
    			      ec, bind_presentation))
    		goto fail;
    	// 创建了两个golbal对象,对应的interface为
    	// 1. zwp_relative_pointer_manager_v1_interface
    	// 2. zwp_pointer_constraints_v1_interface
    	if (weston_input_init(ec) != 0)
    		goto fail;
    	// 初始化,几个关键的list: view\plane\layer
    	wl_list_init(&ec->view_list);
    	wl_list_init(&ec->plane_list);
    	wl_list_init(&ec->layer_list);
    	wl_list_init(&ec->seat_list);
    	wl_list_init(&ec->pending_output_list);
    	wl_list_init(&ec->output_list);
    	wl_list_init(&ec->key_binding_list);
    	wl_list_init(&ec->modifier_binding_list);
    	wl_list_init(&ec->button_binding_list);
    	wl_list_init(&ec->touch_binding_list);
    	wl_list_init(&ec->axis_binding_list);
    	wl_list_init(&ec->debug_binding_list);
    
    	wl_list_init(&ec->plugin_api_list);
    	// 初始化 首先的plane
    	weston_plane_init(&ec->primary_plane, ec, 0, 0);
    	weston_compositor_stack_plane(ec, &ec->primary_plane, NULL);
    
    	wl_data_device_manager_init(ec->wl_display);
    
    	wl_display_init_shm(ec->wl_display);
    
    	loop = wl_display_get_event_loop(ec->wl_display);
    	ec->idle_source = wl_event_loop_add_timer(loop, idle_handler, ec);
    	// 初始化layer
    	weston_layer_init(&ec->fade_layer, ec);
    	weston_layer_init(&ec->cursor_layer, ec);
    
    	weston_layer_set_position(&ec->fade_layer, WESTON_LAYER_POSITION_FADE);
    	weston_layer_set_position(&ec->cursor_layer,
    				  WESTON_LAYER_POSITION_CURSOR);
    
    	weston_compositor_add_debug_binding(ec, KEY_T,
    					    timeline_key_binding_handler, ec);
    
    	return ec;
    
    fail:
    	free(ec);
    	return NULL;
    }
    
    • 这里主要创建了几个全局对象,设置了这些全局对象对应的interface实现。并且初始化了view、layer、plane等一些关键的对象。

    加载backend

    • load_backend:compositor/main.c
    static int
    load_backend(struct weston_compositor *compositor, const char *backend,
    	     int *argc, char **argv, struct weston_config *config)
    {
    	if (strstr(backend, "headless-backend.so"))
    		return load_headless_backend(compositor, argc, argv, config);
    	else if (strstr(backend, "rdp-backend.so"))
    		return load_rdp_backend(compositor, argc, argv, config);
    	else if (strstr(backend, "fbdev-backend.so"))
    		return load_fbdev_backend(compositor, argc, argv, config);
    	// 默认走 drm-backend
    	else if (strstr(backend, "drm-backend.so"))
    		return load_drm_backend(compositor, argc, argv, config);
    	else if (strstr(backend, "x11-backend.so"))
    		return load_x11_backend(compositor, argc, argv, config);
    	else if (strstr(backend, "wayland-backend.so"))
    		return load_wayland_backend(compositor, argc, argv, config);
    
    	weston_log("Error: unknown backend \"%s\"\n", backend);
    	return -1;
    }
    
    • load_drm_backend
    static int
    load_drm_backend(struct weston_compositor *c,
    		 int *argc, char **argv, struct weston_config *wc)
    {
    	struct weston_drm_backend_config config = {{ 0, }};
    	struct weston_config_section *section;
    	struct wet_compositor *wet = to_wet_compositor(c);
    
    	// 走这里创建backend
    	ret = weston_compositor_load_backend(c, WESTON_BACKEND_DRM,
    					     &config.base);
    
    	wet_set_pending_output_handler(c, drm_backend_output_configure);
    
    	free(config.gbm_format);
    	free(config.seat_id);
    
    	return ret;
    }
    
    • weston_compositor_load_backend:libweston/compositor.c
    WL_EXPORT int
    weston_compositor_load_backend(struct weston_compositor *compositor,
    			       enum weston_compositor_backend backend,
    			       struct weston_backend_config *config_base)
    {
    	int (*backend_init)(struct weston_compositor *c,
    			    struct weston_backend_config *config_base);
    
    	if (backend >= ARRAY_LENGTH(backend_map))
    		return -1;
    	// 通过dlopen,打开drm-backend.so,查找 weston_backend_init 函数
    	backend_init = weston_load_module(backend_map[backend], "weston_backend_init");
    	if (!backend_init)
    		return -1;
    	// 执行weston_backend_init函数
    	return backend_init(compositor, config_base);
    }
    
    • weston_backend_init:libweston/compositor-drm.c
    WL_EXPORT int
    weston_backend_init(struct weston_compositor *compositor,
    		    struct weston_backend_config *config_base)
    {
    	struct drm_backend *b;
    	struct weston_drm_backend_config config = {{ 0, }};
    
    	if (config_base == NULL ||
    	    config_base->struct_version != WESTON_DRM_BACKEND_CONFIG_VERSION ||
    	    config_base->struct_size > sizeof(struct weston_drm_backend_config)) {
    		weston_log("drm backend config structure is invalid\n");
    		return -1;
    	}
    
    	config_init_to_defaults(&config);
    	memcpy(&config, config_base, config_base->struct_size);
    	// 创建 drm backend
    	b = drm_backend_create(compositor, &config);
    	if (b == NULL)
    		return -1;
    
    	return 0;
    }
    
    • drm_backend_create:libweston/compositor-drm.c
    static struct drm_backend *
    drm_backend_create(struct weston_compositor *compositor,
    		   struct weston_drm_backend_config *config)
    {
    	// 使用libdrm接口,做一些初始化的动作
    	// 创建output对象 drmModeGetConnector
    }
    

    创建Socket

    • Server进程创建监听socket
    • weston_create_listening_socket:compositor/main.c
    static int
    weston_create_listening_socket(struct wl_display *display, const char *socket_name)
    {
    	if (socket_name) {
    		if (wl_display_add_socket(display, socket_name)) {
    			weston_log("fatal: failed to add socket: %m\n");
    			return -1;
    		}
    	} else {
    	    // 默认socketname为空。
    	    // 创建一个名为wayland-0的socket
    		socket_name = wl_display_add_socket_auto(display);
    		if (!socket_name) {
    			weston_log("fatal: failed to add socket: %m\n");
    			return -1;
    		}
    	}
    
    	setenv("WAYLAND_DISPLAY", socket_name, 1);
    
    	return 0;
    }
    

    加载shell

    • wet_load_shell:compositor/main.c
    static int
    wet_load_shell(struct weston_compositor *compositor,
    	       const char *name, int *argc, char *argv[])
    {
    	int (*shell_init)(struct weston_compositor *ec,
    			  int *argc, char *argv[]);
    	// 默认:
    	// 使用dlopen,打开desktop-shell.so,查找wet_shell_init函数
    	shell_init = wet_load_module_entrypoint(name, "wet_shell_init");
    	if (!shell_init)
    		return -1;
    	// 调用wet_shell_init
    	if (shell_init(compositor, argc, argv) < 0)
    		return -1;
    	return 0;
    }
    
    • wet_shell_init:deskstop-shell/shell.c
    WL_EXPORT int
    wet_shell_init(struct weston_compositor *ec,
    	       int *argc, char *argv[])
    {
    	// 创建desktop
    	shell->desktop = weston_desktop_create(ec, &shell_desktop_api, shell);
    	if (!shell->desktop)
    		return -1;
    	// 创建全局对象
    	if (wl_global_create(ec->wl_display,
    			     &weston_desktop_shell_interface, 1,
    			     shell, bind_desktop_shell) == NULL)
    		return -1;
    
    }
    

    开启循环

    • 这里的循环,指使用epoll机制,监听对socket(上面Server端创建的socket)产生的读写事件。
    WL_EXPORT void
    wl_display_run(struct wl_display *display)
    {
    	display->run = 1;
    
    	while (display->run) {
    		wl_display_flush_clients(display);
    		wl_event_loop_dispatch(display->loop, -1);
    	}
    }
    
    • wl_event_loop_dispatch:event-loop.c
    WL_EXPORT int
    wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout)
    {
    	struct epoll_event ep[32];
    	struct wl_event_source *source;
    	int i, count, n;
    
    	wl_event_loop_dispatch_idle(loop);
    
    	count = epoll_wait(loop->epoll_fd, ep, ARRAY_LENGTH(ep), timeout);
    	if (count < 0)
    		return -1;
    
    	for (i = 0; i < count; i++) {
    		source = ep[i].data.ptr;
    		if (source->fd != -1)
    			source->interface->dispatch(source, &ep[i]);
    	}
    
    	wl_event_loop_process_destroy_list(loop);
    
    	wl_event_loop_dispatch_idle(loop);
    
    	do {
    		n = post_dispatch_check(loop);
    	} while (n > 0);
    
    	return 0;
    }
    
    展开全文
  • weston问题定位

    2021-11-11 17:07:05
    Weston问题定位分享 前言: 此问题出现的Qt版本为5.9.0,weston版本为3.0.0 1、问题 在IMX8MQ平台下,采用米尔厂家提供的固件,进行qt界面开发;在界面中使用到QComboBox类时,会出现如何下情况; 点击下拉...
  • 02-编译weston demo

    2022-02-28 19:00:22
    参考链接:Building Weston 1、首先设置环境变量 写个简单的set-env.sh脚本方便运行: #!/bin/bash export WLD=/home/your_user_name/work/weston/install # change this to another location if you prefer ...
  • Wayland与Weston关系

    2022-05-16 11:10:59
    Weston是Wayland compositor的参考实现。 Wayland基于domain socket实现了一套display server与client间通信的库(简单的基于例子的介绍可以参见http://blog.csdn.net/jinzhuojun/article/details/40264449),...
  • weston_head weston_output weston_surface: 客户端调用wl_compositor_create_surface server端调用 static void compositor_create_surface(struct wl_client *client, struct wl_resource *resource, ...
  • display:weston:weston-simple-egl

    千次阅读 2021-01-09 23:44:09
    该应用程序使用Wayland协议向合成器(Weston)通知更新的窗口,并将GPU纹理句柄传递给weston。 当Weston接下来渲染框架时,它将确定是否需要对任何曲面应用GLES变换,并根据需要将曲面分配给平面和硬件叠加层。 ...
  • 04-Weston DRM Backend

    千次阅读 2022-03-15 18:43:23
    调用过程: weston/compositor/main.c
  • 01-weston 简介

    千次阅读 2022-03-13 08:24:34
    weston wiki Weston - Gentoo Wiki Weston-1.12.0 什么是weston? Wayland是一套display server(Wayland compositor)与client间的通信协议,而Weston是Wayland compositor的参考实现。 Wayland 架构 Wayland ...
  • vim /lib/systemd/system/weston.service //修改如下所示: ExecStart=/usr/bin/weston --debug --log=${XDG_RUNTIME_DIR}/weston.log $OPTARGS 保存退出,执行以下指令,生成图片之后用U盘拷贝出来在PC上查看 ...
  • create 5)编译rk报错undefined symbol: glEnable 6)刷机进入系统后图形起不来 本文主要介绍在OpenHarmony上,基于RK3568移植开源GPU Mesa3D图形驱动,使用的基线版本是openharmony 的RK分支+kernel4.19+Weston。...
  • 03-weston启动过程

    2022-03-13 10:33:22
    weston 10.0.90启动过程 compositor/executable.c/main()--> compositor/main.c-->wet_main() -->verify_xdg_runtime_dir()//XDG_RUNTIME_DIR环境变量检查 -->wl_display_create//创建wayland...
  • static const struct xdg_wm_base_interface weston_desktop_xdg_shell_implementation = { .destroy = weston_desktop_destroy_request, .create_positioner = weston_desktop_xdg_shell_protocol_create_...
  • display:weston渲染流程:commit

    千次阅读 2020-06-01 11:25:52
    接上一篇 display:weston渲染流程:buffer+attach+damage+frame https://blog.csdn.net/u012839187/article/details/100580627 下面讲commit 5.commit ...Surface state (input, opaqueand damag.
  • 一般是先执行weston_view_assign_output决定了view在哪些output上,然后再调用 weston_surface_assgin_output weston_view_update_transform_disable weston_view_update_transform_enable 暂时还不明确用途。...
  • tools:在ubuntu 20.04上搭建weston环境

    千次阅读 2020-07-06 17:43:58
    s ~/Wayland/install/lib/x86_64-linux-gnu/libweston-desktop-9.so.0 /usr/lib/libweston-desktop-9.so.0 随后weston还需要weston.ini放到~/.config/ [目前没有weston.ini也能启动weston,并且默认的backend是x11-...
  • Wayland与Weston

    2020-01-02 10:28:15
    简单地说,Wayland是一套display server(Wayland compositor)与client间的通信协议,而Weston是Wayland compositor的参考实现。其官网为http://wayland.freedesktop.org/。它们定位于在Linux上替换X图形系统。X图形...
  • Weston多屏显示 Weston默认支持多屏显示(比如前屏+后屏) output对象可以理解为逻辑上的一块屏幕,对于DRM,其信息通过drmModeGetResources接口获得。 View结构体有两个成员,一个保存output对象的引用来作为...
  • 屏幕旋转、关闭桌面显示、去掉虚拟小键盘 开机启用服务 去掉虚拟小键盘 在/etc/xdg/weston/weston.ini配置文
  • 基于wayland/weston源码编译简介下载工具设置环境变量构建wayland构建wayland-protocols构建weston运行westonweston的一些测试程序 简介 官网:https://wayland.freedesktop.org/ 简单地说,Wayland是一套display ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 3,684
精华内容 1,473
关键字:

weston

友情链接: Basic_Switch.rar