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

Dynamic overlay injection #1545

Closed
fililip opened this issue Jan 29, 2025 · 5 comments
Closed

Dynamic overlay injection #1545

fililip opened this issue Jan 29, 2025 · 5 comments

Comments

@fililip
Copy link

fililip commented Jan 29, 2025

What would be required to enable dynamic injection to an already running process (ie to avoid having to restart a videogame)?
Are there kernel-mode/user-mode driver limitations, or is it impossible on the Linux kernel?

@17314642
Copy link
Contributor

Why not just hide it at the start?

@17314642
Copy link
Contributor

To inject into the running process, you need either root rights or configuring the kernel to ptrace other binaries without root. Thats how csgo cheat for linux did it.

They injected using gdb debugger with root.

You can actually try and inject opengl version of mangohud with gdb, maybe it already works.

Not really sure about vulkan though. Maybe it also works

@fililip
Copy link
Author

fililip commented Jan 29, 2025

Why not just hide it at the start?

It's more about being able to choose what gets the overlay in the first place - I have a frame limiter by default, and I don't want it for every app (due to 160 FPS - 165Hz mismatch and thus stuttering), but sometimes I forget to set mangohud %command% on an already launched game, and in the case of some long-to-load games it is a bit of a chore to have to restart the game for the frame limiter.

@17314642
Copy link
Contributor

17314642 commented Jan 29, 2025

Also, even though this is probably possible to do, this approach will not work in a flatpak environment.

@fililip
Copy link
Author

fililip commented Feb 6, 2025

I've reevaluated this, and concluded that this is probably too much work for little gain (both for the devs and users), sorry for the noise 🙏

@fililip fililip closed this as completed Feb 6, 2025
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

No branches or pull requests

2 participants