Skip to content

Color profile mismatch on after resume from suspend #262

Description

@GodTamIt

This is a consolidation of discussion threads into an actual bug.

Threads

Symptoms

TLDR: everything is working perfectly fine on a dual-monitor setup on my 4090s - HDR is working perfectly fine. Then, I put computer to sleep and restore, all color on my monitors are washed out.

Some digging I did in the broken state:

  1. When running drm_info, both connected ports show: "HDR_OUTPUT_METADATA": blob = 0
  2. However, when running hyprctl monitors | rg "currentFormat", I get currentFormat: XBGR2101010 for both monitors.
  3. hyprctl reload doesn't seem to do anything to push new color info to monitors.
  4. Disabling and re-enabling monitors via hyprctl also did not seem to do anything.
  5. In the hyprland logs, there are some interesting error messages:
ERR from aquamarine ]: drm: Cannot commit when a page-flip is awaiting
DEBUG from aquamarine ]: drm: Disabling output DP-6
DEBUG from aquamarine ]: GBM: Allocated a new buffer with size [Vector2D: x: 3840, y: 2160] and format XR24 with modifier 216172782120099860 aka BLOCK_LINEAR_2D,HEIGHT=4,KIND=6,GEN=2,SECTOR=1,COMPRESSION=0
DEBUG from aquamarine ]: GBM: Allocated a new buffer with size [Vector2D: x: 3840, y: 2160] and format XR24 with modifier 216172782120099860 aka BLOCK_LINEAR_2D,HEIGHT=4,KIND=6,GEN=2,SECTOR=1,COMPRESSION=0
DEBUG from aquamarine ]: GBM: Allocated a new buffer with size [Vector2D: x: 3840, y: 2160] and format XR24 with modifier 216172782120099860 aka BLOCK_LINEAR_2D,HEIGHT=4,KIND=6,GEN=2,SECTOR=1,COMPRESSION=0
DEBUG from aquamarine ]: Swapchain: Reconfigured a swapchain to [Vector2D: x: 3840, y: 2160] XR24 of length 3
ERR from aquamarine ]: GBM: Failed to allocate a GBM buffer: format XR30 isn't supported by primary backend
ERR from aquamarine ]: Couldn't allocate a gbm buffer with size [Vector2D: x: 3840, y: 2160] and format XR30

It seems that the compositor and driver states are out of sync. Hyprland is trying to allocate a XR30 buffer and is getting rejected.

Otherwise, my setup is on NixOS -- all other parts are working just fine.

Attempted Fixes

I tested with the following overlay in NixOS and still see the above issues:

  aquamarine = prev.aquamarine.overrideAttrs (_old: {
    src = prev.fetchFromGitHub {
      owner = "hyprwm";
      repo = "aquamarine";
      rev = "d67142c8c0966c94ecf88beddb14003256d8058c";
      hash = "sha256-XXrDUeITQvDtejcRqJUnSCyjlU8pSDuOIBOA40udnPs="; # The real hash
    };
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions