Skip to content

Draft: Use colord for display color profiles

Jeremy Cline requested to merge jeremycline/mutter:colord-integration into main

colord[0] is a system service to generate, install, and manage color profiles for input/output devices. It is already used by gnome-settings-daemon to configure devices and map color profiles to them.

This commit removes Mutter's DBus interface for changing the color look-up table ("gamma") for a particular CRTC. This is replaced by having Mutter act as a client to colord. Users that wish to change the color profile of a device no longer need to configure colord which is then queried by a service (GSD) that passes the data on to Mutter.

A new manager object, the MetaColorManager, has been added and is owned by a backend. It is intended to be the interface for all color-related tasks like color space transformations, target color space for displays, Night Light functionality, and so on. This manager includes a colord client which reacts to color profile changes and should ensure that they work smoothly with the aforementioned feature.

This commit leaves some amount of work undone, but is being submitted now as I am changing jobs and may not be able to finish it up. Specifically:

  • Color space transformations are not yet implemented. This is implemented in GSD which should be a solid reference[1].

  • The color manager temperature() API isn't exposed publicly yet. This is needed so that users of Mutter can implement Night Light. Currently, Night Light is implemented in GSD.

  • The interfaces on the monitor manager object that interact directly with the CRTC would probably benefit from being refactored.

  • Getting the current LUT is stubbed out since a display could be backed by multiple CRTCs and it seemed best to solve that after figuring out where the interfaces above get shuffled to.

  • The usage of GObject is probably awful as I am not at all familiar with it or conventions around it.

  • There's no tests and probably a healthy number of memory leaks, null pointers, and use-after-frees.

  • General lack of polish

[0] [1] gnome-settings-daemon@e90a75fd

Cc: @jadahl

Merge request reports