I guess, on https://wiki.mumble.info/wiki/Games#Supported_games it says, that the Plugins also work in Wine, but I am not sure if it really does.
My question is, if Positional Audio with Windows Game Plugins also work on a Linux system, when playing the Windows Game in Wine.
For example, if I play GTA V in Linux using Proton, can I get positional Audio to work?
Unfortunately, I do not see any Game plugin in my Mumble 1.3.0 RC2 build from Arch Linux.
The only plugins that I see are:
Maybe I misunderstood the wiki article, but how exactly can I get the positional Audio working for GTA in Linux?
The plugins work with Wine, however Windows plugins are currently not compiled on Linux (#3511).
You can compile the plugin manually and then put it in ~/.local/share/Mumble/Mumble/Plugins.
Let me know if you need guidance compiling it.
Unfortunately the GTA V plugin is probably outdated and thus not working anymore.
I would appreciate a few instructions on how to compile a standalone plugin. For example, as I am on Linux and not Windows, I would probably have to replace mumble_plugin_win32.h with mumble_plugin_linux.h, right?
The other thing should be no problem, I might update the plugin myself, if it doesn't work. Can I also find out the memory addresses on Linux over Wine or will they not match with the Windows addresses? If it is possible, what tooling would you recommend for that task on Linux?
For example, as I am on Linux and not Windows, I would probably have to replace
mumble_plugin_win32.hwithmumble_plugin_linux.h, right?
Correct, it's the only change required.
Can I also find out the memory addresses on Linux over Wine or will they not match with the Windows addresses?
The memory offsets are always the same, you can either use a native memory scanner (e.g. Game Conqueror) or a Windows one over Wine (e.g. Cheat Engine).
Hi @davidebeatrici, I was able to reverse engineer most memory locations. There is only one more left, but I do not quite understand how to tackle this one.
The problem is the avatar direction vector: https://github.com/mumble-voip/mumble/blob/1ade7bb940a43f1fd70b36791bb41a8cdf6a674a/plugins/gtav/gtav.cpp#L71-L72
I was able to find a memory location (1fddb50) that was matching the front facing direction of my character, but I was not able to find a pointer to this memory location (avatar_base). Also, if avatar_base is still working like in the previous working version, then 1fddb60 should have been the avatar top vector, which I wasn't able to confirm (but I am not quite sure, what GTA interprets as the top vector).
Maybe you might be able to offer some help how I can find this avatar_base location, I was using this tool: https://github.com/scanmem/scanmem
Also if you want to see my progress, I uploaded a commit here: https://github.com/magnus-gross/mumble/commit/53e2668fdb51e41b8c12da54247c6c5448f1f4ff
I can do a PR, when I have everything working :)
Also, are you sure, that these plugins work flawlessy as a user in Linux? When I was trying the plugin with mumble-pahelper, the process_vm_readv call was failing every time:
https://github.com/mumble-voip/mumble/blob/1ade7bb940a43f1fd70b36791bb41a8cdf6a674a/plugins/mumble_plugin_linux.h#L192
The error was EPERM The caller does not have permission to access the space of the process pid..
Running mumble-pahelper as root fixed the problem, but I guess this is more of a workaround.
Hi @magnus-gross, avatar_base is the value of a pointer:
https://github.com/mumble-voip/mumble/blob/0a53b25385ab433cbdcf13f2c19a4b78a4bd25ad/plugins/gtav/gtav.cpp#L56-L57
I remember that I could not find any static memory addresses for the avatar front/top vectors.
The error was
EPERM The caller does not have permission to access the space of the process pid..Running
mumble-pahelperas root fixed the problem, but I guess this is more of a workaround.
Some distributions, such as Ubuntu, block access to ptrace for non-root users: https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace_Protection
Thanks @davidebeatrici, indeed, my distro enabled ptrace protection.
I was able to reverse engineer the last memory location and submitted a PR here: #3746
This was a lot of work though, it was quite interesting to learn the tooling for such tasks, but if the next update breaks everything again, I am not sure if I want to go through this again.
Is there any chance, that we can get this fix into the final 1.3 release or is there a separate release mechanism for plugins?
Thank you very much for your work!
In future we should probably retrieve the offsets dynamically using the hex pattern scan technique.
Is there any chance, that we can get this fix into the final 1.3 release or is there a separate release mechanism for plugins?
Plugins are shipped with each release and separately through an update mechanism.
Hi @davidebeatrici, sry to bother you again, but I noticed that the Plugin did not get an update on Windows yet. In fact, there is only a plugin visible for GTA 4 on Windows, not even the outdated GTA V plugin.
Do you have to manually trigger the update mechanism somewhere?
Hi @magnus-gross, the plugins are uploaded to our server when a new release is built.
If you don't see the GTA V plugin, you're probably on 1.2.x. Unfortunately we cannot distribute the same binary to 1.3.x and 1.2.x due to the different compilers (MSVC 2015 vs MSVC 2010).
Also, the pull request was merged in master, which is now 1.4; 1.3 is considered frozen (with the exception of important changes).
I can build the plugin for 1.3 and attach it there, if you want.
I can build the plugin for 1.3 and attach it there, if you want.
That would be very kind. Unfortunately, I do not have a Windows system available, so I would appreciate it if you could compile it for Windows. :)
Thanks, but somehow this does not work. If it is put into the folder, where also the DLLs for the pre-installed plugins are located, Mumble won't recognize it. Also only the plugins for 1.2 are visible, although 1.3 RC2 is installed.
The directory for user plugins is %AppData%\Mumble\Plugins, is the plugin not recognized if you put it there?
No, unfortunately not - at least not with the 1.3 RC2 Development
Snapshot.
On Tue, Aug 20, 2019 at 03:42:38PM -0700, Davide Beatrici wrote:
The directory for user plugins is
%AppData%\Mumble\Plugins, is the plugin not recognized if you put it there?--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/mumble-voip/mumble/issues/3741#issuecomment-523223211
32 or 64 bit? The GTA V plugin is only compiled for the 64 bit release.
Thanks, using the 64bit version fixed the problem.
You're welcome.