[need testing] Krita HDR support on Wayland

Hi, all!

I have just merged the Wayland HDR support into Krita Next (nightly)! If you happen to have an HDR-capable display and use Linux/Wayland and have a bit of time to test the new feature, I would be really appreaciate a little bit of help with testing.

The situation is actually a little bit complicated, since there are numerous implementations of the Wayland protocol. I have tested with KWin only, and it would be nice to test on other compositors as well.

Package (uses Qt6):

How to run in Wayland mode:

QT_QPA_PLATFORM=wayland krita-*.AppImage

What changed (and should be tested):

  1. The color management settings page has changed completely:

    To get proper color management (and HDR) you need to check Enable canvas color management checkbox and make sure that Current canvas surface bit depth label says 10-bit. Please take it into account that the change of canvas’ bit-depth can requires Krita restart. It happens due to technical limitations of Qt.

  2. After you made sure that Krita uses 10-bit mode, you can enable HDR in your window manager, e.g. in KWin. Krita should detect it instantly (without any restart).

    Good HDR test images can be found here: GitHub - AcademySoftwareFoundation/openexr-images: Collection of images associated with the OpenEXR distribution

  3. If you have multiple displays, one of which HDR, and the other not, then moving Krita’s window between the screens should enable/disable HDR.

  4. [for SDR mode] Image->Image Properties->Softproofing page has been completely rewritten. Now there is no “Adaptation” slider. There is a checkbox instead. The user is left with either “full
    adaptation” or “no adaptation”. Please take it into account that on Wayland this checkbox currently does nothing and Krita behaves as if it is always enabled (Wayland does not support “no adaptation” right now).

    Otherwise, Softproofing dialog should work as before in SDR mode.

Note

If you happen to face any color-management problem on Wayland, you can check (and attach to the bug report) a special color management report from Help->Show color management information. It shows information about everything, canvas, your display and your compositor.

3 Likes

I have a m28u monitor which seems to be ok for HDR according to rtings review. I’m on arch linux and on Kwin/KDE. I’ve enabled HDR in my display settings for the m28u

I followed your steps and to enable 10bit mode:

On the openxr github are there any images you recommend to view? I’m not sure how to be able to “tell” HDR is enabled.

I did get a crash moving Krita between my m28u monitor and my non HDR monitor. I’m not sure if its related:

This plugin does not support setting window opacity
QWidgetRepaintManager: skipped frames: 0 %
[1]    61826 segmentation fault (core dumped)  QT_QPA_PLATFORM=wayland ./krita-6.0.0-prealpha-d5143427b6-x86_64.AppImage

Hi, @Reinold!

On the openxr github are there any images you recommend to view?

StillLife.exr and Desk.exr are good examples.

I’m not sure how to be able to “tell” HDR is enabled

HDR is disabled on your system. ColorSpace->Luminance->maxLuminance value should be higher than referenceLuminance to count as HDR. And KWin usually enables st2084_pq transfer function in HDR mode.

What version of KWin you use?

UPD:

If you manage to produce a backtrace for this crash (even without debugging symbols), it would help a lot.

Tested this build with StillLife.exr and no dice. The image loads, but is extremely blown out and for some reason has an off-white background rather than the usual Krita grey. I tested with some SDR images for comparison and those were blown out too. The “display format” in HDR settings shows as 10 bits, although is grayed out and says 8 bits is the selected option.

I’m running an Alienware AW3423DWF monitor on Fedora 42 with a Radeon RX 7900 XTX GPU, and have been able to run other HDR applications fine. The colour management information is as follows:

Main Window 
=== 

Native window handle: QWidgetWindow(0x5604ca856c50, name="MainWindow#1Window") 

Configured mode: CanvasSurfaceMode(Rec709g22) 
Configured intent: RenderIntent(render_intent_perceptual) supported: true 
Actual intent: RenderIntent(render_intent_perceptual) 

Active surface description: 
  Color Space: 
    Primaries:  NamedPrimaries(primaries_srgb) 
    Transfer Function:  NamedTransferFunction(transfer_function_gamma22) 
    Luminance:  Luminance(minLuminance: 50, maxLuminance: 533, referenceLuminance: 533) 
  Mastering Info: <none> 
 

Selected Profile: Krita Rec. 709 Gamma 2.2 
    primaries: Rec. 709 
    transfer:  Gamma 2.2 

    red:   xyY(x: 0.639999, y: 0.33001, Y: 0.212644) 
    green: xyY(x: 0.300008, y: 0.599998, Y: 0.715162) 
    blue:  xyY(x: 0.150002, y: 0.0599968, Y: 0.0721898) 
    white:  xyY(x: 0.312702, y: 0.328999, Y: 0.999995) 

Compositor preferred surface description: 
  Color Space: 
    Primaries:  
        Red:  xy(x: 0.708, y: 0.292) 
        Green:  xy(x: 0.17, y: 0.797) 
        Blue:  xy(x: 0.131, y: 0.046) 
        White:  xy(x: 0.349932, y: 0.355627) 
    Transfer Function:  NamedTransferFunction(transfer_function_st2084_pq) 
    Luminance:  Luminance(minLuminance: 50, maxLuminance: 10000, referenceLuminance: 533) 
  Mastering Info: 
    Primaries:  
        Red:  xy(x: 0.707031, y: 0.28418) 
        Green:  xy(x: 0.245117, y: 0.71582) 
        Blue:  xy(x: 0.146484, y: 0.052734) 
        White:  xy(x: 0.349932, y: 0.355627) 
    Luminance:  MasteringLuminance(minLuminance: 40, maxLuminance: 761) 
    Max CLL:  "761" 
    Max FALL:  "223" 
 

 
Document: "document_0" path: "/home/sjohal/Downloads/StillLife.exr" 
=== 

Native window handle: QWidgetWindow(0x5604d7db5070, name="KisOpenGLCanvas2ClassWindow") 

(canvas bit depth report) 

Texture Format:  0x8059  ( GL_RGB10_A2 ) 
FBO Buffer Size:  R:  10   G:  10   B:  10   A:  0 
Window Buffer Size:  R:  10   G:  10   B:  10   A:  0 
Global Buffer Size:  R:  10   G:  10   B:  10   A:  2 

(canvas surface color manager)

Configured mode: CanvasSurfaceMode(Preferred) 
Configured intent: RenderIntent(render_intent_perceptual) supported: true 
Actual intent: RenderIntent(render_intent_perceptual) 

Active surface description: 
  Color Space: 
    Primaries:  
        Red:  xy(x: 0.708, y: 0.292) 
        Green:  xy(x: 0.17, y: 0.797) 
        Blue:  xy(x: 0.131, y: 0.046) 
        White:  xy(x: 0.349932, y: 0.355627) 
    Transfer Function:  NamedTransferFunction(transfer_function_gamma22) 
    Luminance:  Luminance(minLuminance: 0, maxLuminance: 10000, referenceLuminance: 80) 
  Mastering Info: <none> 
 

Selected Profile: Krita Unspecified Gamma 2.2 
    primaries: Unspecified 
    transfer:  Gamma 2.2 

    red:   xyY(x: 0.70801, y: 0.291995, Y: 0.295195) 
    green: xyY(x: 0.170002, y: 0.796995, Y: 0.660065) 
    blue:  xyY(x: 0.131005, y: 0.046004, Y: 0.0447535) 
    white:  xyY(x: 0.34993, y: 0.355629, Y: 1.00001) 

Compositor preferred surface description: 
  Color Space: 
    Primaries:  
        Red:  xy(x: 0.708, y: 0.292) 
        Green:  xy(x: 0.17, y: 0.797) 
        Blue:  xy(x: 0.131, y: 0.046) 
        White:  xy(x: 0.349932, y: 0.355627) 
    Transfer Function:  NamedTransferFunction(transfer_function_st2084_pq) 
    Luminance:  Luminance(minLuminance: 50, maxLuminance: 10000, referenceLuminance: 533) 
  Mastering Info: 
    Primaries:  
        Red:  xy(x: 0.707031, y: 0.28418) 
        Green:  xy(x: 0.245117, y: 0.71582) 
        Blue:  xy(x: 0.146484, y: 0.052734) 
        White:  xy(x: 0.349932, y: 0.355627) 
    Luminance:  MasteringLuminance(minLuminance: 40, maxLuminance: 761) 
    Max CLL:  "761" 
    Max FALL:  "223" 
 

 
Screen: "DP-1" "Dell Inc." "AW3423DWF" [CURRENT] 
=== 

  Color Space: 
    Primaries:  
        Red:  xy(x: 0.708, y: 0.292) 
        Green:  xy(x: 0.17, y: 0.797) 
        Blue:  xy(x: 0.131, y: 0.046) 
        White:  xy(x: 0.349932, y: 0.355627) 
    Transfer Function:  NamedTransferFunction(transfer_function_st2084_pq) 
    Luminance:  Luminance(minLuminance: 50, maxLuminance: 10000, referenceLuminance: 533) 
  Mastering Info: 
    Primaries:  
        Red:  xy(x: 0.707031, y: 0.28418) 
        Green:  xy(x: 0.245117, y: 0.71582) 
        Blue:  xy(x: 0.146484, y: 0.052734) 
        White:  xy(x: 0.349932, y: 0.355627) 
    Luminance:  MasteringLuminance(minLuminance: 40, maxLuminance: 761) 
    Max CLL:  "761" 
    Max FALL:  "223" 
 
Color management plugin report 
=== 

Wayland color management plugin report 

Supported Features: 
    feature_icc_v2_v4: no
    feature_parametric: yes
    feature_set_primaries: yes
    feature_set_tf_power: no
    feature_set_luminances: yes
    feature_set_mastering_display_primaries: yes
    feature_extended_target_volume: yes
    feature_windows_scrgb: yes

Supported Render Intents:
    render_intent_perceptual: yes
    render_intent_relative: yes
    render_intent_saturation: no
    render_intent_absolute: yes
    render_intent_relative_bpc: yes

Supported Transfer Functions:
    transfer_function_bt1886: no
    transfer_function_gamma22: yes
    transfer_function_gamma28: no
    transfer_function_st240: no
    transfer_function_ext_linear: yes
    transfer_function_log_100: no
    transfer_function_log_316: no
    transfer_function_xvycc: no
    transfer_function_srgb: yes
    transfer_function_ext_srgb: no
    transfer_function_st2084_pq: yes
    transfer_function_st428: no
    transfer_function_hlg: no

Supported Primaries:
    primaries_srgb: yes
    primaries_pal_m: yes
    primaries_pal: yes
    primaries_ntsc: yes
    primaries_generic_film: yes
    primaries_bt2020: yes
    primaries_cie1931_xyz: yes
    primaries_dci_p3: yes
    primaries_display_p3: yes
    primaries_adobe_rgb: yes