Commit graph

199 commits

Author SHA1 Message Date
Derek Foreman
ed77aca2d8 compositor: check repaint_msec with a helper
Validate repaint_msec so it's not longer than a refresh interval.

Negative repaint windows will cause problems for frame scheduling in the
future, so remove them.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2025-12-16 10:58:01 -06:00
Erico Nunes
53895cac2f vulkan-renderer: support fragment debug binding
Add a debug binding and mode to highlight (green tint) what has
been rendered through vulkan-renderer composition. This is useful
to visually identify/debug clients which have been offloaded to
DRM planes, since those won't go through the renderer composition
process and therefore won't be highlighted the same way.
Since this is the first debug mode in vulkan-renderer, add some
initial infrastructure to handle debug bindings.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-10-28 07:43:53 +00:00
Elliot Chen
bef29b8774 libinput: support ignoring all libinput-based input devices by configuration
For some cases such as remote control, need to disable the interaction
between input device and the weston. It will not affect the use of input
device by other modules or applications.

Signed-off-by: Elliot Chen <elliot.chen@nxp.com>
2025-10-21 12:54:42 +03:00
Leandro Ribeiro
854457524c frontend: allow creating custom param color profiles from .ini
This allow users to specify a fully custom parametric color profile in
weston.ini for a certain output.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-10-09 16:17:57 +00:00
Pekka Paalanen
4890cd6a3d frontend: create automatic color profiles from .ini
This introduces a new key for outputs in weston.ini, "color-profile".
For starters, implement a pre-defined sRGB profile and an automatic
profile.

Automatic color profiles are created based on the colorimetry-mode and
the eotf-mode of the output. EDID can also be taken into account, but it
is opt-in due to its potential unreliability.

This feature is documented as not fully implemented, because color-lcms
does not yet handle parametric color profiles together with ICC
profiles. Specifically, the stock sRGB profile is still an ICC profile,
and would not be able to be used together with a parametric output
profile.

Co-authored-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-10-07 17:23:35 +03:00
Leandro Ribeiro
6fe0cfc2b8 color: introduce output color effects
Output color effects are applied to the whole output scenegraph. It
depends on color-management being disabled, as the color effects are
applied in sRGB content.

For now we added only a few accessibility options: color inversion,
deuteranopia, protanopia and tritanopia CVD correction.

Note that surfaces presented on outputs that contains a color effect
can't be used for direct scanout (i.e. bypass composition and offloading
to KMS overlay planes). The color effect is applied in our GL-renderer.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-09-18 12:32:13 -03:00
Leandro Ribeiro
c594aa22cb backend-drm: offload post-blend color transformation to KMS
In this patch we allow offloading the post-blend color transformation
to KMS.

As KMS currently only supports to offload the transformation in a LUT,
this may result in precision issues. So this introduces the config
option "offload-blend-to-output", which is disabled by default.

This option requires "color-management" to be enabled, otherwise it is
ignored.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-09-02 13:34:00 +00:00
Jaeyoon Jung
e91252a943 desktop-shell: Add scale-fit background type
It is similar to scale-crop but fits to the output so that the image
does not get cropped.

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
2025-08-18 16:42:26 +09:00
Marius Vlad
feb4fd1386 compositor, frontend: Allow to configure placeholder-color
This is a trivial change to allow passing a user-defined color to
specify the color for the placeholder.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-06-24 16:00:05 +03:00
Joshua Goins
dc33a296b8 doc: Update to the new --no-resizable RDP flag
This was changed in 75280d2e40 but only
updated in the weston CLI help. But there's still documentation leftover
in .ini files and manpages that refer to the older flag.

Signed-off-by: Joshua Goins <joshua.goins@kdab.com>
2025-06-04 15:38:05 -04:00
Marius Vlad
0600265c64 frontend: Make use of the advertised debug scopes
This patch introduces a new cmd line option, namely `--debug-scopes`
(or shorthand `-d`) to limit which debug scopes are being advertised
over the westond-debug protocol.

To avoid tedious work to make this work in the same time as `--debug`, a
boolean type of option which doesn't accept any other entries, I've
decided to have a dedicated string cmd line argument.

If passing `--debug` all debug scopes are advertised by default
(keep the same behaviour). If you'd like to limit which of those scopes are
advertised, use the -d and only that one those scopes be advertised.
Pass these as a command-separated list.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-06-04 17:43:47 +03:00
Derek Foreman
e91eccd709 lua-shell: Add lua-shell
lua-shell is a new meta-shell for Weston. It does nothing in and of
itself, but is defined to be user-scriptable and configurable. A
supplied Lua script will be interpreted and executed by Weston, allowing
full control over window management in response to events.

This includes a shell.lua example script which behaves as a tiling WM.

Co-authored-by: Michael Tretter <m.tretter@pengutronix.de>
Co-authored-by: Marius Vlad <marius.vlad@collabora.com>
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2025-06-04 15:47:06 +03:00
Marius Vlad
e70cfe319c fullscreen-shell: Deprecate fullscreen-shell and screenshare module
kiosk-shell/xdg-shell is the (more) modern approach, so let's inform
users that fullscreen-shell is going way.

This also adds an explicit dependency of shell-fullscreen for
screenshare. With this change, both screenshare and fullscreen-share
are disabled by default.

Fixes: #848

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-05-30 14:31:08 +03:00
Erico Nunes
8f56d03d4b libweston: Vulkan renderer
A Vulkan renderer for weston, based on the GL renderer.
The goal is to impose the least requirements as possible on Vulkan
implementations, as to allow even Vulkan 1.0 (or early development)
drivers to run a Wayland compositor. Any additional features or
extensions are made optional if possible.
Currently supports drm, wayland, x11 and headless backends.
As of this implementation, this is still considered an experimental
renderer.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-23 20:36:05 +01:00
Derek Foreman
c7cf87fe85 frontend: Enable VRR from the config file
Allow weston.ini to enable game VRR.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2025-02-21 06:49:42 +00:00
Paul Pu
ddb6225338 desktop-shell: support disallow-output-changed-move
With this, when unplugging an extended display, the view displayed on
the extended display won't be re-positioned to other displays.

On some embedded devices, the views are often fullscreen displayed, even
on the extended displays. When disconnecting the extended displays, the
views are not desired to be moved onto the existing displays. Without
this change, we can see the view flash across the existing displays
even though the UI program hides the view as soon as it can, which is
unexpected.

Signed-off-by: Paul Pu <hui.pu@gehealthcare.com>
2025-01-14 08:05:14 +00:00
Derek Foreman
264c205add desktop-shell: Make backgrounds fully opaque
Non-opaque backgrounds don't make sense, and cause rendering
problems.

Silently set backgrounds fully opaque, and remove any mention of
alpha from the man page.

Kiosk-shell already implicitly forces opaque backgrounds.

Old weston.ini with FF for alpha will always continue to work.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-12-11 10:03:37 -06:00
Lukasz Czechowski
2fe23ad389 man: Update documentation of weston-vnc
Document the possibility to enable VNC backend with password-only
authentication.

Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
2024-08-14 07:48:09 +00:00
Marius Vlad
e7ed5d201a weston.ini: Document the 'mirror-of' key
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Marius Vlad
d88782bf41 frontend/man: Use 'clone-of' instead of 'same-as'
Rather than using the same key entry for the DRM backend to cloned
outputs, rename to 'clone-of'. This means that ini configuration files
will break after this change, but this should be documented with the
next Weston release.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-12 15:50:13 +00:00
Leandro Ribeiro
f271dd34b6 compositor: delete cms-static and cms-colord plugins
Plugins cms-static and cms-colord were deprecated with "compositor:
deprecate cms-static and cms-colord plugins", and the promise was that
we'd delete them if no one complained.

They were deprecated 2 years ago, and no one bothered. So it's about
time to delete them.

See https://gitlab.freedesktop.org/wayland/weston/-/issues/634.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-08-05 11:47:30 +03:00
Derek Foreman
629abeaf36 man: Remove binding documentation for desktop zoom
This feature has been removed, so the documentation for it should be
removed as well.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-07-15 14:45:10 +00:00
Marius Vlad
3bb9b664ad weston-drm: Add a note into man page about gbm-format
We do inform users when this is not happening, add also a note about that
in the man page.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-07-11 10:53:46 +00:00
Loïc Molinari
e512f5482d gl-renderer: Remove shaders debug mode
The shaders debug mode doesn't have much interest now that other more
specific debug modes show shaders too.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-07-04 14:15:04 +00:00
Loïc Molinari
b18a4948a3 gl-renderer: Add opaque debug mode
The opaque debug mode highlights damaged opaque surfaces with a blue
tint.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-07-04 14:15:04 +00:00
Loïc Molinari
a804ef00ee gl-renderer: Add damage debug mode
The damage debug mode highlights damaged surfaces with a red tint.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-07-04 14:15:04 +00:00
Loïc Molinari
a97307b19b gl-renderer: Add batches debug mode
The batches debug mode tints each batch of a repaint pass in a
different color in order to highlight batches.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-07-04 14:15:04 +00:00
Loïc Molinari
6fe2221655 gl-renderer: Make wireframe a debug mode
In order to avoid the complexity of handling multiple debug modes at
the same time, this commit makes wireframe a proper debug mode. It
also uses the new tinting system to make the white wireframe pop over
a darkened damaged region.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-07-04 14:15:04 +00:00
Loïc Molinari
6634849dd5 gl-renderer: Set up debug mode infrastructure
Set up debug mode initial infrastructure using a dedicated key binding
and make shaders debug a debug mode.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-07-04 14:15:04 +00:00
Loïc Molinari
26a69cb2f2 gl-renderer: Rename fan debug mode to wireframe debug
There's no fans anymore, so wireframe makes more sense now.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-06-04 17:24:12 +00:00
Pekka Paalanen
a7a47503f1 frontend: add colorimetry-mode to weston.ini
This output section key is used to program the KMS connector property
"Colorspace" when used with the DRM-backend.

This is an essential part in defining the color encoding used in the
video signal, and may allow wide color gamut even on SDR.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-05-06 10:39:42 +00:00
Loïc Molinari
5791bdf6ec backend-headless: Improve documentation
Add a section about the headless backend to the main Weston manual
page and describe the current CLI options as well the new
`--refresh-rate` one.

Fix the incorrect list of supported transforms in the CLI usage.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-02-22 14:26:32 +00:00
Nicholas Niro
ab747b7c79 man: Document the new 'command input' feature
Added an entry with examples into the man page and also
into frontend/main.c for the '--help' interface.

Signed-off-by: Nicholas Niro <blowfist@xroutine.net>
2024-01-26 09:32:46 +00:00
Dylan Aïssi
7e150101ba man: fix typos
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
2024-01-25 21:43:24 +01:00
Philipp Zabel
ddf4327116 man: Document VNC --address argument
Add missing documentation for the --address command-line argument
that lets the VNC backend listen only on a specified IP address.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-12-06 10:19:32 +01:00
Philipp Zabel
46d3487abf man: Document VNC output section
Document the VNC [output] section in the weston-vnc manpage.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-10-05 11:43:21 +02:00
Marek Vasut
bd3de08b13 backend-drm: document additional-devices parameter
Document the --additional-devices parameter to Weston to add secondary
DRM devices that will only be used as outputs, but not for rendering.

Fixes: 3c6cfe6bf4 ("backend-drm: add additional-devices to support multi GPU")
Signed-off-by: Marek Vasut <marex@denx.de>
2023-10-03 12:29:21 +00:00
Philipp Zabel
0b00090fdc doc, man: document multi-backend support
Add a paragraph describing multi-backend support to running-weston.rst
and update the --backend parameter documentation in weston.man.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-09-28 14:02:04 +00:00
Philipp Zabel
3523de6b8f man: Document tls-cert and tls-key config options
Document the new tls-cert and tls-key config options in the weston-rdp
and weston-vnc man pages.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-07-14 10:45:25 +00:00
Daniel Stone
386dcd904f build: Switch join_paths(foo, bar) to foo / bar
Available since Meson 0.49.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-06-22 14:31:57 +01:00
Michael Tretter
914be30bc0 backend-drm: change default for required-outputs to any
On a desktop system, the expected behavior during a Weston start is that if any
monitor can be enabled, Weston starts up and enables the monitor. Outputs that
could not be enabled, stay disabled. This helps the user in debugging the failed
outputs.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2023-06-20 19:46:11 +00:00
Michael Tretter
20508c148e backend-drm: add config option require-outputs
If Weston fails to configure a DRM output for whatever reason, it will fail to
start. Depending on the use-case, this may or may not be the correct behavior.

Add the "require-outputs" option to allow configuring the error behavior on
missing outputs.

Add documentation of the possible options to the man page.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2023-06-20 19:46:11 +00:00
Pekka Paalanen
406e3d2ab9 man: make --wait-for-debugger findable
One .TP was lost, causing --wait-for-debugger section to be merged in
the previous section. Fix it.

Fixes 5ffda17e21

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2023-05-31 15:19:36 +03:00
Philipp Zabel
fe69b9f52e doc, man: document PipeWire backend
Add documentation for the PipeWire backend.

Co-authored-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2023-04-18 10:48:50 +00:00
Philipp Zabel
397e66a4dd backend-drm: allow more formats with pixman-renderer
Clean up the code a little by dropping the now unnecessary switch case
in drm_output_init_pixman(). As a side effect, this enables all formats
that have a pixman_format entry in the pixel format table:

  - rgb565
  - xrgb8888
  - argb8888
  - xbgr8888
  - abgr8888
  - rgbx8888
  - rgba8888
  - bgrx8888
  - bgra8888
  - xrgb2101010
  - argb2101010
  - xbgr2101010
  - abgr2101010

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-01-31 15:32:24 +00:00
Daniel Stone
75b3ecfcc3 frontend: Add common --renderer=foo argument
Rather than reinventing --use-pixman and --use-gl throughout each
backend, just have a common --renderer=foo argument which can be used to
explicitly specify the renderer.

The old arguments are still handled for backwards compatibility.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-01-10 10:59:04 +02:00
Daniel Stone
35f04139c8 man: Reformat shell section, add kiosk-shell
Reformat the shell section of the manpage to be more similar to the backend
section.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-01-10 10:53:02 +02:00
Daniel Stone
2c3693bf2e frontend: Use short-form names for shell argument
Instead of passing --shell=foo-shell.so, just pass --shell=foo, whilst
accepting the old form for compatibility.

Whilst we're at it, document the --shell argument in the manpage and
README.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-01-10 10:53:02 +02:00
Daniel Stone
50809097a8 man: Rewrite Xwayland section
Try to make it more useful and accessible to users. And capitalise it
correctly.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-01-03 11:12:03 +02:00
Daniel Stone
a14fa9071c man: Make --config vs. --no-config more explicit
Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-01-03 11:12:03 +02:00