Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 passthrough and futex sharing #232

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

asahilina
Copy link
Contributor

@asahilina asahilina commented Oct 22, 2024

Add the X11 cross domain channel type and futex sharing. This is the new approach using explicit FD passing, which depends on #231 (will rebase once that is merged). Also includes a bunch of bug fixes over the previous PR, and CI now passes. I think this should be good to start reviewing.

This approach no longer needs the LD_PRELOAD. You can just use nothing (the ptrace code in x112virtgpu should be more robust now), or xshmwrap (packaged with x112virgpu) to avoid the ptrace hack. I also sent a PR upstream to libxshmfence so we can do this with a simple env var in the future, without hacks.

Compared to #213, this removes the rootfs DAX enablement, but I think @slp wants to do the DAX toggle another way anyway. DAX is still required for /dev/shm for any of this to work, but best keep that out of the scope of this PR.

Supersedes #213.

@asahilina asahilina force-pushed the x11-passthrough-fixes branch 8 times, most recently from b5fc39e to e02eebd Compare October 22, 2024 16:01
@asahilina
Copy link
Contributor Author

Question: Should we renumber CROSS_DOMAIN_CMD_FUTEX_NEW and friends and CROSS_DOMAIN_ID_TYPE_SHM to something higher, in case upstream decides to add commands or types in the future?

@asahilina asahilina force-pushed the x11-passthrough-fixes branch from e02eebd to 06e29f1 Compare October 26, 2024 16:53
@asahilina
Copy link
Contributor Author

There's still more work to be done on the X11 cross-domain channel so I'm marking this as draft. The prep work MR should be OK to review though (and this one too, it's just incomplete and not ready to merge yet).

@asahilina asahilina marked this pull request as draft October 28, 2024 10:52
@asahilina asahilina force-pushed the x11-passthrough-fixes branch from 06e29f1 to 074b502 Compare October 29, 2024 20:17
@asahilina
Copy link
Contributor Author

This should now be ready, Steam finally works stably and Portal 2 runs (including windowed) 🎉

@asahilina asahilina marked this pull request as ready for review October 29, 2024 20:18
@asahilina asahilina force-pushed the x11-passthrough-fixes branch 3 times, most recently from 9e94bdf to 2a0a6dc Compare October 29, 2024 22:28
@slp
Copy link
Contributor

slp commented Oct 30, 2024

Please rebase on top of #231

This adds the X11 cross domain channel and an ability to share
futexes between the vm and the host.

Signed-off-by: Sasha Finkelstein <[email protected]>
Co-developed-by: Asahi Lina <[email protected]>
Signed-off-by: Asahi Lina <[email protected]>
@asahilina asahilina force-pushed the x11-passthrough-fixes branch from 2a0a6dc to 4f36a56 Compare October 30, 2024 16:42
@asahilina
Copy link
Contributor Author

Done!

Copy link
Contributor

@slp slp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested both with sommelier and x112virtgpu

@slp slp merged commit 0dae613 into containers:main Oct 31, 2024
5 checks passed
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.

3 participants