Bug 500210

Summary: ICC profiles disable brightness control in SDR on Wayland
Product: [Plasma] kwin Reporter: Real Name Here <lastminutejanedoe>
Component: colour-managementAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, xaver.hugl
Priority: NOR Keywords: regression
Version First Reported In: 6.3.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 6.3.2
Sentry Crash Report:

Description Real Name Here 2025-02-16 19:49:37 UTC
SUMMARY
Changing screen brightness via qdbus or applet no longer works in SDR, only HDR mode.

STEPS TO REPRODUCE
1. Decrease screen brightness by 50% via qdbus: qdbus6 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness $(($(qdbus6 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightness) - 5000))
2.  Decrease screen brightness via Brightness and Color applet

OBSERVED RESULT

Screen brightness doesn't change unless I switch to HDR

EXPECTED RESULT

Screen brightness change regardless of color space

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.12.13
GPU Driver: NVIDIA 565.77

ADDITIONAL INFORMATION

This works perfectly with plasma 6.2.5. When changing brightness via the applet in 6.2.5 the logs generate this message: plasmashell[3337]: ignoring brightness change, it's coming from the applet itself.  However, there aren't any messages in 6.3 even after setting export QT_LOGGING_RULES="kwin_*.debug=true"
Comment 1 Real Name Here 2025-02-16 20:28:13 UTC
I'm not sure if this is relevant, but kscreen-doctor reports both brightness and dimming support in Plasma 6.3, whereas only brightness support is indicated in 6.2.5
Comment 2 Real Name Here 2025-02-17 00:38:31 UTC
After creating a blank profile, I discovered the brightness slider only works in SDR if ICC profiles are disabled. Should I instead report this as a kwin issue?
Comment 3 Bug Janitor Service 2025-02-18 16:11:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7187
Comment 4 Zamundaaa 2025-02-18 17:04:52 UTC
Git commit 59a501f7c4dde8cc6d08adda1a7843b495ea1580 by Xaver Hugl.
Committed on 18/02/2025 at 16:30.
Pushed by zamundaaa into branch 'master'.

backends/drm: reimplement software brightness for ICC profiles

When moving to reference luminance based brightness control, I forgot to port this

M  +4    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/59a501f7c4dde8cc6d08adda1a7843b495ea1580
Comment 5 Zamundaaa 2025-02-18 23:23:32 UTC
Git commit 891c182903917c0ce4879787d0677630967b4491 by Xaver Hugl.
Committed on 18/02/2025 at 22:52.
Pushed by zamundaaa into branch 'Plasma/6.3'.

backends/drm: reimplement software brightness for ICC profiles

When moving to reference luminance based brightness control, I forgot to port this


(cherry picked from commit 59a501f7c4dde8cc6d08adda1a7843b495ea1580)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +4    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/-/commit/891c182903917c0ce4879787d0677630967b4491
Comment 6 Real Name Here 2025-03-01 06:29:23 UTC
(In reply to Zamundaaa from comment #5)
> Git commit 891c182903917c0ce4879787d0677630967b4491 by Xaver Hugl.
> Committed on 18/02/2025 at 22:52.
> Pushed by zamundaaa into branch 'Plasma/6.3'.
> 
> backends/drm: reimplement software brightness for ICC profiles
> 
> When moving to reference luminance based brightness control, I forgot to
> port this
> 
> 
> (cherry picked from commit 59a501f7c4dde8cc6d08adda1a7843b495ea1580)
> 
> Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>
> 
> M  +4    -1    src/backends/drm/drm_output.cpp
> 
> https://invent.kde.org/plasma/kwin/-/commit/
> 891c182903917c0ce4879787d0677630967b4491

I've updated to plasma 6.3.2 and still unable adjust brightness while an ICC profile is set.

KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.12.16
Graphics Platform: Wayland
Comment 7 Zamundaaa 2025-03-03 16:46:20 UTC
Please try to set the brightness to 50%, and afterwards attach the output of kscreen-doctor -o and the file ~/.config/kwinoutputconfig.json
Comment 8 Real Name Here 2025-03-12 21:44:00 UTC
(In reply to Zamundaaa from comment #7)
> Please try to set the brightness to 50%, and afterwards attach the output of
> kscreen-doctor -o and the file ~/.config/kwinoutputconfig.json

# kscreen-doctor -o
Output: 1 HDMI-A-1
        enabled
        connected
        priority 1
        HDMI
        Modes:  1:3840x2160@60!  2:3840x2160@155  3:3840x2160@150  4:3840x2160@144  5:3840x2160@120*  6:3840x2160@60  7:3840x2160@30  8:2560x1440@160  9:1920x1080@160  10:1920x1080@120  11:1920x1080@120  12:1920x1080@60  13:1920x1080@60  14:1920x1080@50  15:1680x1050@120  16:1680x1050@60  17:1600x900@60  18:1280x1024@75  19:1280x1024@60  20:1440x900@60  21:1152x864@75  22:1280x720@60  23:1280x720@50  24:1024x768@75  25:1024x768@70  26:1024x768@60  27:800x600@75  28:800x600@72  29:800x600@60  30:720x576@50  31:720x480@60  32:640x480@75  33:640x480@73  34:640x480@60  35:640x480@60 
        Geometry: 0,0 1920x1080
        Scale: 2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: /usr/share/color/icc/default.icm
        Color profile source: ICC
        Color power preference: prefer accuracy
        Brightness control: supported, set to 50% and dimming to 100%
Output: 2 HDMI-A-2
        enabled
        connected
        priority 2
        HDMI
        Modes:  36:3840x2160@120  37:3840x2160@60!  38:3840x2160@155*  39:3840x2160@150  40:3840x2160@144  41:3840x2160@120  42:3840x2160@60  43:3840x2160@30  44:2560x1440@160  45:1920x1080@160  46:1920x1080@120  47:1920x1080@120  48:1920x1080@60  49:1920x1080@60  50:1920x1080@50  51:1680x1050@120  52:1680x1050@60  53:1600x900@60  54:1280x1024@75  55:1280x1024@60  56:1440x900@60  57:1152x864@75  58:1280x720@60  59:1280x720@50  60:1024x768@75  61:1024x768@70  62:1024x768@60  63:800x600@75  64:800x600@72  65:800x600@60  66:720x576@50  67:720x480@60  68:640x480@75  69:640x480@73  70:640x480@60  71:640x480@60 
        Geometry: 1920,0 1920x1080
        Scale: 2
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: disabled
        Wide Color Gamut: disabled
        ICC profile: /usr/share/color/icc/default.icm
        Color profile source: ICC
        Color power preference: prefer accuracy
        Brightness control: supported, set to 50% and dimming to 100%


# cat ~/.config/kwinoutputconfig.json
[
    {
        "data": [
            {
                "allowSdrSoftwareBrightness": true,
                "autoRotation": "InTabletMode",
                "brightness": 0.5,
                "colorPowerTradeoff": "PreferAccuracy",
                "colorProfileSource": "ICC",
                "connectorName": "HDMI-A-1",
                "edidHash": "1aa4d0227e592a6e5f37e036e305aa8b",
                "edidIdentifier": "IOC 36928 100 0 1990 0",
                "highDynamicRange": false,
                "iccProfilePath": "/usr/share/color/icc/default.icm",
                "mode": {
                    "height": 2160,
                    "refreshRate": 119880,
                    "width": 3840
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 2,
                "sdrBrightness": 100,
                "sdrGamutWideness": 0,
                "transform": "Normal",
                "vrrPolicy": "Never",
                "wideColorGamut": false
            },
            {
                "allowSdrSoftwareBrightness": true,
                "autoRotation": "InTabletMode",
                "brightness": 0.5,
                "colorPowerTradeoff": "PreferAccuracy",
                "colorProfileSource": "ICC",
                "connectorName": "HDMI-A-2",
                "edidHash": "db259632d7473e1f64f07ec1f7275ccb",
                "edidIdentifier": "IOC 36928 200 0 1990 0",
                "highDynamicRange": false,
                "iccProfilePath": "/usr/share/color/icc/default.icm",
                "mode": {
                    "height": 2160,
                    "refreshRate": 119880,
                    "width": 3840
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 2,
                "sdrBrightness": 100,
                "sdrGamutWideness": 0,
                "transform": "Normal",
                "vrrPolicy": "Never",
                "wideColorGamut": false
            },
            {
                "allowSdrSoftwareBrightness": false,
                "autoRotation": "InTabletMode",
                "brightness": 0.34,
                "colorPowerTradeoff": "PreferAccuracy",
                "colorProfileSource": "ICC",
                "connectorName": "HDMI-A-1",
                "edidHash": "1f96e50764ce33da8b9e1ce0c27660b4",
                "edidIdentifier": "IOC 36928 0 3 2023 0",
                "highDynamicRange": true,
                "iccProfilePath": "/home/tofu/rtings-icc-profile.icm",
                "mode": {
                    "height": 2160,
                    "refreshRate": 119880,
                    "width": 3840
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 2,
                "sdrBrightness": 100,
                "sdrGamutWideness": 0,
                "transform": "Normal",
                "vrrPolicy": "Never",
                "wideColorGamut": false
            },
            {
                "allowSdrSoftwareBrightness": false,
                "autoRotation": "InTabletMode",
                "brightness": 0.59,
                "colorPowerTradeoff": "PreferAccuracy",
                "colorProfileSource": "ICC",
                "connectorName": "HDMI-A-2",
                "edidHash": "1f96e50764ce33da8b9e1ce0c27660b4",
                "edidIdentifier": "IOC 36928 0 3 2023 0",
                "highDynamicRange": true,
                "iccProfilePath": "/home/tofu/rtings-icc-profile.icm",
                "mode": {
                    "height": 2160,
                    "refreshRate": 119880,
                    "width": 3840
                },
                "overscan": 0,
                "rgbRange": "Automatic",
                "scale": 2,
                "sdrBrightness": 100,
                "sdrGamutWideness": 0,
                "transform": "Normal",
                "vrrPolicy": "Never",
                "wideColorGamut": false
            }
        ],
        "name": "outputs"
    },
    {
        "data": [
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 0,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    },
                    {
                        "enabled": true,
                        "outputIndex": 1,
                        "position": {
                            "x": 1920,
                            "y": 0
                        },
                        "priority": 1
                    }
                ]
            },
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 2,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    },
                    {
                        "enabled": true,
                        "outputIndex": 3,
                        "position": {
                            "x": 1920,
                            "y": 0
                        },
                        "priority": 1
                    }
                ]
            },
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 1,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    }
                ]
            },
            {
                "lidClosed": false,
                "outputs": [
                    {
                        "enabled": true,
                        "outputIndex": 0,
                        "position": {
                            "x": 0,
                            "y": 0
                        },
                        "priority": 0
                    }
                ]
            }
        ],
        "name": "setups"
    }
]
Comment 9 Bug Janitor Service 2025-03-27 03:46:43 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Zamundaaa 2025-05-05 17:28:58 UTC
Why did set it to fixed? Is the issue gone in a newer version of Plasma?