Bug 486078 - Automatically enabling software rendering causes KWin to crash on all visual effects (alt+tab, maximise, snap window)
Summary: Automatically enabling software rendering causes KWin to crash on all visual ...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.4
Platform: NixOS Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-24 15:36 UTC by deftdawg
Modified: 2024-04-24 16:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description deftdawg 2024-04-24 15:36:01 UTC
SUMMARY

When KWin crashes due to a kernel driver issue, it automatically enables software rendering by adding the following to `~/.config/kdeglobals`:
```
[QtQuickRendererSettings]
SceneGraphBackend=software
```

While this may get KWin back up and running temporarily, the presence of this configuration causes *any* invocation of visual effects to crash KWin (a crash only Qt6 applications survive).

It also causes visual anomalies like the icons in launcher to get stacked. see https://discuss-cdn.kde.org/uploads/default/original/2X/a/aa9c4122664e8fa8ff613769b4f2b77d5343472b.png

A user will have no idea why their installation of KDE has become "corrupted" because there is no notification or warning that this change has happened / software rendering is active.   Switching back to KDE5 doesn't resolve the issue either because the setting causes the same behaviours under KDE5, only deleting that block and restarting KWin can resolve the issue.

STEPS TO REPRODUCE
1. add 
```
[QtQuickRendererSettings]
SceneGraphBackend=software
```
to `~/.config/kdeglobals`
2. Open a single application and "snap" it at a screen edge or open multiple applications and try to alt+tab between them
3. 

OBSERVED RESULT
KWin crashes

EXPECTED RESULT
KWin shouldn't crash or it should warn if software rendering was enabled.

SOFTWARE/OS VERSIONS
Operating System: NixOS 24.05
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.9.0-rc4 (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900K
Memory: 125.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6900 XT

SUGGESTION

Plasma should warn software rendering was enabled as part of fall back, perhaps when this block
```
[QtQuickRendererSettings]
SceneGraphBackend=software
```
is added another line should be added like so:

```
[QtQuickRendererSettings]
SceneGraphBackend=software
Warning=Software rendering was enabled at 2024-01-01 6:24 because of a crash
```

Then if the `Warning` is there, pop up a dialog or put in a notification to tell the user and ask them if they want to keep the setting in or turn it off again.