https://bugs.winehq.org/show_bug.cgi?id=36059
Bug ID: 36059 Summary: Multiple Steam games fail to install DirectX runtime prerequisite, resulting in repeated install attempt on startup ('xinput1_3.dll' locked by client) Product: Wine Version: 1.7.17 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net
Hello folks,
splitting this issue off from various Steam related bug reports for reference.
Many Steam games require DirectX runtime, usually stated in game folder 'installscript.vdf'.
Example VDF:
--- snip --- "Run Process" { ... "directx" { "hasrunkey" "HKEY_LOCAL_MACHINE\Software\Valve\Steam\Apps\110800" "process 1" "%INSTALLDIR%\3rd\DXSETUP.exe" "command 1" "/silent" } ... } --- snip ---
For various games the DirectX runtime install fails, resulting in repeated install attempt on startup of the game.
To illustrate how common this problem is, just a small list of some games I installed for tests:
NOTE: non-zero 'Exit Code' indicates the installer failed
'installscript_log.txt' from 'c:\Program Files\Steam\logs' folder
--- snip --- ... 04/15/14 00:08:33 [AppID 50280] Exit Code (-9) : "C:\Program Files\Steam\steamapps\common\Mafia II - Public Demo\3rd\DirectX\DXSETUP.exe" /silent GLE 0 ... 04/17/14 10:58:48 [AppID 17470] Exit Code (-9) : "C:\Program Files\Steam\steamapps\common\Dead Space\installers\DirectX\DXSETUP.exe" /silent GLE 0 ... 04/17/14 19:55:11 [AppID 55230] Exit Code (-9) : "C:\Program Files\Steam\steamapps\common\Saints Row the Third\DirectX\DXSetup.exe" /silent GLE 0 04/17/14 21:36:35 [AppID 72850] Exit Code (-9) : "C:\Program Files\Steam\steamapps\common\Skyrim\DirectX10\DXSETUP.exe" /silent GLE 0 ... 04/22/14 17:28:29 [AppID 49520] Exit Code (-9) : "C:\Program Files\Steam\steamapps\common\Borderlands 2\Binaries\Redist\DXRedistCutdown\DXSETUP.exe" /silent GLE 0 ... 04/22/14 22:18:15 [AppID 34330] Exit Code (-9) : "C:\Program Files\Steam\steamapps\common\Total War SHOGUN 2\redist\DirectX\DXSETUP.exe" /silent GLE 0 --- snip ---
The DirectX runtime installer can't overwrite a dll that is locked by the Steam client/launcher in memory.
You can check 'c:\windows\logs\DirectX.log'.
--- snip --- ... 04/17/14 11:03:38: dxupdate: DirectXUpdateGetSetupInformation(): Section [4.09.00.0904.0-4.09.00.0904.0_WinXP] is being installed. 04/17/14 11:03:38: dxupdate: Extracted file C:\windows\system32\DirectX\DX7536.tmp\xinput1_3_x86.cat from cab 04/17/14 11:03:38: dxupdate: Extracted file C:\windows\system32\DirectX\DX7536.tmp\xinput1_3.dll from cab 04/17/14 11:03:38: dxupdate: Extracted file C:\windows\system32\DirectX\DX7536.tmp\xinput1_3_x86.inf from cab 04/17/14 11:03:38: dxupdate: Extracted file C:\windows\system32\DirectX\DX7536.tmp\xinput1_3_x86_xp.inf from cab 04/17/14 11:03:38: dxupdate: Files: 5 04/17/14 11:03:38: dxupdate: Size: 498688 04/17/14 11:03:38: dxupdate: DirectXUpdateInstallPlugIn(): Installing: xinput1_3_x86_xp.inf - [x86_Install] 04/17/14 11:03:38: dxupdate: Target file: 'C:\windows\system32\xinput1_3.dll' Target file is Version 9.18.944.0 Source file is Version 9.18.944.0 04/17/14 11:03:38: dxupdate: InUse: C:\windows\system32\xinput1_3.dll. 04/17/14 11:03:38: dxupdate: CabCallback(): Unable to copy C:\windows\system32\DirectX\DX7536.tmp\xinput1_3.dll. 04/17/14 11:03:38: dxupdate: ExecuteInf(): SetupInstallFromInfSection() failed, error = 183. 04/17/14 11:03:38: dxupdate: ExecuteInf(): Unable to install C:\windows\system32\DirectX\DX7536.tmp\xinput1_3_x86_xp.inf:[x86_Install]. The file may be damaged. 04/17/14 11:03:38: dxupdate: DirectXUpdateInstallPlugIn(): ExecuteInf() failed. 04/17/14 11:03:38: dsetup32: CSetup::InstallPlugIn(): DirectXUpdateInstallPlugIn() failed. 04/17/14 11:03:38: dsetup32: CSetup::SetupForDirectX(): InstallPlugIn() failed. 04/17/14 11:03:38: dsetup32: start finalizing: phase: 5 - 5, total: 0 - 2 04/17/14 11:03:38: dsetup32: Installation ended with value -9 = Internal or unsupported error --- snip ---
In many cases it's 'xinput1_3.dll'. This kind of error is also encountered on Windows (lots of reports). A reboot in between starts will fix it because the locked dll will be replaced on next Windows startup.
There are multiple ways to handle this problem (apart from adding support for SP_COPY_IN_USE_NEEDS_REBOOT to Wine itself):
1) install DX runtime without starting Steam in the Steam WINEPREFIX (make sure you don't auto-run Steam services)
-> app folder -> 'installers' -> 'DirectX'
--- snip --- $ wine DXSETUP.exe /silent --- snip ---
2) remove the dll from 'system32' folder (or 'SysWOW64' on 64-bit prefix) prior running Steam in the prefix
3) fake successful installation by adding registry key (see '17470_install.vdf' where the registry key is located -> 'DirectX' DWORD:1)
Regards
http://bugs.winehq.org/show_bug.cgi?id=36059
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #1 from Stefan Dösinger stefan@codeweavers.com --- Setting xinput1_*=disabled in winecfg for Steam.exe works for me. That's more permanent than deleting the file, and doesn't have to be done for each game.
I suspected that the problem happens because our xinput1_1 loads xinput1_3, but after reading your analysis and doing more checks I realized my theory was incorrect.
http://bugs.winehq.org/show_bug.cgi?id=36059
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello Stefan,
--- quote --- Setting xinput1_*=disabled in winecfg for Steam.exe works for me. That's more permanent than deleting the file, and doesn't have to be done for each game. --- quote ---
Yes, there are several ways to work around .. the list was not meant to be exhaustive :)
More ways:
* Place 'xinput1_3.dll' in the folder where 'Steam.exe' lives. Due to loader search strategy, this one will be picked up and hence avoid locking the one from 'system32', allowing replacement.
* Pass 'SDL_XINPUT_ENABLED=0' environment variable when starting Steam client. Magic happens.
--- quote --- I suspected that the problem happens because our xinput1_1 loads xinput1_3, but after reading your analysis and doing more checks I realized my theory was incorrect. --- quote ---
Builtin 'xinput1_4.dll' is explicitly loaded by Steam client, it late binds to xinput1_4.XInputSetState().
Due to forwarder mechanism, builtin 'xinput1_3.dll' gets delay loaded (xinput1_4.XInputSetState -> xinput1_3.XInputSetState).
Wine's builtin 'xinput1_3.dll' gets unloaded again because of native preference (pre-attach hook) and native 'xinput1_3.dll' is ultimately loaded from 'system32' folder.
Regards
http://bugs.winehq.org/show_bug.cgi?id=36059
Johan Gardhage johan.gardhage@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johan.gardhage@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=36059
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |legluondunet@free.fr
--- Comment #3 from Anastasius Focht focht@gmx.net --- *** Bug 36252 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=36059
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer
https://bugs.winehq.org/show_bug.cgi?id=36059
Adam Bolte abolte@systemsaviour.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |abolte@systemsaviour.com
https://bugs.winehq.org/show_bug.cgi?id=36059
tt_1 herrtimson@yahoo.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |herrtimson@yahoo.de
https://bugs.winehq.org/show_bug.cgi?id=36059
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|stefan@codeweavers.com |stefandoesinger@gmx.at
https://bugs.winehq.org/show_bug.cgi?id=36059
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/setupapi-SP_CO | |PY_IN_USE_NEEDS_REBOOT Status|NEW |STAGED CC| |dmitry@baikal.ru, | |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=36059
Fincer fincer89@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fincer89@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=36059
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #4 from winetest@luukku.com --- I haven't seen this issue with wine-staging for a while. So assuming the patch is working like expected.
https://bugs.winehq.org/show_bug.cgi?id=36059
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |setupapi
https://bugs.winehq.org/show_bug.cgi?id=36059
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=36059
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/setupapi-SP_CO |er/patches/setupapi-SP_COPY |PY_IN_USE_NEEDS_REBOOT |_IN_USE_NEEDS_REBOOT CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=36059
zzzzzyzz@hacari.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzzzzyzz@hacari.org
https://bugs.winehq.org/show_bug.cgi?id=36059
Linards linards.liepins@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |linards.liepins@gmail.com
--- Comment #5 from Linards linards.liepins@gmail.com --- Also confirming that this issue no longer is experienced in my machine.
https://bugs.winehq.org/show_bug.cgi?id=36059
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |87b2af73baf3cc26fe5ed135cbd | |6ed494a9003be CC| |leslie_alistair@hotmail.com Status|STAGED |RESOLVED
--- Comment #6 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=87b2af73baf3cc26fe5ed135c...
https://bugs.winehq.org/show_bug.cgi?id=36059
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.2.
https://bugs.winehq.org/show_bug.cgi?id=36059
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=36059
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #8 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.1.