Bug 510789

Summary: Errors in log, when applying HDR calibration
Product: [Applications] systemsettings Reporter: postix <postix>
Component: kcm_kscreenAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, plasma-bugs-null, xaver.hugl
Priority: NOR    
Version First Reported In: 6.4.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.5.1
Sentry Crash Report:

Description postix 2025-10-19 12:33:25 UTC
SUMMARY

The HDR calibration seems to work, colors and brightness do change, but there are some errors in the log.

Maybe they are not important, but I felt like reporting them anyway. Please feel free to close otherwise and in this case, sorry for any noise!

STEPS TO REPRODUCE
1. Open SystemSettings -> Monitor
2. HDR Calibration
3. Click on done

OBSERVED RESULT

Plasma 6.4.5:
```
wp_color_management_surface_v1#78: error 2: the associated surface was already destroyed
The Wayland connection experienced a fatal error: Protocol error
```

```
kwin_wayland_wrapper[1797]: error in client communication (pid 4903)
```

Plasma 6.6-dev
```
kwin_wayland_wrapper[2708896]: error in client communication (pid 2712884)
systemsettings[2712884]: wp_color_management_surface_v1#79: error 2: the associated surface was already destroyed
systemsettings[2712884]: warning: queue "mesa egl surface queue" 0x55b1e2d21ef0 destroyed while proxies still attached:
systemsettings[2712884]:   wp_presentation#43 still attached
systemsettings[2712884]: warning: queue "mesa egl surface queue" 0x55b1e3b58ef0 destroyed while proxies still attached:
systemsettings[2712884]:   wp_presentation#43 still attached
systemsettings[2712884]: warning: queue "mesa egl surface queue" 0x55b1e2ea0830 destroyed while proxies still attached:
systemsettings[2712884]:   wp_presentation#43 still attached
systemsettings[2712884]: warning: queue "mesa egl surface queue" 0x55b1e2e50e20 destroyed while proxies still attached:
systemsettings[2712884]:   wp_presentation#43 still attached
hdrcalibrator[2712884]: Could not create EGL surface (EGL error 0x3000)
hdrcalibrator[2712884]: Could not create EGL surface (EGL error 0x3000)
hdrcalibrator[2712884]: Could not create EGL surface (EGL error 0x3000)
hdrcalibrator[2712884]: Could not create EGL surface (EGL error 0x3000)
hdrcalibrator[2712884]: Failed to write to the pipe: Bad file descriptor.
```


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20251015
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.2-1-default (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 580 Series
Comment 1 Bug Janitor Service 2025-10-20 08:40:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/426
Comment 2 David Redondo 2025-10-20 08:50:58 UTC
Git commit 25958df305726d8de8552143467707bd1aff9be9 by David Redondo.
Committed on 20/10/2025 at 08:38.
Pushed by davidre into branch 'master'.

hdrcalibrator: Dont try to set image description on windows without a surface

Fixes a protocol error on shutdown where the QPlatformWindow is already
gone and with it the wl_surface as well but the QWindow is still alive.
FIXED-IN:6.5.1

M  +1    -1    hdrcalibrator/hdrhelper.cpp

https://invent.kde.org/plasma/kscreen/-/commit/25958df305726d8de8552143467707bd1aff9be9
Comment 3 David Redondo 2025-10-20 10:02:49 UTC
Git commit ab21ea92df75dd22be15b1655fa702a3cd1febd8 by David Redondo.
Committed on 20/10/2025 at 08:51.
Pushed by davidre into branch 'Plasma/6.5'.

hdrcalibrator: Dont try to set image description on windows without a surface

Fixes a protocol error on shutdown where the QPlatformWindow is already
gone and with it the wl_surface as well but the QWindow is still alive.
FIXED-IN:6.5.1


(cherry picked from commit 25958df305726d8de8552143467707bd1aff9be9)

Co-authored-by: David Redondo <kde@david-redondo.de>

M  +1    -1    hdrcalibrator/hdrhelper.cpp

https://invent.kde.org/plasma/kscreen/-/commit/ab21ea92df75dd22be15b1655fa702a3cd1febd8