It is intended to replace using GetResources() and ChangeBacklight().
It moves from a normalized 1-100 numbers, to directly exposing the
hardware. This more closely maps to how gsd-backlight.c in
gnome-settings-daemon normally works, and simplifies the API a bit to
not have to deal with rounding issues.
There is still no KMS uAPI for this, so it still only hooks up to
XRANDR. Being private API, it doesn't try very hard to predict how the
KMS uAPI will look. When that day comes, it will likely need some
adaptations.
Part of the motivation here is to get something for gsd-backlight.c to
use where it can work more similarly to how the current common case
(sysefs) works, while attempting to migrate away from libgnome-rr.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3861>
With the next commits we'll introduce a new mode for scaling of Xwayland apps,
we'll want to put this mode behind an experimental setting though, so add
that setting.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3567>
This replaces the `legacy-ui-scaling-factor` entry in
`org.gnome.Mutter.DisplayConfig`, with the motivation being to no longer
expose X11 specific state via the monitor configuration API.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3567>
Add a new service client type for a filechooser portal client, and
expose the x11_interop protocol to it.
This will be used to make Nautilus a file chooser portal implementation.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3694>
Allow compositing in a linear color space and do so either when forcing
it via the debug controls D-Bus API, or when the experimental HDR mode
is enabled.
This relies on paint nodes etc to actually transform everything into the
linear target color space, which isn't done yet, so enabling it right
now will cause a broken result. Yet, introduce this now, so that
painting can be fixed piece by piece.
Linear blending is automatically enabled on monitors where HDR is
enabled, as this makes it possible to use an linear color space when
blending content from different color spaces with different transfer
functions.
Linear blending requires extra precision, i.e. 16 bit per channel
in the intermediate buffer due how the values are distributed,
so only enable the experimental HDR mode if the Cogl context supports
half float formats.
By default, no intermadiate linear offscreen framebuffer is used.
To test, do e.g.
./tools/debug-control.py --toggle ForceLinearBlending
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3433>
Require the "variable-refresh-rate" keyword under the
"experimental-features" gsetting to enable the feature for now.
It would no longer be required once the experience with variable
refresh rate is good enough for general use and handles all common
use cases well.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1154>
To paraphrase jadahl: we have a dedicated KMS thread now, which also
has realtime scheduling enabled unconditionally. realtime scheduling
on the main thread isn't too great of an idea, considering GC can
take a hot minute.
And to quote rmader: we most likely won't be able to make the main
thread rt as long as we use GJS and thus have GC.
So let's get rid of it! It's just been breaking things anyways.
This just ignores the setting; we'll fully remove it when GNOME 46
comes around.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3296>
The debug controller can optionally, when passing --debug-control,
enable manipulating debug state, so far enabling/disabling HDR, via
D-Bus.
It's always created, in order to have a place to store debug state and
emit signals etc when it changes, but so far, it doesn't have its own
state it tracks, it just mirrors that of the monitor manager.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3432>
When a stream is destroyed by a consumer, mutter won't be able to
recognize that.
For mutter, the stream just paused, but did not disconnect, because the
connection state of a PipeWire stream only represents, whether the
respective PipeWire context is connected to PipeWire.
In addition to that, it may be the case, that the stream consumer just
recreates the stream.
So even if mutter would be able to know, when the stream consumer
destroyed a stream, but not the whole screencast or remote-desktop
session, then mutter would not know, whether the stream will be resumed
eventually or not.
So, add an explicit API call to the screencast interface to stop a
stream.
For virtual streams, this also means, that the respective virtual
monitor is destroyed.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2889
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3307>
Remote desktop version 2 added a new method ConnectToEIS .
ConnectToEIS allows clients to requests a file descriptor from the
compositor which can then be used directly from libei.
Once established, the communication between compositor and application
is direct, without the need to go through the portal process(es).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2628>
This adds the actual input capturing rerouting that takes events and
first hands them to the input capture session, would it be active.
Events are right now not actually processed in any way, but will
eventually be passed to a libei client using libeis.
A key binding for allowing cancelling the capture session is added
(defaults to <Super><Shift>Escape) to avoid getting stuck in case the client
doesn't even terminate the session.
The added test case makes sure that the pointer moves again after
pressing the keybinding.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2628>
This API aims to provide a way for users to capture input devices under
certain conditions, for example when a pointer crosses a specified
barrier.
So far only part of the API is implemented, specifially the session
management as well as zone advertisement, where a zone refers to a
region in the compositor which edges will eventually be made available
for barrier placement.
So far the remote access handle is created while the session is enable,
despite the input capturing isn't actually active yet. This will change
in the future once it can actually become active.
v2: Remove absolute/relative pointer, keep only pointer (ofourdan)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2628>
Original commit message:
> ATM sending modifiers to clients prevents direct scanout for DRI3
> clients via Xwayland. Xwayland using the dma-buf feedback v4 Wayland
> protocol will solve that, but that might take a while yet to appear in
> the wild. Once that happens, this can be reverted.
>
> Direct scanout still works for native Wayland clients as well.
Xwayland got support for v4 in 23.1.0, thus let's reenable modifiers on
AMD.
This reverts commit 2f825f3a86.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3030>
Fix the following warnings reported by udevadm verify:
data/61-mutter.rules:2 Whitespace after comma is expected.
...
data/61-mutter.rules:116 Whitespace after comma is expected.
data/61-mutter.rules: udev rules check failed
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3011>
The service channel D-Bus interface aims to be a "back door" for
services that needs special casing in Mutter, e.g. have custom private
protocols only meant to be used by that particular service.
There are currently no special casing implemented; only the basic
service channel infrastructure is added. There is a single method on the
interface, that is meant to eventually be used by
xdg-desktop-portal-gnome to open a Wayland connection with a private
protocol needed for the portal backend's rather special window
management needs.
The service channel Wayland client works by allowing one instance of
each "type", where each time needs to be defined to work in parallel. If
a new service client connects, the old one will be disconnected.
MetaWaylandClient's are used to manage the service clients, and are
assigned the service client type.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2810>
The X-GNOME-Bugzilla-* entries in the desktop file were for use by
bug-buddy, a GNOME 2 technology that's been gone for over a decade.
These entries are obsolete and the desktop file can be removed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2621>
Currently subschemas in org.gnome.mutter are marked as child schemas,
but subschemas in org.gnome.mutter.wayland are not. There's no harm
with that, it's just nice to be consistent, and having schemas show
up in `gsettings list-children` is a nice touch.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2809>
Recent versions of Xwayland can allow or disallow X11 clients from
different endianess to connect.
Add a setting to configure this feature from mutter, who spawns
Xwayland.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2785>
When modifiers are enabled on mutter on some of the older i915 systems observed
Black-screen on 2nd monitor during multi-head use cases, upon debugging observed
that disabling modifiers on these systems resolved the Black-screen issue:!1618.
This issue depends whether we have enough DBuf space to provide required bandwidth
for the userspace demands. Those platforms which have less Display Buffer, will
just have more chance to face lack of it. However it still depends on various
factors like amount of planes(i.e the more planes we have, the more we divide the buffer),
refresh rate, bpp and so on.
This affects watermark calculations and the minimum blocks required for at least
wm level 0. If we don't have sufficient ddb at least for wm0 for all planes in
the configuration then it is rejected.
Until we have TEST_ONLY commit solution is built we could make sure to disable
modifiers support on these older i915 systems based on udev rules defined in this commit.
This commit makes sure that modifiers are still usable on latest i915 systems.
List of PCI-IDs are referred from:
f8bf2a9a15/include/pci_ids/iris_pci_ids.h
Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/1618
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2641>
ATM sending modifiers to clients prevents direct scanout for DRI3
clients via Xwayland. Xwayland using the dma-buf feedback v4 Wayland
protocol will solve that, but that might take a while yet to appear in
the wild. Once that happens, this can be reverted.
Direct scanout still works for native Wayland clients as well.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2637>
Currently, the peripheral "output" setting will be unset if Mutter is
deciding automatically the mapped output of a tablet device. In that
case, gnome-control-center will have a hard time figuring out itself
the better output to show the tablet calibration UI, unless it's hand
held by Mutter.
Add this private D-Bus interface so that gnome-control-center can look
up the output as determined by Mutter to bring the missing harmony
between both. This interface consists of a simple method to get the
mapped output for a input device node.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2605>
It uses the org.gnome.SettingsDaemon.Power.Screen D-Bus API. Currently
brightness set if the proxy is not ready are ignored; whether the
brightness value should be cached and set once it appears or whether
color profiles should be reapplied is yet to be decided.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2165>
gsd-color provides this API, which exposes details about the night light
state. Currently, gsd-color also turns this state into CRTC gamma
changes, but this will eventually change, and this is a preparation for
this.
The proxy isn't yet used for anything.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2164>
We now only enable DMA buffer based PipeWire screen casting if a
format/modifier has been negotiated. This practically means a consumer
is aware about what is needed, and we should not try to predict that it
uses the DMA buffer the right way (i.e. not mmap:ing directly).
However, in case we're not hardware accelerated, we never want to
attempt to use DMA buffer screen sharing, as we want to avoid
compositing into a DMA buffer on such hardware as doing so can be very
slow.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2086>
When using Xwayland-on-demand (default), if the (experimental) autoclose
features is enabled, we can rely on Xwayland's auto-terminate feature
instead of explicitly killing the Xwayland process.
With it, gone is the mechanism that was added to check the X11 clients
connected and their executable to check whether we can (safely) kill
Xwayland.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
Adding a <dbus/> element containing a boolean (yes/no) determines
whether org.gnome.Mutter.DisplayConfig ApplyMonitorsConfig will be
callable. The state is also introspectable via the
ApplyMonitorsConfigAllowed property on the same interface.
For example
<monitors version="2">
<policy>
<dbus>no</dbus>
</policy>
</monitors>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2030>
The code style in the remote-desktop API is currently a mess.
While, the overall code style in mutter and gnome-remote-desktop is to
use spaces as tabulator, the remote-desktop API is mixed with both
spaces as tabulators and actual tabulators.
In addition to that, the code style in the XDG desktop portal APIs uses
spaces as tabulators as well.
To unify the code style, replace all actual tabulators with spaces.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2255>
The code style in the screencast API is currently a mess.
While, the overall code style in mutter and gnome-remote-desktop is to
use spaces as tabulator, the remote-desktop API is mixed with both
spaces as tabulators and actual tabulators.
In addition to that, the code style in the XDG desktop portal APIs uses
spaces as tabulators as well.
To unify the code style, replace all actual tabulators with spaces.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2255>
The only currently known issue with allocating scanout buffers with
modifiers is memory constraints in multi head setups. Heuristics for
handling that are not implemented, but since it doesn't apply to
anything but i915, remove the other drivers from the deny list.
The other drivers had modifiers disabled to marginally increase the
chance of becoming scanout-able when allocated by Xwayland.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2146>