blob: f9247b270aff795c41238a89e8d55930b8579f17 [file] [log] [blame]
Pekka Paalanen424820f2012-11-27 16:54:08 +02001.TH WESTON-DRM 7 "2012-11-27" "Weston __version__"
2.SH NAME
3weston-drm \- the DRM backend for Weston
4.SH SYNOPSIS
5.B weston-launch
6.LP
7.B weston --backend=drm-backend.so
8.
9.\" ***************************************************************
10.SH DESCRIPTION
11The DRM backend is the native Weston backend for systems that support
12the Linux kernel DRM, kernel mode setting (KMS), and evdev input devices.
13It is the recommended backend for desktop PCs, and aims to provide
14the full Wayland experience with the "every frame is perfect" concept.
15It also relies on the Mesa GBM interface.
16
17With the DRM backend,
18.B weston
19runs without any underlying windowing system. The backend uses the
20Linux KMS API to detect connected monitors. Monitor hot-plugging is
21supported. Input devices are found automatically by
22.BR udev (7).
23Compositing happens mainly in GL\ ES\ 2, initialized through EGL. It
24is also possible to take advantage of hardware cursors and overlays,
25when they exist and are functional. Full-screen surfaces will be
26scanned out directly without compositing, when possible.
27Hardware accelerated clients are supported via EGL.
28
29The backend chooses the DRM graphics device first based on seat id.
30If seat identifiers are not set, it looks for the graphics device
31that was used in boot. If that is not found, it finally chooses
32the first DRM device returned by
33.BR udev (7).
34Combining multiple graphics devices are not supported yet.
35
36The DRM backend relies on
37.B weston-launch
38for managing input device access and DRM master status, so that
39.B weston
40can be run without root privileges. On switching away from the
41virtual terminal (VT) hosting Weston, all input devices are closed and
42the DRM master capability is dropped, so that other servers,
43including
44.BR Xorg (1),
45can run on other VTs. On switching back to Weston's VT, input devices
46and DRM master are re-acquired through the parent process
47.BR weston-launch .
48.
49.\" ***************************************************************
50.SH CONFIGURATION
51.
52The DRM backend uses the following entries from
53.BR weston.ini .
54.SS Section output
55.TP
56\fBname\fR=\fIconnector\fR
57The KMS connector name identifying the output, for instance
58.IR LVDS1 .
59.TP
60\fBmode\fR=\fImode\fR
61Specify the video mode for the output. The argument
62.I mode
63can be one of the words
64.BR off " to turn the output off, "
65.BR preferred " to use the monitor's preferred video mode, or "
66.BR current " to use the current video mode and avoid a mode switch."
Ankit Nautiyalf82ff352097-03-19 00:24:56 +053067It can also be a resolution as:
68.TP
69\fBmode\fR=\fIwidth\fBx\fIheight\fR
70.TP
71\fBmode\fR=\fIwidth\fBx\fIheight\fB@\fIrefresh_rate\fR
72Specify a mode with a given refresh-rate measured in Hz.
73.TP
74\fBmode\fR=\fIwidth\fBx\fIheight\fB@\fIrefresh_rate ratio\fR
75Here \fIratio\fR is Picture Aspect-Ratio which can have values as 4:3, 16:9,
7664:27, and 256:135. This resolution-format helps to select a CEA mode, if such a
77video mode is present in the mode-list of the output.
78
79CEA defines the timing of a video mode, which is considered as a standard for
80HDMI spcification and compliance testing. It defines each and every parameter of
81a video mode, like hactive, vactive, vfront, vback etc., including aspect-ratio
82information. For CEA modes, the drm layer, stores this aspect-ratio information
83in user-mode (drmModeModeInfo) flag bits 19-22. For the non-CEA modes a value of
840 is stored in the aspect-ratio flag bits.
85
86Each CEA-mode is identified by a unique, Video Identification Code (VIC).
87For example, VIC=4 is 1280x720@60 aspect-ratio 16:9. This mode will be
88different than a non-CEA mode 1280x720@60 0:0. When the video mode
891280x720@60 0:0 is applied, since its timing doesnt exactly match with the CEA
90information for VIC=4, it would be treated as a non-CEA mode. Also, while setting
91the HDMI-AVI-Inforframe, VIC parameter will be given as '0'. If video mode
921280x720@60 16:9 is applied, its CEA timimgs matches with that of video mode with
93VIC=4, so the VIC parameter in HDMI-AVI-Infoframe will be set to 4.
94
95Many a times, an output may have both CEA and non-CEA modes, which are similar
96in all resepct, differing only in the aspect-ratio. A user can select a CEA mode
97by giving the aspect-ratio, along with the other arguments for the mode.
98By omitting the aspect-ratio, user can specify the non-CEA modes.
99This helps when certification testing is done, in tests like 7-27, the
100HDMI-analyzer applies a particular CEA mode, and expects the applied mode to be
101with exactly same timings, including the aspect-ratio and VIC field.
102
103The resolution can also be a detailed mode line as below.
Pekka Paalanen424820f2012-11-27 16:54:08 +0200104.TP
105\fBmode\fR=\fIdotclock hdisp hsyncstart hsyncend htotal \
106vdisp vsyncstart vsyncend vtotal hflag vflag\fR
107Use the given detailed mode line as the video mode for this output.
108The definition is the same as in
109.BR xorg.conf "(5), and " cvt (1)
110can generate detailed mode lines.
111.TP
112\fBtransform\fR=\fItransform\fR
113Transform for the output, which can be rotated in 90-degree steps
114and possibly flipped. Possible values are
115.BR normal ", " 90 ", " 180 ", " 270 ", "
116.BR flipped ", " flipped-90 ", " flipped-180 ", and " flipped-270 .
Pekka Paalanen325ff4c2018-04-23 11:44:59 +0200117.TP
118\fBpixman-shadow\fR=\fIboolean\fR
119If using the Pixman-renderer, use shadow framebuffers. Defaults to
120.BR true .
Pekka Paalanen944dd232017-11-03 09:56:05 +0200121.TP
122\fBsame-as\fR=\fIname\fR
123Make this output (connector) a clone of another. The argument
124.IR name " is the "
125.BR name " value of another output section. The
126referred to output section must exist. When this key is present in an
127output section, all other keys have no effect on the configuration.
128
129NOTE: cms-colord plugin does not work correctly with this option. The plugin
130chooses an arbitrary monitor to load the color profile for, but the
131profile is applied equally to all cloned monitors regardless of their
132properties.
Pekka Paalanen90718172018-05-23 14:34:36 +0300133.TP
134\fBforce-on\fR=\fItrue\fR
135Force the output to be enabled even if the connector is disconnected.
136Defaults to false. Note that
137.BR mode=off " will override " force-on=true .
138When a connector is disconnected, there is no EDID information to provide
139a list of video modes. Therefore a forced output should also have a
140detailed mode line specified.
Pekka Paalanen424820f2012-11-27 16:54:08 +0200141.
142.\" ***************************************************************
143.SH OPTIONS
144.
145When the DRM backend is loaded,
146.B weston
147will understand the following additional command line options.
148.TP
Pekka Paalanen424820f2012-11-27 16:54:08 +0200149.B \-\-current\-mode
150By default, use the current video mode of all outputs, instead of
151switching to the monitor preferred mode.
152.TP
Pekka Paalanen8a9c8b02017-03-28 18:14:37 +0300153\fB\-\-drm\-device\fR=\fIcardN\fR
154Use the DRM device
155.I cardN
156instead of the default heuristics based on seat assignments and boot VGA
157status. For example, use
158.BR card0 .
159.TP
Pekka Paalanen424820f2012-11-27 16:54:08 +0200160\fB\-\-seat\fR=\fIseatid\fR
161Use graphics and input devices designated for seat
162.I seatid
nerdopolisb16c4ac2018-06-29 08:17:46 -0400163instead of the seat defined in the environment variable
164.BR XDG_SEAT ". If neither is specifed, seat0 will be assumed."
Pekka Paalanen424820f2012-11-27 16:54:08 +0200165.TP
166\fB\-\-tty\fR=\fIx\fR
167Launch Weston on tty
168.I x
169instead of using the current tty.
170.
171.\" ***************************************************************
172.SH ENVIRONMENT
173.
174.TP
Pekka Paalanend61da832018-02-05 16:20:51 +0200175.B WESTON_LIBINPUT_LOG_PRIORITY
176The minimum libinput verbosity level to be printed to Weston's log.
177Valid values are
178.BR debug ", " info ", and " error ". Default is " info .
179.TP
Pekka Paalanen424820f2012-11-27 16:54:08 +0200180.B WESTON_TTY_FD
181The file descriptor (integer) of the opened tty where
182.B weston
183will run. Set by
184.BR weston-launch .
185.TP
186.B WESTON_LAUNCHER_SOCK
187The file descriptor (integer) where
188.B weston-launch
189is listening. Automatically set by
190.BR weston-launch .
nerdopolisb16c4ac2018-06-29 08:17:46 -0400191.TP
192.B XDG_SEAT
193The seat Weston will start on, unless overridden on the command line.
Pekka Paalanen424820f2012-11-27 16:54:08 +0200194.
195.\" ***************************************************************
196.SH "SEE ALSO"
197.BR weston (1)
198.\".BR weston-launch (1),
199.\".BR weston.ini (5)