Skip to content

Colord integration (Pt. 1, device management)

Jonas Ådahl requested to merge jadahl/mutter:wip/colord-integration into main

Edit: This MR now only contains the color device management. The documentation describes the end result of all merge requests in this series.


This merge request introduces all the color management related features that until now lived in gnome-settings-daemon's color plugin (gsd-color). This means integrating with colord (creating color devices and color profiles), applying color profiles configured by colord, handling night light temperature application.

What gsd-color still continues to do is primarily night light tracking. It does this by (already) exposing the current state (on/off) and temperature via D-Bus, and mutter simply keeps track of this when applying profiles to monitors.

What this branch does NOT do is provide Wayland style color management; this is more or less exactly what gsd-color did, except with the added bonus of fixing tiled monitor related bugs.

Edit: It is a continuation of what @jeremycline started here: !1943 (closed).

Implementation

As for the structure, it introduces the following types:

MetaColorManager

Main object aiming to do high level color management. It adds and removes color devices, listens for updates and applies profiles.

MetaColorManagerX11

X11 specific color management, e.g. setting X11 Atoms related to color management. I expect this to take over more functionality that currently lives in MetaColorManagement as Wayland style color management gets introduced.

MetaColorStore

Handles caching color profiles, as well as detecting on-disk profiles (~/.local/share/icc/).

MetaColorDevice

A color device. There exists one color device per connected monitor. Note that this means that for tiled monitors, i.e. one with multiple connectors and CRTCs there will only exist one color device. Each color device has one colord device associated with it that it created and manages.

MetaColorProfile

A color profile. Consists of a colord profile, as well as an ICC profile. There are a few types:

  • Automatically generated from the EDID (managed by mutter)
  • Automatically generated from EFI (currently untested, only applies to some laptop panels with ICC profiles in the EFI) (managed by mutter)
  • Standard profiles, e.g. sRGB (managed by colord)
  • Calibration profiles, created by calibrating a monitor e.g. using ColorHug. (managed by mutter)

Future work

Wayland style color management is quite different from what is introduced here; this means that there will be significant changes still needed for that work. This work here primarily aims taking over existing functionality from gnome-settings-daemon, but hopefully some of the introduced functionality can be reused, e.g. color device and color profile abstraction. Time will tell how much will need to be split into a native backend and X11 backend subclasses, e.g. whether the color management in the native backend will make use of colord at all or not.


Marked as draft as it includes !2126 (merged), !2140 (merged) and !2139 (merged).

Edited by Jonas Ådahl

Merge request reports