Skip to content

fix: preserve IPC and network access for Cortex Control on Wayland - #1

Open
wlmirand wants to merge 2 commits into
Mordeton:mainfrom
wlmirand:main
Open

wlmirand wants to merge 2 commits into
Mordeton:mainfrom
wlmirand:main

Conversation

@wlmirand

@wlmirand wlmirand commented Oct 20, 2026 •

Copy link
Copy Markdown

Summary

Fix Cortex Control startup failures on KDE Plasma Wayland and restore network connectivity when running through Wine/Proton.

Problems

1. XWayland MIT-SHM error

Cortex Control failed to launch with the following error:

X Error of failed request: BadValue
Major opcode: 130 (MIT-SHM)
Minor opcode: 3 (X_ShmPutImage)

This occurred even when launching with --disconnected.

The issue was caused by bwrap --unshare-all, which isolated the IPC namespace required for shared-memory communication between Wine and XWayland.

2. No network connectivity

After fixing the startup issue, Cortex Control could communicate with the Quad Cortex over USB, but network access was unavailable.

The --unshare-net option isolated the application's network namespace, preventing it from using the host's network connection.

Removing this option restored connectivity in testing.

Changes

  • Replace bwrap --unshare-all with explicit namespace isolation.
  • Preserve the host IPC namespace for XWayland MIT-SHM compatibility.
  • Preserve the host network namespace to allow Internet connectivity.
  • Keep user, PID, UTS, and cgroup namespace isolation.

Testing

Environment:

  • KDE Plasma on Wayland
  • NVIDIA GeForce RTX 5070 Ti Laptop GPU
  • Proton Experimental
  • Cortex Control 4.1.0
  • Quad Cortex connected via USB/HID

Results:

  • Cortex Control launches successfully in disconnected mode.
  • Cortex Control launches with the Quad Cortex connected.
  • USB/HID communication works.
  • Launching from the KDE application menu works.
  • Network connectivity is restored after removing --unshare-net.

Security considerations

This change reduces the original sandbox isolation by sharing the host IPC and network namespaces.

The remaining user, PID, UTS, and cgroup namespace isolation is preserved.

The trade-off is intentional to restore XWayland compatibility and network functionality, but should be reviewed before merging.

Replace bwrap --unshare-all with explicit namespace isolation
to preserve shared IPC access between Wine and XWayland.

Fixes MIT-SHM X_ShmPutImage BadValue errors that prevented
Cortex Control from launching on KDE Plasma Wayland.

Keep user, PID, UTS, network, and cgroup isolation.
@wlmirand wlmirand changed the title fix: preserve IPC namespace for XWayland compatibility fix: preserve IPC and network access for Cortex Control on Wayland Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant