F.E.A.R. won't load dsound.dll

Questions about Wine on Linux
Post Reply
User avatar
mr.matt.eastwood
Level 1
Level 1
Posts: 8
Joined: Fri Sep 03, 2021 8:38 am
Location: Saarbruecken, Germany
Contact:

F.E.A.R. won't load dsound.dll

Post by mr.matt.eastwood »

Hey, Wine community!

I installed F.E.A.R. Platinum Collection on my system-wide Wine prefix using the GOG offline installers. I dropped dsound.dll from IndirectSound into the same directory as FEAR.EXE, expecting to be able to select surround sound in the game's sound menu. But it all remains greyed out.

Turns out F.E.A.R. doesn't even care there's a dsound.dll in its root directory. Because if dsound.dll got loaded, there would be a dsound.log file afterwards.

How can I get F.E.A.R. to use the DLL file I put in its directory? Shouldn't that happen automatically? I remember it worked well when I played it with IndirectSound on Windows 10 back in 2020.
User avatar
mr.matt.eastwood
Level 1
Level 1
Posts: 8
Joined: Fri Sep 03, 2021 8:38 am
Location: Saarbruecken, Germany
Contact:

Re: F.E.A.R. won't load dsound.dll

Post by mr.matt.eastwood »

Here's the stderr output, perhaps there's a clue in this?

Code: Select all

002c:fixme:winediag:LdrInitializeThunk wine-staging 7.14 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:wineusb:query_id Unhandled ID query type 0x5.
007c:fixme:wineusb:query_id Unhandled ID query type 0x5.
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
007c:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
007c:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
007c:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
0128:fixme:system:NtUserSystemParametersInfo Unimplemented action: 59 (SPI_SETSTICKYKEYS)
0128:fixme:system:NtUserSystemParametersInfo Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
0128:fixme:system:NtUserSystemParametersInfo Unimplemented action: 51 (SPI_SETFILTERKEYS)
0090:fixme:imm:ImeSetActiveContext (0000000000010026, 0): stub
0128:fixme:imm:ImeSetActiveContext (00010064, 1): stub
0090:fixme:imm:ImmReleaseContext (0000000000010020, 0000000000010026): stub
0128:fixme:imm:ImmReleaseContext (00020068, 00010064): stub
0128:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0128:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x30
0128:fixme:wbemprox:enum_class_object_Next timeout not supported
0128:fixme:ddraw:ddraw7_Initialize Ignoring guid {aeb2cdd4-6e41-43ea-941c-8361cc760781}.
0128:fixme:ddraw:ddraw7_Initialize Ignoring guid {aeb2cdd4-6e41-43ea-941c-8361cc760781}.
0128:fixme:ddraw:ddraw7_Initialize Ignoring guid {aeb2cdd4-6e41-43ea-941c-8361cc760781}.
0128:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work.
0128:fixme:d3d:wined3d_device_set_software_vertex_processing device 008DDF60, software 0 stub!
0148:fixme:d3d:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts.
0148:fixme:d3d_shader:print_glsl_info_log Info log received from GLSL shader #3:
0148:fixme:d3d_shader:print_glsl_info_log     Vertex info
0148:fixme:d3d_shader:print_glsl_info_log     -----------
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[0].zw" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[1]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[2]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[3]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[4]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[5]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[6]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[7]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[9]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[11]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log Info log received from GLSL shader #7:
0148:fixme:d3d_shader:print_glsl_info_log     Vertex info
0148:fixme:d3d_shader:print_glsl_info_log     -----------
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[0].zw" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[1]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[2]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[3]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[4]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[5]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[6]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[7]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[9]" might be used before being initialized
0148:fixme:d3d_shader:print_glsl_info_log     0(29) : warning C7050: "vs_out[11]" might be used before being initialized
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_sub_resource_map Failed to prepare location.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_sub_resource_map Failed to prepare location.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_unload Discarding WINED3D_RTYPE_TEXTURE_2D 37B674E0 sub-resource 0 with resource access WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_unload Discarding WINED3D_RTYPE_TEXTURE_2D 37B66DE8 sub-resource 0 with resource access WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_sub_resource_map Failed to prepare location.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_sub_resource_map Failed to prepare location.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_unload Discarding WINED3D_RTYPE_TEXTURE_2D 37BBD980 sub-resource 0 with resource access WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_unload Discarding WINED3D_RTYPE_TEXTURE_2D 37BBD288 sub-resource 0 with resource access WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_unload Discarding WINED3D_RTYPE_TEXTURE_2D 37BBD288 sub-resource 1 with resource access WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W.
0148:err:d3d:wined3d_resource_allocate_sysmem Failed to allocate system memory.
0148:err:d3d:texture_resource_unload Discarding WINED3D_RTYPE_TEXTURE_2D 37BBD288 sub-resource 2 with resource access WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W.
0128:err:msacm:MSACM_GetRegistryKey No alias needed for registry entry
jkfloris
Level 12
Level 12
Posts: 2233
Joined: Thu Aug 14, 2014 10:10 am

Re: F.E.A.R. won't load dsound.dll

Post by jkfloris »

You are right, something is not quite right here.
You can force Wine to use the "new" dsound.dll file with

Code: Select all

WINEDLLOVERRIDES=dsound=n wine FEAR.exe
This does load the dsound.dll from IndirectSound, but it then complains that it can no longer find the real dsound.dll.
Without the override, the dsound.dll will always be loaded from c:\windows\system32.

Code: Select all

114:trace:module:load_dll looking for L"dsound.dll" in L"C:\\windows\\system32;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem;C:\\windows\\system32\\WindowsPowershell\\v1.0"
0114:trace:module:get_load_order looking for L"C:\\windows\\system32\\dsound.dll"
0114:trace:module:get_load_order got hardcoded default for L"dsound.dll"
0114:trace:module:map_image_into_view mapping PE file L"\\??\\C:\\windows\\system32\\dsound.dll" at 0x682c0000-0x68418000
You can make a bug report that the load order of dsound is incorrect, and/or you can make one asking if wine-staging can also support higher versions of EAX.
User avatar
mr.matt.eastwood
Level 1
Level 1
Posts: 8
Joined: Fri Sep 03, 2021 8:38 am
Location: Saarbruecken, Germany
Contact:

Re: F.E.A.R. won't load dsound.dll

Post by mr.matt.eastwood »

Hey @jkfloris, thanks for your detailed response. This is very good to know! I actually already got a similar, but not as detailed answer on the DSOAL GitHub (https://github.com/kcat/dsoal/issues/67 ... 1211908958) and worked around the issue by simply replacing the dsound.dll in system32, but your method is of course cleaner.

I'll need to reinstall F.E.A.R., I have since deleted it while I was testing other stuff. I'll go ahead and open a bug report as soon as I can.
User avatar
mr.matt.eastwood
Level 1
Level 1
Posts: 8
Joined: Fri Sep 03, 2021 8:38 am
Location: Saarbruecken, Germany
Contact:

Re: F.E.A.R. won't load dsound.dll

Post by mr.matt.eastwood »

Hey again!

I tinkered with it some more. I installed the game from GOG through Lutris and tried the following:

With DSOAL's dsound.dll and dsoal-aldrv.dll in same directory as FEAR.exe
  • Start the game normally: all sound options greyed-out
  • Start the game with "dsound" and "n" in Configure > DLL Overrides menu: "Failed to initialize sound driver 'SndDrv.dll' on startup. Screenshot: https://paste.pics/I4DO0. No sound during game or menus, only during intro movie. Available sound options: https://paste.pics/I4DOD
  • Start the game with "dsound" set to "native" in winecfg > Libraries: same as above
With DSOAL's dsound.dll and dsoal-aldrv.dll in same directory as FEAR.exe
AND with DSOAL's dsound.dll instead of Wine's dsound.dll in syswow64 directory
  • Start the game normally: all sound options greyed-out
  • Start the game with "dsound" and "n" in Configure > DLL Overrides menu (or dsound set to "native" through winecfg): everything works! Screenshot of the sound menu: https://paste.pics/I4DPF
It really looks like replacing the dsound.dll in syswow64 is the only way. It's dirty, but it works. I'll file a bug report accordingly.
Post Reply