AvengeMedia / AvengeMedia/DankMaterialShell

SIGBUS crash on click (Intel HD 4000, Mesa 26.1.4) — QSGRhiLayer::grab() in gallium driver

Open
#2,771 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
QML
Stars
8.1k
Forks
515
Avg merge
1d 8h
Merged PRs (30d)
102

Description

## Description

quickshell/DMS crashes with SIGBUS (signal 7) on user click interaction. The crash occurs in Qt Quick's `QSGRhiLayer::grab()` → `ensurePipelineState()` path, inside Mesa's gallium i915 driver.

## Environment

- **GPU**: Intel HD Graphics 4000 (Ivy Bridge, PCI ID `8086:0166`)
- **Mesa**: `26.1.4-1` (Arch Linux)
- **Qt**: `6.11.1`
- **quickshell**: git build
- **dms-shell**: `1.4.6-3`
- **Compositor**: niri 25.x
- **Render loop**: threaded (via `QSG_RENDER_LOOP=threaded` pragma in shell.qml)
- **RHI backend**: OpenGL (`QSG_RHI_BACKEND=opengl`)

## Crash Backtrace

```
#0 libc (syscall)
#1 raise() (called by quickshell crash handler)
#2 quickshell::crash::signalHandler()
#3 signal delivery trampoline
#4 libgallium-26.1.4-arch1.1.so
#5 libgallium
#6 libgallium
#7 libgallium
#8 Qt6Gui (QRhiGles2::sanityCheckBoundFbo?)
#9 Qt6Gui
#10 QSGBatchRenderer::Renderer::ensurePipelineState()
#11 Qt6Quick
#12 QSGBatchRenderer::Renderer::prepareRenderPass()
#13 QSGBatchRenderer::Renderer::render()
#14 Qt6Quick
#15 QSGRhiLayer::grab()
#16 QSGRhiLayer::updateTexture()
#17 QSGBasicInternalImageNode::preprocess()
```

All 18+ coredumps share this identical backtrace. Crash always triggered on click (opening popups/overviews/control-center), never on idle.

## Workaround

Setting the environment variable `DMS_DISABLE_LAYER=true` prevents the crash by disabling Qt Quick `layer.enabled: true` in DMS widgets that check for this env var. However, many QML files (`ChangelogContent.qml`, `ClipboardThumbnail.qml`, `PowerMenuModal.qml`, `DockItem.qml`, `DankBarItem.qml`, `DesktopWidgetLayer.qml`, etc.) still use `layer.enabled: true` unconditionally, so they may still trigger the crash.

See also: `DankOSD.qml`, `DankPopout.qml`, `DankSlideout.qml` — these already check `Quickshell.env("DMS_DISABLE_LAYER")`.

## Possible Solutions

1. **Expand `DMS_DISABLE_LAYER` coverage**: Add the env var check to all remaining QML files that use `layer.enabled: true`, so users can fully opt out of layer-based rendering on affected GPUs.
2. **Mesa regression**: The crash is inside `libgallium-26.1.4` — downgrading Mesa may help.
3. **Vulkan vs OpenGL**: Both RHI backends crash on this GPU. forcing `LIBGL_ALWAYS_SOFTWARE=true` stops the crash but kills performance.

Let me know if you need more info (coredump files, full env, etc.). I can provide them.

Contributor guide

Open the contributing guide

Research direction

Review the layer.enabled usages in ChangelogContent.qml, ClipboardThumbnail.qml, PowerMenuModal.qml, DockItem.qml, DankBarItem.qml, and DesktopWidgetLayer.qml, comparing them with DankOSD.qml, DankPopout.qml, and DankSlideout.qml. Verify that DMS_DISABLE_LAYER covers the remaining affected widgets, then test click-triggered popups and overviews with the variable enabled on the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
arch-linux, linux
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.