Testing Wine/DXVK shared resources - "Could not load CitizenGame.dll"

Environment questions

GTA V version: 1.0.231.0
Up to date: Yes
Legit or Pirate copy: Legit
Purchased where - Steam/Rockstar Launcher/Epic: Rockstar Launcher
Windows version: Wine lutris-fshack-6.21-3-x86_64 (W8.1 compatibility)
Did you try to delete content_index.xml and try again? Yes
System specifications:
Ryzen 5 1600
GTX 1050 Ti
Arch Linux 5.16.11-arch1-1
CitizenFX crash zip file (‘Save information’ on a crash): None
logs/CitizenFX_log files: Same as error screenshot below
.dmp files/report IDs: No dump file to show, instant crash

If you can’t start the game at all

GTA V folder screenshot:

GTA V/update/x64/dlcpacks screenshot:

FiveM client folder screenshot:

Important parts

What is the issue you’re having?
“Could not load CitizenGame.dll”
LoadLibrary fault?
Authentication procedure works fine.
Crashes post authentication on default Wine/DXVK, no patches.

What are you trying to do?
Running FiveM with Guy1524’s Wine/DXVK shared resource patches
Crashes way before OpenSharedResource invocations on all Wine versions

What have you tried already to fix the issue?

  • Clean FiveM install
  • Clean Wine 64-bit prefix
  • Tested on both NTFS and EXT4
  • Tested on both Lutris and ProtonGE Wine forks
  • Pre-installing FiveM on Windows 10 VM

Error screenshot (if any):

test

Additional comments:
Set Windows 8.1 on winecfg to reach the error above.
Launcher never goes past GTA5 directory selection on Windows 10 compatibility.
Reported error is:

0264:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.Xaml.Hosting.WindowsXamlManager"
4 Likes

Hello, this is a friendly reminder because this is your first time creating a topic (or it has been a while since your last topic) in this category.

Please note that most of the support is provided by the Cfx.re community on a voluntary basis. We ask you to be patient; there is no guarantee we have a solution to your problem(s). To avoid unnecessary/duplicate topics, please browse the forums before creating a topic.

To improve your chances of your issue(s) being solved, please provide as much information as possible about the issue(s) you are having. Also —whenever possible— please use the template given to you when creating a topic.

Thanks for keeping these forums tidy!
:mascot:

Rename adhesive.dll so you don’t try loading the anticheat components - these likely need a more accurate NT syscall implementation in Wine to run.

[            adhesive] failed LC - 00000001.

Note that in this state, you won’t be able to join any public game servers (other than self-hosted servers with, equivalently, svadhesive disabled, or loadlevel/storymode for a local game instance), but for testing, this will work… though you may have to remove the forcing of nui_useSharedResources in a custom build, it checks for Wine and falls back to a slower code path.

Also, I’d suggest using Windows 7 settings at most, 8.1/10 being reported by the OS will result in APIs being called that are not implemented in Wine, and probably never will be (e.g. as you noticed, 10 mode tries calling WinRT UI).

Final note: at this time we do not have any plans (or manpower, for that matter) to port anticheat components to run on Linux, nor will we explicitly support these running directly in Wine’s NT implementation since this wouldn’t allow monitoring the process outside of the ‘fake’ environment provided by Wine, opening up a lot of trivial ‘native’ cheat injection methods by injecting into/running ptrace on the winepreloader etc. processes on the host. Unlike other game vendors, we aren’t intending to ban for any successful cases of this, however no explicit work on this is planned currently from our end as we’re really short on developers with the required skillset to the extent that currently even much higher-priority issues remain unresolved for a very long time.

If you’re still insistent on running Linux as host OS, I’d rather suggest running Windows in a VM using some sort of graphics virtualization (like old Intel GVT-g, some other equivalent of Microsoft’s GPU-PV, doing what Parallels did on macOS - I think QEMU/Mesa have some work done on this, paired with DXVK-on-Windows and Mesa on Windows this may work - or SR-IOV support on your host GPU). Overhead if done properly is near-none on modern hardware and even the ‘hacky’ way is still playable, however some GPU vendors are still uncooperative in supporting virtualization on non-Windows hosts (e.g. Linux guests on Windows hosts are supported, but nothing is supported for Linux hosts).

I heard one particular uncooperative vendor has been hacked recently and source code for a bunch of their lockdown stuff is floating around on the internet, so if you’re using that vendor you may be in luck.

1 Like

Starts fine without adhesive.
I didn’t blame the LC error report at first because I was suspicious of it manifesting only after the OK button was pressed on the Fatal Error dialog.

No porting effort is required, focus on the platform instead.
Experienced users are already playing the game through VFIO.
Yes, Wine will open the doors for braindead effortless injection.
I guess it would require a closed-source containerization runtime (like Valve did with EAC and BE) running on the host itself alongside Wine, supplying adhesive with information through obscured communication mediums.
Huge work, wasted on the 1% Linux playerbase.

Thank you for your support.

1 Like

So you managed to get FiveM working with wine on private servers with “svadhesive” disabled?
It would be amazing if a guide was created because I think lot of people would end up using it (Playing on my server with friends is only thing that is keeping me dualbooting win+linux)
I tried installing Fivem and got stuck at checking game files, after closing and accepting to download cache it crashes. And also for some reason i cant compile new dxvk patch.
Could you maybe share your steps? Just asking because I am looking for solution for over a year now XD

Run FiveM.exe on vanilla Wine to get past the “Checking game files” part, set Windows 7 compatibility on winecfg.
I got the patched DXVK working but Wine with added external memory support refuses to compile without manually pasting the commits into the Proton wine fork [confirmation needed].
I suggest you to wait for Guy’s patch to make it into mainstream Wine or Proton, should not take very long.
And yes, the approach will be perfectly viable for development and offline sessions, remember to disable adhesive by renaming its .dll to something else.

Great thank you. I waited for a year. Few weeks/months wont kill me XD

I managed to get into singleplayer mode and also setted up local server with disabled txadmin and anticheat but i get stuck at loading manifest any suggestions how to move past that? I needed to use vanila wine to change version of Fivem to match with server and also disable txadmin because of error while connecting.
Output of lutris log:

e[38;5;90m[c-legacy-net-resourc] e[0me[32mRequired resources: sessionmanager mapmanager yarn spawnmanager basic-gamemode hardcap rconlog fivem-map-hipster webpack chat 
e[38;5;136m[          no_console] e[0me[32mOnConnectionProgress: Loading content manifest...
libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau
[0306/004458.600:ERROR:dxva_video_decode_accelerator_win.cc(1440)] DXVAVDA fatal error: could not LoadLibrary: msmpeg2vdec.dll: Module not found. (0x7E)
[0306/004458.600:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
06f4:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.5.0.
06f4:info:vkd3d_instance_init: vkd3d-proton - build: c0a3fa8adc58945.
06f4:fixme:d3d12_find_physical_device: Could not find Vulkan physical device for DXGI adapter.
06f4:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x0.
06f4:info:vkd3d_bindless_state_get_bindless_flags: Device does not support VK_VALVE_mutable_descriptor_type.
06f4:info:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
06f4:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 1920, may be inaccurate.
06f4:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.5.0.
06f4:info:vkd3d_instance_init: vkd3d-proton - build: c0a3fa8adc58945.
06f4:fixme:d3d12_find_physical_device: Could not find Vulkan physical device for DXGI adapter.
06f4:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x0.
06f4:info:vkd3d_bindless_state_get_bindless_flags: Device does not support VK_VALVE_mutable_descriptor_type.
06f4:info:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
06f4:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 1920, may be inaccurate.

Now it is late I will try to fix it tomorrow. It would be nice if someone could give me some suggestions, thanks.

I think by forum rules your issue should require a new topic.
However, let’s not clutter the support section with Linux-related stuff.

libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau

DXVK is attempting to load the open source NVIDIA driver nouveau, which I assume is already suppressed by the proprietary nvidia module it should be using instead, given you loaded into singleplayer and probably run other games on your machine.
Try reinstalling the official NVIDIA driver and check the module status with:

lsmod | grep -i nvidia
lsmod | grep -i nouveau

If by any chance you have an integrated GPU, I’m afraid it’s correlated with this.
Try all approaches in the fashion of DRI_PRIME=1 that enforce the use of your dGPU.

Yes, both the Lutris and Proton Wine forks get stuck at file integrity checks.
I think the issue will be gone before the platform is playable for non-development purposes.
Other than that, everything runs flawless on ProtonGE even without shared resources support, too bad for the anticheat being disabled.

1 Like

I know but I think this thread can be dedicated to trying to get FiveM running on linux.

I got rid of the error (just by running only on integrated graphics, but no change at all. I think that error was not relevant.
FiveM still gets stuck on Loading Manifest.
I tried to look into every log I could find (lutris, cmd, FX) but everywhere the last event is Loading Manifest
FXlog:

[    266457] [FiveM_GameProc]        CrBrowserMain/ OnConnectionProgress: Requesting server variables...
[    266471] [FiveM_GameProc]  UV loop: httpClient/ OnConnectionProgress: Handshaking with server...
[    266478] [FiveM_GameProc]  UV loop: httpClient/ OnConnectionProgress: Requesting server endpoints...
[    266505] [FiveM_GameProc]  UV loop: httpClient/ OnConnectionProgress: Requesting server permissions...
[    266692] [FiveM_GameProc]        CrBrowserMain/ OnConnectionProgress: Requesting server feature policy...
[    266711] [FiveM_GameProc]                 1024/ OnConnectionProgress: Downloading content
[    266715] [FiveM_GameProc]               Render/ OnConnectionProgress: Unloading content...
[    266734] [FiveM_GameProc]  UV loop: httpClient/ Required resources: sessionmanager mapmanager yarn webpack chat spawnmanager basic-gamemode hardcap rconlog fivem-map-hipster 
[    266771] [FiveM_GameProc]               Render/ OnConnectionProgress: Loading content manifest...

I have feeling that it is maybe connected to proton not being able to verify files of gta?
Is there a way to get more detailed log from FiveM?
I tried Developer true as it was only thing I could find regarding debug mode but it denies acces.
Is it problem for everyone, or did you manage to get it running? If so I will end posting progress here and try it on my own.
P.S. I reinstalled nvidia drives but lsmod | grep -i nouveau still gives no output.

I too have this problem.

Yes, I assumed as well that the game is performing another file integrity check, this time on the custom server resources.
Have you tried joining the server with default Wine?

It’s good, it means it has been successfully blacklisted by modprobe.

Yeah I tried it just now. Still the same problem (when running with installed wine from console), when running from lutris with system wine it is extremely slow when connecting and also got stuck.

I looked at github and this is (probably) what is happening: github

That’s odd. Do both of them use this event patch that IIRC is still not in mainline Wine? (esync/eventfd or so)

Indeed, regenerating the content index with ESYNC disabled in the Lutris configuration allows the file integrity check to work as intended.

Right, I suppose MsgWaitForMultipleObjectsEx is broken with those patches, then.

(more proof Wine can be a big hassle :P)

How about a following compromise on this:

Add a server setting that allows admins to explicitly opt out of any forms of anti-cheat being required to run on clients in order to join their server. This way server owners can consciously decide to allow players with anticheat disabled (also Linux players) to join their servers.

I’m sure some people would be extremely happy to see even a workaround like this.

I know this isn’t really a topic to discuss this, but personally, I find the whole idea of anti cheat on a global level for a project that only provides a platform and doesn’t host the actual game servers to be very much misguided. In my opinion the only way the concept of “a player being globally banned from FiveM” makes sense is when they deliberately try to disrupt operation or take down servers that belong to Cfx like the lobby or the forum/website.

Allow server owners to act as the sole and only police on their servers if they so desire and if they are fine with people cheating, you should just let them.

Still not likely for this to be an officially supported option, as this’d have an uncertain but likely-negative impact on the ecosystem, and the cheater population is actually larger than the Linux target audience + Wine is still a broken pile of junk and we’d rather not have any player base actively rely on such a hacky solution as that’d lead to more common complaints than the usual real Windows 7 user base saying ‘waah, it stopped working, fix it now!’, i.e. no, the only Linux support will be one that’ll be official and not rely on Wine at all.

If you want to ‘disable anticheat checks’ on your server, you can already do so by simply building the server yourself from open-source components, however again we will not provide any support for this configuration.

Have you even been around in the early days of dedicated server-based gaming (late 90s to the 2000s)? This is actually expected behavior for such kinds of games: see VAC (waaaay before Valve hosted official servers), or PunkBuster, or the other setups of such…

We’d also prefer to not deal with the hassle of anti-cheating functionality but most server owners and players actually expected this to be a thing, and I’m amazed at your audacity to even complain at this ‘decision’ as if we want to deal with ‘abuse’ junk either and this is an intentional choice of sorts.

1 Like

Currently got FiveM to start and go to the main menu with Wine-TkG. Before loading into the game however, the game ownership verification had some issues displaying. It also crashed quite a bit. Had to nuke the wineprefix and redownload FiveM. Then ran FiveM with STAGING_SHARED_RESOUCES=0 and without dxvk. After that is done, you can install dxvk and remove the variable. However, joining a server results in

[c-legacy-net-resourc] Resource URI ci://fivem-map-hipster/v3#kZSnREVGQVVMVKZDaGFDaGHEIMkTgEpADe9n9/jmOWfAQF8JgXm3/
oH1FJ7EFVGBloDkxAhL8q4PmbH0bg== has no mounter.
[c-legacy-net-resourc] Error: Could not get resource mounter for resource fivem-map-hipster.
[          no_console] OnConnectionError: Could not get resource mounter for resource fivem-map-hipster.

Correct, as the warning on startup should’ve said you’re running in ‘insecure mode’ so you can’t join any server from the closed-source build, any server built using shared source (or with closed-source components removed) should work fine.

So is setting sv_lan 1 not enough? Or do I need to build from source?