ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.02k stars 1.05k forks source link

Shadows: Awakening (585450) - black screen #1102

Open lieff opened 6 years ago

lieff commented 6 years ago

Distro: Ubuntu 18.04 GPU: GTX 980, Nvidia proprietary driver 390.48 Resolution: 2560x1440 RAM: 16GB Proton 3.7-5 Beta

Do not starts - black screen on startup.

omicron-b commented 6 years ago

@lieff in this case updating a driver might actually help. I have that game in my wishlist so it would be great to know if it`s playable, could you please check? Thanks in advance.

lieff commented 6 years ago

@m-svo yep, I'll check it later.

lieff commented 6 years ago

Nope, same with new drivers 396.54.

lieff commented 6 years ago

Game log contains

WindowsVideoMedia error 0x80004001 while reading Z:/.../SteamLibrary/steamapps/common/Shadows Awakening/shadows_Data/sharedassets0.resource

Context: Turning DXVA off
Error details: <Empty>
Track types:

Seems this main start problem.

lieff commented 6 years ago

Game loads mfplat.dll, so Media Foundation is needed.

omicron-b commented 6 years ago

looks like you can try WINEPREFIX="<path to proton>" winetricks mf

lieff commented 6 years ago

I've already tried that, but it only installs mf.dll. Or may be my winetricks is old? I use https://github.com/Winetricks/winetricks

omicron-b commented 6 years ago

I don`t think it`s about winetricks version. Looks like you should take a native windows mfplat.dll from existing windows installation and put it into prefix, and set up native windows mfplat.dll in winecfg. This is not a suitable solution for everyone unfortunately, but it may help isolate the issue.

lieff commented 6 years ago

Yep, I'm already in process trying native dlls.

lieff commented 6 years ago

I've copy

mfplat.dll
msmpeg2adec.dll
msmpeg2vdec.dll
sqmapi.dll

32 and 64bit files, successfully register msmpeg2adec.dll/msmpeg2vdec.dll

Error changed:

WindowsVideoMedia error 0xc00d36c4 while reading Z:/.../SteamLibrary/steamapps/common/Shadows Awakening/shadows_Data/sharedassets0.resource

Context: CreateObjectFromByteStream
Error details: The byte stream type of the given URL is unsupported.
Track types:

And still not works. mfplat.dll loaded succesfully and I do not see msmpeg2vdec.dll loading. So it may be some other codec needed.

lieff commented 6 years ago

Nope sharedassets0.resource contains mp4/h264 any ideas?

omicron-b commented 6 years ago

I can only think of renaming sharedassets0 at this point. Maybe the game will just skip the intro or whatever is in that file.

lieff commented 6 years ago

Renaming makes log:

Empty file: sharedassets0.resource

(Filename:  Line: 758)

Empty file: sharedassets0.resource

(Filename:  Line: 758)

And still black screen.

lieff commented 6 years ago

I've make it working. First of all CreateObjectFromByteStream needs Scheme Handlers https://docs.microsoft.com/en-us/windows/desktop/medfound/scheme-handlers-and-byte-stream-handlers I transfer entire HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Foundation in wmf.reg.

Then it's need following media foundation files

mf.dll
mferror.dll
mfplat.dll
mfreadwrite.dll
msmpeg2adec.dll
msmpeg2vdec.dll
sqmapi.dll

And another part of registry mf.reg:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Wine\LicenseInformation]
"msmpeg2adec-AACDecoderV2AddInEnable"=dword:00000001
"msmpeg2adec-AACDecoderV2InSKU"=dword:00000001
"msmpeg2adec-DolbyDigitalDecoderV2AddInEnable"=dword:00000001
"msmpeg2adec-DolbyDigitalDecoderV2InSKU"=dword:00000001
"msmpeg2vdec-H264VideoDecoderV2AddInEnable"=dword:00000001
"msmpeg2vdec-H264VideoDecoderV2InSKU"=dword:00000001
"msmpeg2vdec-MPEG2VideoDecoderV2AddInEnable"=dword:00000001
"msmpeg2vdec-MPEG2VideoDecoderV2InSKU"=dword:00000001

[HKEY_CLASSES_ROOT\CLSID\{271C3902-6095-4c45-A22F-20091816EE9E}]
@="MPEG4 Byte Stream Handler"

[HKEY_CLASSES_ROOT\CLSID\{271C3902-6095-4c45-A22F-20091816EE9E}\InprocServer32]
@="mf.dll"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{477EC299-1421-4bdd-971F-7CCB933F21AD}]
@="File Scheme Handler"

[HKEY_CLASSES_ROOT\CLSID\{477EC299-1421-4bdd-971F-7CCB933F21AD}\InprocServer32]
@="mf.dll"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{48e2ed0f-98c2-4a37-bed5-166312ddd83f}]
@="MFReadWrite Class Factory"

[HKEY_CLASSES_ROOT\CLSID\{48e2ed0f-98c2-4a37-bed5-166312ddd83f}\InprocServer32]
@="mfreadwrite.dll"
"ThreadingModel"="Both"

And register script:

export WINEPREFIX=/path/to/SteamLibrary/steamapps/compatdata/585450/pfx
wine start regedit.exe mf.reg
wine64 start regedit.exe mf.reg
wine start regedit.exe wmf.reg
wine64 start regedit.exe wmf.reg
wine regsvr32 msmpeg2vdec.dll
wine regsvr32 msmpeg2adec.dll
wine64 regsvr32 msmpeg2vdec.dll
wine64 regsvr32 msmpeg2adec.dll

And it's working: screenshot from 2018-09-09 02-03-58

lieff commented 6 years ago

First load is very long due compile shaders. With dxvk some objects invisible because of Stream Output. In-game seems works, but there constant spinner in top right: screenshot from 2018-09-09 02-48-17

And game cannot be saved, clicks on slot do nothing. And exit to main menu stuck forever: screenshot from 2018-09-09 02-48-49

lieff commented 6 years ago

Hmm, with Proton wine and PROTON_USE_WINED3D11=1 everything seems to be normal. Save works, no constant spinner.

lieff commented 6 years ago

Played an hour, fully playable.

omicron-b commented 6 years ago

Great work. With this we can contact the developer and inform them that game could be whitelisted for SteamPlay if they can get rid of MS Media Foundation. I mean there must be a lot of other ways to play MP4.

lieff commented 6 years ago

I think they can't get rid of it because of Unity is not open source. But Proton can make Media Foundation installer, same as .NET\DX etc.

mozo78 commented 6 years ago

Hmm, with Proton wine and PROTON_USE_WINED3D11=1 everything seems to be normal. Save works, no constant spinner.

Hello, haw can I obtain Proton wine? I tried to install a Windows game in Steam but I can't find Proton nowhere on my machine.

Edit: Sorry, found it in the game's folder :)

mozo78 commented 6 years ago

Excuse me, can you give us wmf.reg and the needed .dlls? Thank you :)

lieff commented 6 years ago

I'm not sure I can. I tried to make installer from Windows6.1-KB968211-x64-RefreshPkg.msi , but there delta PA30 files https://github.com/kyz/libmspack/issues/3 , not regular dlls. Need help of Proton/Wine etc guys here.

lieff commented 6 years ago

Well, tried to make installer from https://www.microsoft.com/en-us/software-download/mediafeaturepack There actual dlls in package, but newer dlls refused to load because of functions not supported by wine:

0030:err:module:find_forwarded_export module not found for forward 'RTWorkQ.RtwqLockWorkQueue' used by L"C:\\windows\\system32\\MFPlat.DLL"
0030:err:module:find_forwarded_export module not found for forward 'RTWorkQ.RtwqUnlockWorkQueue' used by L"C:\\windows\\system32\\MFPlat.DLL"
0030:err:module:import_dll Library api-ms-win-core-processtopology-l1-1-0.dll (which is needed by L"C:\\windows\\system32\\msmpeg2vdec.dll") not found
0030:err:module:import_dll Library api-ms-win-security-cryptoapi-l1-1-0.dll (which is needed by L"C:\\windows\\system32\\msmpeg2vdec.dll") not found
lieff commented 6 years ago

Tested Wine 3.16, mfplat patches are not enough, still not works.

mozo78 commented 6 years ago

Thanks fo your efforts. We'll wait untill they sorted it out.

mozo78 commented 6 years ago

Well, tried to make installer from https://www.microsoft.com/en-us/software-download/mediafeaturepack There actual dlls in package, but newer dlls refused to load because of functions not supported by wine:

0030:err:module:find_forwarded_export module not found for forward 'RTWorkQ.RtwqLockWorkQueue' used by L"C:\\windows\\system32\\MFPlat.DLL"
0030:err:module:find_forwarded_export module not found for forward 'RTWorkQ.RtwqUnlockWorkQueue' used by L"C:\\windows\\system32\\MFPlat.DLL"
0030:err:module:import_dll Library api-ms-win-core-processtopology-l1-1-0.dll (which is needed by L"C:\\windows\\system32\\msmpeg2vdec.dll") not found
0030:err:module:import_dll Library api-ms-win-security-cryptoapi-l1-1-0.dll (which is needed by L"C:\\windows\\system32\\msmpeg2vdec.dll") not found

I can't import libraries for I receive pretty the same error:

wine regsvr32 msmpeg2vdec.dll 004b:err:module:find_forwarded_export module not found for forward 'RTWorkQ.RtwqUnlockWorkQueue' used by L"C:\windows\system32\MFPlat.DLL" 004b:err:module:find_forwarded_export module not found for forward 'RTWorkQ.RtwqLockWorkQueue' used by L"C:\windows\system32\MFPlat.DLL" 004b:err:module:import_dll Library api-ms-win-core-processtopology-l1-2-0.dll (which is needed by L"C:\windows\system32\msmpeg2vdec.dll") not found 004b:err:module:import_dll Library CRYPTSP.dll (which is needed by L"C:\windows\system32\msmpeg2vdec.dll") not found 004b:err:module:import_dll Library api-ms-win-core-registry-l2-2-0.dll (which is needed by L"C:\windows\system32\msmpeg2vdec.dll") not found regsvr32: Failed to load DLL 'msmpeg2vdec.dll'

How did you managed to register them on your machine?

lieff commented 6 years ago

Working dlls is from windows 7. There no full download for win 7/8 (only KB update with diffs), only for win10. So, we need implement mpflat further or implement RTWorkQ. Or maybe download win7 evaluation iso and extract files from there? Not sure if it's legal.

mozo78 commented 6 years ago

Thanks for the info, it's appreciated :)

mozo78 commented 6 years ago

And it finally started! 1

Thank you very much for the tips!!!

lieff commented 6 years ago

@mozo78 Always welcome :) Glad to help.

Kron4ek commented 6 years ago

By the way, the game works without DXVK too. 2018-09-20 04-11-34 And saving works on GOG version. 2018-09-20 04-18-37 Also i found out that 32-bit (syswow64) libraries are not needed to run the game, just 64-bit ones. So this game works even on pure non-syswow64 build of Wine.

XapaJIaMnu commented 5 years ago

This is also an issue in the brand new call of cthulhu game, preventing cutscenes from playing or any triggers from working.

Is anyone willing to spread the dll files of a windows 7 installation (if this is legal of course).

https://steamcommunity.com/app/399810/discussions/1/1735469327937897802/

HonkingGoose commented 5 years ago

Hi,

I'm doing some research for my issue at number 1464. That issue deals with cinematic/video playback. Most of the listed games already have a proton log attached to their issue, but this game does not.

Could somebody be so kind as to upload a proton log from a clean install?

I need to search in the proton log for mentions of MF or quartz, so that I can categorize the game.

Thanks for the help!

HonkingGoose

Ahmed-E-86 commented 5 years ago

This game definitely needs MF, because it has a workaround for MF in this comment https://github.com/ValveSoftware/Proton/issues/1102#issuecomment-419678627

lieff commented 5 years ago

Just beat the game, no other issues except Media Foundation. @HonkingGoose I've already did that and list all needed files from win7 above, otherwise game will mention absent file tried to load. There also SteamLibrary/steamapps/common/Shadows\ Awakening/shadows_Data/output_log.txt have useful debug info in case messed up registry etc.

HonkingGoose commented 5 years ago

Thanks for your input @ahmed-elsayed2017 and @lieff.

I'll drop the quest for a Proton log then, as it wouldn't add more value for my list.

afettouhi commented 5 years ago

I don't want derail this report but I do have a related question regarding how set this up. I am trying to get City of Brass working from the Epic Game Store and I have reports pointing to this here bug report to get it working. But am but confused by this thread on what to do exactly. What files do I exactly need from a Windows 7 install and what changes should be done to registration database thereafter?

kisak-valve commented 5 years ago

Hello @mozo78, please do not post links to legally problematic content.

ziabice commented 4 years ago

Tested this game using Proton 5.0-3: everything works as expected after applying the mfplat hack. To play I used a gamepad without a single problem.

My config: AMD RX 580 4GB Mesa 19.3.4 Manjaro, kernel 5.4.18 Ryzen 2600 with 16GB RAM