Bug 498861 - Kwin_wayland crashes when started by SDDM
Summary: Kwin_wayland crashes when started by SDDM
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.2.90
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-18 18:34 UTC by Foxe Chen
Modified: 2025-01-29 23:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
Full journal logs (243.43 KB, text/plain)
2025-01-18 18:34 UTC, Foxe Chen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Foxe Chen 2025-01-18 18:34:18 UTC
Created attachment 177513 [details]
Full journal logs

SUMMARY
Using latest kwin_wayland from Arch Linux kde-unstable repositories. When booting and entering SDDM, kwin_wayland crashes without a coredump when started by sddm-helper-start-wayland, logging about an ICC profile.

STEPS TO REPRODUCE
1. Install Arch Linux KDE-Unstable repositories
1. Start boot into SDDM

OBSERVED RESULT
The booting screen transfers into a black screen, because Kwin_wayland crashed, requiring the user to use a tty.

Journal shows these logs:
Jan 18 12:45:54 archlinux sddm-helper-start-wayland[904]: "terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'\n  what():  filesystem error: status: Permission denied [/home/foxe/.local/share/icc/BOE0CB4.icm]\n"
Jan 18 12:45:54 archlinux sddm-helper-start-wayland[904]: "KCrash: Application 'kwin_wayland' crashing... crashRecursionCounter = 2\n"
Jan 18 12:45:54 archlinux systemd-coredump[957]: Process 907 (kwin_wayland) of user 969 terminated abnormally with signal 6/ABRT, processing...

EXPECTED RESULT
SDDM and kwin should start normally

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.2.90
KDE Frameworks Version: 6.10.0
Qt Version: 6.9.0
Kernel Version: 6.12.10-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7640U w/ Radeon 760M Graphics
Memory: 27.2 GiB of RAM
Graphics Processor: AMD Radeon 760M
Comment 1 Foxe Chen 2025-01-18 18:36:59 UTC
This bug does not happen when using KDE plasma 6.2.5 for me
Comment 2 Bug Janitor Service 2025-01-18 21:29:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7035
Comment 3 Lucas Lima 2025-01-24 12:47:30 UTC
I was also been affected by this. From the open MR, look like it's an issue caused by lack of permissions to access an set icc profile.

Removing the icc profile from /var/lib/sddm/.config/kwinoutputconfig.json fixed it.
However, I guess it makes wonder if either the icc profile should be copied to the sddm folder or if it makes any sense to set the it at all.
Comment 4 Bug Janitor Service 2025-01-29 15:00:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7088
Comment 5 Zamundaaa 2025-01-29 15:18:32 UTC
Git commit f906c7a4976b86e7e325d86062625ffd8b6ee911 by Xaver Hugl.
Committed on 29/01/2025 at 14:58.
Pushed by zamundaaa into branch 'master'.

core/iccprofile: don't use std::filesystem::exists to check the existance of the file

If any "system error" occurs, it throws an exception and crashes KWin.

M  +2    -2    src/core/iccprofile.cpp

https://invent.kde.org/plasma/kwin/-/commit/f906c7a4976b86e7e325d86062625ffd8b6ee911
Comment 6 Zamundaaa 2025-01-29 15:20:52 UTC
(In reply to Lucas Lima from comment #3)
> I was also been affected by this. From the open MR, look like it's an issue
> caused by lack of permissions to access an set icc profile.
> 
> Removing the icc profile from /var/lib/sddm/.config/kwinoutputconfig.json
> fixed it.
> However, I guess it makes wonder if either the icc profile should be copied
> to the sddm folder or if it makes any sense to set the it at all.
Yeah, it should ideally be copied over. As a fallback, with the fix, KWin will just not apply it if it's missing though, so it's not a big issue then.
Comment 7 Zamundaaa 2025-01-29 15:41:18 UTC
Git commit 33f2a571cd00c4267b35e68fa1d55788a910f342 by Xaver Hugl.
Committed on 29/01/2025 at 15:18.
Pushed by zamundaaa into branch 'Plasma/6.3'.

core/iccprofile: don't use std::filesystem::exists to check the existance of the file

If any "system error" occurs, it throws an exception and crashes KWin.


(cherry picked from commit f906c7a4976b86e7e325d86062625ffd8b6ee911)

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

M  +2    -2    src/core/iccprofile.cpp

https://invent.kde.org/plasma/kwin/-/commit/33f2a571cd00c4267b35e68fa1d55788a910f342