mdias / rs_asio

ASIO for Rocksmith 2014
MIT License
1.02k stars 99 forks source link

Not working with WineASIO #10

Closed ciolansteen closed 4 years ago

ciolansteen commented 4 years ago

Don't know if this is an issue or missing feature but it would be nice to have this working with WineASIO.

mdias commented 4 years ago

Please post the contents of RS_ASIO.ini and RS_ASIO-log.txt on pastebin and link it here so I can have a look.

mdias commented 4 years ago

It's possible that one of the 0.3.x releases might fix this for you.

ciolansteen commented 4 years ago

Hello and sorry for the late reply. I was off with holidays and stuff.

0.3.x doesn't fix this issue. Below are my log and config

CONFIG

`[Config] EnableWasapi=0 EnableAsio=1

[Asio] ; available buffer size modes: ; driver - respect buffer size setting set in the driver ; host - use a buffer size as close as possible as that requested by the host application ; custom - use the buffer size specified in CustomBufferSize field BufferSizeMode=driver CustomBufferSize=

[Asio.Output] Driver=WineASIO EnableSoftwareEndpointVolumeControl=1 EnableSoftwareMasterVolumeControl=1 SoftwareMasterVolumePercent=100

[Asio.Input.0] Driver=wineasio Channel=0 EnableSoftwareEndpointVolumeControl=1 EnableSoftwareMasterVolumeControl=1 SoftwareMasterVolumePercent=100

[Asio.Input.1] Driver= Channel=1 EnableSoftwareEndpointVolumeControl=1 EnableSoftwareMasterVolumeControl=1 SoftwareMasterVolumePercent=100`

I used both wineasio and WineASIO since nothing is detected. Jack audio is started, and other WineASIO software work just fine (EG GuitarRig)


### LOG ###
0.000 [INFO]   - Wrapper DLL loaded
0.000 [INFO]  PatchOriginalCode
0.000 [INFO]  Patching CoCreateInstance
0.318 [INFO]  Patch_CallAbsoluteAddress - num locations: 5
0.319 [INFO]  Patching call at 01C5AA85
0.319 [INFO]  Patching call at 01F03B6E
0.319 [INFO]  Patching call at 01F5C681
0.319 [INFO]  Patching call at 01FAEF75
0.320 [INFO]  Patching call at 01FAF40D
0.321 [INFO]  Patching PortAudio MarshalStreamComPointers
0.775 [INFO]  Patch_CallRelativeAddress - num locations: 1
0.778 [INFO]  Patching call at 01F03059
0.780 [INFO]  Patching PortAudio UnmarshalStreamComPointers
1.066 [INFO]  Patch_CallRelativeAddress - num locations: 1
1.066 [INFO]  Patching call at 01F0310E
1.067 [INFO]  Patched_CoCreateInstance called: IID_IMMDeviceEnumerator
1.069 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eRender - role: eMultimedia
1.069 [INFO]  RSAggregatorDeviceEnum::UpdateAvailableDevices
1.069 [INFO]  AsioHelpers::FindDrivers
1.069 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - output requesting ASIO driver: WineASIO
1.069 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
1.069 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - input[0] requesting ASIO driver: wineasio
1.069 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
1.069 [INFO]  DebugDeviceEnum::UpdateAvailableDevices - 0 render devices, 0 capture devices
1.069 [INFO]    hr: 80070490
1.069 [INFO]    *ppEndpoint: 00000000
1.069 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eCapture - role: eMultimedia
1.069 [INFO]    hr: 80070490
1.069 [INFO]    *ppEndpoint: 00000000
1.069 [INFO]  DebugDeviceEnum::EnumAudioEndpoints - dataFlow: eAll - dwStateMask: 1
1.070 [INFO]    hr: 0
1.070 [INFO]    *ppDevices: 0B434498
15.788 [INFO]  Patched_CoCreateInstance called: IID_IMMDeviceEnumerator
15.788 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eRender - role: eMultimedia
15.789 [INFO]  RSAggregatorDeviceEnum::UpdateAvailableDevices
15.789 [INFO]  AsioHelpers::FindDrivers
15.789 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - output requesting ASIO driver: WineASIO
15.789 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
15.789 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - input[0] requesting ASIO driver: wineasio
15.789 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
15.790 [INFO]  DebugDeviceEnum::UpdateAvailableDevices - 0 render devices, 0 capture devices
15.790 [INFO]    hr: 80070490
15.790 [INFO]    *ppEndpoint: 00000000
15.790 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eCapture - role: eMultimedia
15.790 [INFO]    hr: 80070490
15.790 [INFO]    *ppEndpoint: 00000000
15.790 [INFO]  DebugDeviceEnum::EnumAudioEndpoints - dataFlow: eAll - dwStateMask: 1
15.790 [INFO]    hr: 0
15.790 [INFO]    *ppDevices: 0B434498
15.793 [INFO]  DebugDeviceEnum::RegisterEndpointNotificationCallback
17.848 [INFO]  DebugDeviceEnum::UnregisterEndpointNotificationCallback
18.172 [INFO]   - Wrapper DLL unloaded
mdias commented 4 years ago

It seems that no ASIO drivers are found.

Keep in mind that Rocksmith is a 32-bit application and so you'd need a 32-bit install of WineASIO on your wine instance. If it's correctly installed, you should see the WineASIO driver name right below the [INFO] AsioHelpers::FindDrivers log line.

ciolansteen commented 4 years ago

the WineASIO driver was registered with WINEPREFIX=$HOME/Games/SteamLibrary/steamapps/compatdata/221680/pfx/ wine64 regsvr32 wineasio.dll

I will try a complete reinstall + windows Steam in wine install to make sure everything is correct and come back with updates

ciolansteen commented 4 years ago

Still no driver found on a fresh RS install + 0.3.5 rs_asio.

steps to reproduce:

1 - Install Rocksmith in Steam using Proton compatibility layer 2 - Register WineASIO driver for the Rocksmith bottle WINEPREFIX=$HOME/Games/SteamLibrary/steamapps/compatdata/221680/pfx/ wine64 regsvr32 wineasio.dll 3 - Map $LOCATION_TO_STEAMLIBRARY_FOLDER to some drive in WineCfg (necessary for the game to start). 4 - Add wineasio.dll to Libraries Overrides in WineCfg and set it to native, builtin 5 - Start JackAudio 6 - Start Rocksmith

No asio driver found

mdias commented 4 years ago

On windows 64-bit, the 32-bit ASIO drivers are found through registry key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ASIO, not sure if Wine mimicks this, but for RS-ASIO itself, that key is visible on Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ASIO (because it's a 32-bit app, and windows seems to alias that 64-bit key here).

Have you tried a 32-bit wine prefix? Also maybe try some software like Reaper 32-bit inside that same prefix to see if it can find the WineASIO driver.

gusix commented 4 years ago

Hi, sorry to update this issue, but I've got it to recognize WineASIO I think, but it still gives me errors. I'm leaving my RS_ASIO-log here.

mdias commented 4 years ago

It seems you almost have it working, but WineASIO is failing to initialize.

The cause for this failure should be WineASIO failing to create a Jack client. Perhaps running wine in a terminal will allow you to view some error messages it's throwing, since it doesn't seem to like outputting them through the usual ASIO error feedback mechanism.

gusix commented 4 years ago

WineASIO doesn't work on Arch at all for me, had it working just fine not so long ago so I didn't bothered checking before. The setup was pretty straightforward it got recognized without doing anything, I'll do more testing and come back here when I get it working (or not).

hecksadecimal commented 3 years ago

RS_ASIO-log.txt RS_ASIO.ini

I'm at right around the same place, using Manjaro, Steam Proton 5.13, RS_ASIO 0.5.3 and WineASIO 1.0.0 compiled from AUR.

Results of running proton through the terminal:

oxeff@manjaro ~/.l/s/S/s/c/221680> STEAM_COMPAT_DATA_PATH=/home/oxeff/.local/share/Steam/steamapps/compatdata/221680 ~/.steam/steam/steamapps/common/Proton\ 5.13/proton run ~/.steam/steam/steamapps/common/Rocksmith2014/Rocksmith2014.exe
fsync: up and running.
Setting breakpad minidump AppID = 221680
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198043994225 [API loaded no]
Unable to read VR Path Registry from C:\users\steamuser\Local Settings\Application Data\openvr\openvrpaths.vrpath
Fossilize INFO: Overriding serialization path: "/home/oxeff/.local/share/Steam/steamapps/shadercache/221680/fozpipelinesv4/steamapprun_pipeline_cache".
Attempting to load original DLL from: C:\windows\system32\avrt.dll
Load OK; fetching procedure addresses...
Unloading original DLL
Attempting to load original DLL from: C:\windows\system32\avrt.dll
Load OK; fetching procedure addresses...
Unloading original DLL
Attempting to load original DLL from: C:\windows\system32\avrt.dll
Load OK; fetching procedure addresses...
Unloading original DLL
porl commented 3 years ago

@gusix same here (on Arch).

I got it working when I run the game from the command line (with the following command): PROTON_USE_WINED3D=1 STEAM_COMPAT_DATA_PATH=/mnt/data/steam/steamapps/compatdata/221680/ prime-run /mnt/data/steam/steamapps/common/Proton\ 5.13/proton run /mnt/data/steam/steamapps/common/Rocksmith2014/Rocksmith2014.exe (note that I am using prime-run due to my nvidia card).

Unfortunately running it this way means that the steam overlay is not working and I can't use any of the DLC I purchased (or use CDLC either).

If I run the game from the Steam GUI I get the "No audio interface" error. Same if I try to run it from the command-line with steam -applaunch 221680.

Not sure what Steam is doing to interfere with the ASIO working (I double checked that the Steam GUI is using the same version of Proton to launch the game).

porl commented 3 years ago

@mdias is there anything I can do to get more useful debug info for you? As I mentioned in my other comment, it runs perfectly well from the command line; though I'd like to get it working from Steam so that I can access the other content.

mdias commented 3 years ago

Do you get any RS ASIO log file in the game folder when you run it through steam?

porl commented 3 years ago

When run from steam client:

0.000 [INFO]   - Wrapper DLL loaded (v0.5.4)
0.000 [INFO]  PatchOriginalCode
0.322 [INFO]  Patching CoCreateInstance
0.322 [INFO]  Patch_CallAbsoluteAddress - num locations: 5
0.322 [INFO]  Patching call at 01C5AA85
0.322 [INFO]  Patching call at 01F03B6E
0.322 [INFO]  Patching call at 01F5C681
0.322 [INFO]  Patching call at 01FAEF75
0.322 [INFO]  Patching call at 01FAF40D
0.322 [INFO]  Patching PortAudio MarshalStreamComPointers
0.322 [INFO]  Patch_CallRelativeAddress - num locations: 1
0.322 [INFO]  Patching call at 01F03059
0.323 [INFO]  Patching PortAudio UnmarshalStreamComPointers
0.323 [INFO]  Patch_CallRelativeAddress - num locations: 1
0.323 [INFO]  Patching call at 01F0310E
0.323 [INFO]  Patched_CoCreateInstance called: IID_IMMDeviceEnumerator
0.350 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eRender - role: eMultimedia
0.350 [INFO]  RSAggregatorDeviceEnum::UpdateAvailableDevices
0.350 [INFO]  AsioHelpers::FindDrivers
0.355 [INFO]    WineASIO
0.355 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - output requesting ASIO driver: WineASIO
0.355 [INFO]  Creating AsioSharedHost - dll: wineasio.dll
0.364 [ERROR]  ASIO Error: WineASIO does not return error messages

0.364 [INFO]  Destroying AsioSharedHost - dll: wineasio.dll
0.364 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
0.364 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - input[0] requesting ASIO driver: WineASIO
0.364 [INFO]  Creating AsioSharedHost - dll: wineasio.dll
0.369 [ERROR]  ASIO Error: WineASIO does not return error messages

0.369 [INFO]  Destroying AsioSharedHost - dll: wineasio.dll
0.370 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
0.370 [INFO]  DebugDeviceEnum::UpdateAvailableDevices - 0 render devices, 0 capture devices
0.370 [INFO]    hr: 80070490
0.370 [INFO]    *ppEndpoint: 00000000
0.370 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eCapture - role: eMultimedia
0.370 [INFO]    hr: 80070490
0.370 [INFO]    *ppEndpoint: 00000000
0.370 [INFO]  DebugDeviceEnum::EnumAudioEndpoints - dataFlow: eAll - dwStateMask: 1
0.370 [INFO]    hr: S_OK
0.370 [INFO]    *ppDevices: 0A4DE7C8
8.610 [INFO]  Patched_CoCreateInstance called: IID_IMMDeviceEnumerator
8.610 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eRender - role: eMultimedia
8.610 [INFO]  RSAggregatorDeviceEnum::UpdateAvailableDevices
8.610 [INFO]  AsioHelpers::FindDrivers
8.610 [INFO]    WineASIO
8.610 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - output requesting ASIO driver: WineASIO
8.610 [INFO]  Creating AsioSharedHost - dll: wineasio.dll
8.615 [ERROR]  ASIO Error: WineASIO does not return error messages

8.615 [INFO]  Destroying AsioSharedHost - dll: wineasio.dll
8.616 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
8.616 [INFO]  RSAsioDeviceEnum::UpdateAvailableDevices - input[0] requesting ASIO driver: WineASIO
8.616 [INFO]  Creating AsioSharedHost - dll: wineasio.dll
8.621 [ERROR]  ASIO Error: WineASIO does not return error messages

8.621 [INFO]  Destroying AsioSharedHost - dll: wineasio.dll
8.621 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
8.621 [INFO]  DebugDeviceEnum::UpdateAvailableDevices - 0 render devices, 0 capture devices
8.621 [INFO]    hr: 80070490
8.621 [INFO]    *ppEndpoint: 00000000
8.621 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eCapture - role: eMultimedia
8.621 [INFO]    hr: 80070490
8.621 [INFO]    *ppEndpoint: 00000000
8.621 [INFO]  DebugDeviceEnum::EnumAudioEndpoints - dataFlow: eAll - dwStateMask: 1
8.621 [INFO]    hr: S_OK
8.621 [INFO]    *ppDevices: 0A6CE470
8.622 [INFO]  DebugDeviceEnum::RegisterEndpointNotificationCallback
11.384 [INFO]  DebugDeviceEnum::UnregisterEndpointNotificationCallback
11.532 [INFO]   - Wrapper DLL unloaded
mdias commented 3 years ago

Wine still doesn't return any helpful error messages... that is annoying. The good news is ofc RS ASIO still seems to be loading "injected" just fine...

Are you sure you're running on the same wine prefix when launching from steam compared to launching manually? Maybe the system user that launches the game on steam doesn't have enough privileges for wine-asio to connect to JACK?

porl commented 3 years ago

Yes, I also tried to download a custom Proton build so that I could enable that in both the GUI and the command line to ensure I wasn't accidentally using different versions.

Is there any way I can get more info out of Steam showing what it is launching with (to see what is different)?

porl commented 3 years ago

Made a little bit of diagnostic progress. I'll paste the reply I made to a reddit thread comment (see here)

In the link you shared I noticed a part of one of the comments mentioning that you need to make sure you are in the RockSmith directory (or add a cd ... line in the launch script before the command) to ensure CDLC works. Since that is a part of my issue running the game outside of the steam client I figured I'd give it a try.

Oddly enough, I get the same error as I would running from the client! So it looks like the difference is the fact that steam "changes directory" to the game directory before running it. Literally anywhere else is fine, but if I run the command from the Rocksmith2014 directory I get the same issue.

Not sure how helpful it is, but at least it explains the difference between launching from the client or otherwise.

mdias commented 3 years ago

This is very strange. RS ASIO itself doesn't use the current working directory for anything, and gets the WineASIO path from the registry. However something else on the wine stack might be using it for something? ... It's hard to tell. WineASIO needs to be improved to output proper error messages in order to get to the cause of the issue.

mdias commented 3 years ago

An idea you could check is to cd into somewhere else on disk (to make it work), and in that folder create a symbolic link to the dlc directory inside the game directory. Maybe then it will launch and detect the dlc? Not a proper solution, but could be a workaround until it's figured out what is failing during WineASIO initialization.

porl commented 3 years ago

That's a good idea for a possible workaround. When I get back home to my interface I'll definitely give that a try! Either way, thanks for the help.

porl commented 3 years ago

Your work-around didn't quite work, however it lead me down a path to find a (temporary at least) solution that may or may not hint at the problem.

Linking/copying the dlc directory to a separate directory that is 'cd'd into in the launch script did not work for the dlc issue, but just for the hell of it I figured I'd try linking everything from the installation directory into the separate "launch directory". Lo and behold the audio issue appeared again.

So obviously some file in the directory was annoying wineasio so I decided to try culling things from the launch directory until I either got it all working or got back to the audio-but-no-dlc situation.

Long story short, RS_ASIO.ini cannot be in the directory the game is launched from. I'm not sure what files are needed or not in there, but if I have everything but that file it all works perfectly when run from the launch script - yes, both audio and dlc!

Seems very strange, since the RS_ASIO.ini is obviously being read from the installation directory (easy to confirm by enabling/disabling the ASIO support from it), but obviously something in wineasio is getting tripped up when the working directory contains that file.

Not sure if you think there is anything else useful I can diagnose in order to find a more proper solution, but at least the workaround works for me.

cloph commented 3 years ago

interesting find - for all uses struggling with the setup: https://www.reddit.com/r/rocksmith/comments/jxngpx/howto_rocksmith_2014_on_linux_with_steamproton/ has a walkthrough on how to get it running. the tldr version is:

Stumpftopf commented 3 years ago

Hi, i have the same issue. Is also use the workaround, to start Rocksmith within another directory. What i have found out so far is, that it seems that the "avrt.dll" in the directory is the trouble maker. But a i don't have a workaround for now. Tried to delete or rename the dll. Rocksmith starts but without wineasio. I will try some different things.

icaroerasmo commented 2 years ago

any updates on this?