theNizo / linux_rocksmith

Guides to get Rocksmith 2014 running on Linux
https://thenizo.github.io/linux_rocksmith/
GNU General Public License v3.0
107 stars 10 forks source link

Rocksmith refuses to find any devices even though RS-ASIO can successfully request WineASIO #42

Open highon10kyears opened 9 months ago

highon10kyears commented 9 months ago
theNizo commented 9 months ago

Hey, sorry for getting back so late.

As far as I understand, you don't have the game on Steam and are therefore using Lutris here. Regardless, I tried it (Rocksmith Steam version only nags you when not running it from Steam, but lets you play) and got it working.

My Lutris setup for this test   Game Configuration: * Game Info * **Runner:** Wine * Game Options * **Executable:** `$STEAMLIBRARY/common/Rocksmith2014/Rocksmith2014.exe` * **Working Directory:** `$STEAMLIBRARY/common/Rocksmith2014/` * **Wine Prefix:** * Runner Options * **Wine Version:** wine-ge-8-25-x86_64 * (Turned off FSR and the Anticheats, because I always do that.) * System Options * **Environment Variables:** `PIPEWIRE_LATENCY=256/48000` Setup: 1. Select "Open Bash terminal" from Lutris and run `winetricks dxvk vcrun2013 -q` (Alternatively you can do it from the winetricks gui) 2. Run `env WINEPREFIX=/path/to/pfx ./wineasio-register` - Replace paths as needed. The wineasio-register script comes with wineasio. 3. Open pavucontrol 4. Run game ---

regsvr would not find wineasio.dll

are you running regsvr directly (which is not done in the guide anymore), or does the error appear when using the wineasio-register script?

it's able to successfully request the ASIO driver [...] but Rocksmith still throws the "no audio output device" error

I think I can help the most by having a look at it myself. Could you please send me the log?

highon10kyears commented 9 months ago

I'm running the wineasio-register script— I only tried running regsvr manually after it failed to work. I tried wineasio-register again, attempting to make sure I had the right wineprefix and Lutris' wine version: image

and I was able to get it to successfully register the DLL:

image

but if I try VBASIO32Test.exe on the same prefix and wine: image

image

RS_ASIO-log.txt

Here's the most recent RS_ASIO-log, although this was from when I swapped over to wine-staging 8.21.

theNizo commented 9 months ago

I can replicate that.

STEP 1/2:

What you are doing:

env WINEPREFIX=/home/g3intel/.local/share/wineprefixes/rocksmith2014 /home/g3intel/.local/share/lutris/runners/wine/wine-ge-8-25-x86_64/bin/wine ./wineasio-register

What you should be doing:

env WINEPREFIX=/home/g3intel/.local/share/wineprefixes/rocksmith2014 ./wineasio-register

What and why: You are using wine to run a (Linux) shell script. You don't want to call wine.

(Since the script runs even when wine is called before it, the behavior regarding your command is different to what I thought. Anyway, don't call wine and it should work as intended.)

STEP 2/2:

Turn on exclusive mode in the Rocksmith.ini - it didn't work without it on my system.


BTW

... your log says 11 capture devices. This could be an issue.

I like to use pavucontrol to control my audio devices, which works on pipewire with the pipewire-pulse package. Rocksmith will select the default device as the first one, then tie all others to it as long as input slots are free. I can't see a pattern, but the order stays the same over multiple sessions.

If you want to play multiplayer, you need to adjust the channels in the RS_ASIO.ini, which would be number of input in the patchbay minus 1. (I just figured this out and will update the guide.)

highon10kyears commented 9 months ago

I checked and I do have Exclusive Mode enabled in Rocksmith.ini, and it was already enabled— I don't remember ever going to turn it off. I tried executing ./wineasio-register without running it through wine (copy-pasted from your "should be doing" example just to be sure), and it did successfully register. I also used pavucontrol to disable all inputs and outputs except for my UMC202HD, and even tried the Direct and Pro Audio modes to cut it down to one input and output available, period; however, running Rocksmith 2014 on ge-8.25 wine or my system wine-staging still results in the no output devices available error.

theNizo commented 9 months ago

do have Exclusive Mode enabled in Rocksmith.ini

Assuming you're using the newest version of RS_ASIO, you'd also have been told when starting the game. I misjudged that from the logs.

UMC202HD

This could be the problem. I'm seeing unsupported sample rate: 48000 in your log. Rocksmith only does 48000 Hz sample rate, meanwhile your device is probably set to something different.

I'd recommend to first try onboard audio, to be sure whether it is your audio interface. If that works, continue to read. If it doesn't, report back.

I now assume that you're already using the enviroment variable PIPEWIRE_LATENCY=256/48000. I also assume that you want to use that audio interface. In that case, I would try to temporarily set the audio interface to a different sample rate when playing Rocksmith.

The command I found in this post seems to work: pw-metadata -n settings 0 clock.force-rate 48000

highon10kyears commented 9 months ago

Firing off that pipewire command and using my system wine-staging has gotten it to the point that it's recognizing my audio output device, but the audio is distorted and sped-up; once I get to the in-game device selection, it initially showed that RS_ASIO 2 was receiving some kind of audio input— but it did not register anything when I got to the calibration screen. RS_ASIO-log.txt Here's the most recent RS_ASIO-log.

theNizo commented 9 months ago

I'm sorry again, I forgot to answer.

For "normal" jack, I'd recommend to lower the buffer size and increase the buffer periods. 256/4 worked for most people. The distorted sound happens if your PC can't handle it. If I set the buffer size higher than 256 (eg. 512 or 1024) on my machine, it will sound the same to what you hear.

You can try PIPEWIRE_LATENCY=128/48000 <rest of the command> for a start.

I'm not sure if and how you can set the buffer periods in Pipewire. Looking at this thread, maybe you could try setting that with the first value of PIPEWIRE_RATE.

You could also try setting the latency in the Rocksmith.ini. It has to match the buffer periods anyway (Which apparently didn't matter for pipewire because the periods are never set anywhere else in the guide).

highon10kyears commented 8 months ago

My apologies for the delayed back and forth on my end, as well - breaking my foot seeing Devil Master and Hulder didn't help, aha

Reducing the buffer size to 128 removed the distortion, so that's progress. It's successfully finding output devices, I can hear the non-distorted output, and in qpwgraph I can see it binding to my input device— tested with the Real Tone Cable I have for Rocksmith+, plugged into my onboard audio, and with the UMC202, set to Pro Audio so that it's down to one input and output— but I'm still seeing no activity on any of the listed devices when I try to select Microphone mode in Rocksmith and there's definitely no input in game on the calibration screen.

theNizo commented 8 months ago

I drew this just to absolutely make sure you configured this correctly.

patching

It doesn't matter what type of device you connect to which channel, the names that are displayed in Rocksmith don't mean anything. For example, I've just connected a microphone to Channel 0 (which is called RealToneCable) and I got audio.


If that is not the problem, I'm out of ideas, sorry

Beanow commented 3 months ago

I was able to reproduce this issue from https://github.com/theNizo/linux_rocksmith/issues/42#issuecomment-1916192928

And believe I have the solution: keep the wineasio32 and wineasio64 filenames we copy to Proton. In this copy snippet:

# !!! WATCH OUT FOR VARIABLES !!!
cp /usr/lib32/wine/i386-unix/wineasio32.dll.so "$PROTON/lib/wine/i386-unix/wineasio.dll.so"
cp /usr/lib/wine/x86_64-unix/wineasio64.dll.so "$PROTON/lib64/wine/x86_64-unix/wineasio.dll.so"
cp /usr/lib32/wine/i386-windows/wineasio32.dll "$PROTON/lib/wine/i386-windows/wineasio.dll"
cp /usr/lib/wine/x86_64-windows/wineasio64.dll "$PROTON/lib64/wine/x86_64-windows/wineasio.dll"

Note we are copying a file called wineasio32 | wineasio64, but in the destination renaming it to wineasio. The register script however does not expect this name.

Trying to fix

Instead, try to copy the files with original names:

# !!! WATCH OUT FOR VARIABLES !!!
cp /usr/lib32/wine/i386-unix/wineasio32.dll.so "$PROTON/lib/wine/i386-unix/wineasio32.dll.so"
cp /usr/lib/wine/x86_64-unix/wineasio64.dll.so "$PROTON/lib64/wine/x86_64-unix/wineasio64.dll.so"
cp /usr/lib32/wine/i386-windows/wineasio32.dll "$PROTON/lib/wine/i386-windows/wineasio32.dll"
cp /usr/lib/wine/x86_64-windows/wineasio64.dll "$PROTON/lib64/wine/x86_64-windows/wineasio64.dll"

And run the registration (again).

env WINEPREFIX=$STEAMLIBRARY/steamapps/compatdata/221680/pfx ./wineasio-register

The initially mentioned test command should work!

WINEPREFIX=$STEAMLIBRARY/steamapps/compatdata/221680/pfx $PROTON/bin/wine /path/to/VBASIOTest32.exe

Rather than the #0003 OPEN ASIO DEVICE ERROR: Driver not found the test sound should play when selecting the device.

theNizo commented 3 months ago

Note we are copying a file called wineasio32 | wineasio64, but in the destination renaming it to wineasio. The register script however does not expect this name.

???

It's only called "wineasio" (without numbers) in the files in the Proton installation directory. It's called "wineasio##" (where # would be a digit) everywhere else.

The register script doesn't care about what files are in the Proton installation directory.

Instead, try to copy the files with original names:

Works for Rocksmith too. We can change that if you want to.

Unfortunately, VBASIOTest gui won't show up on my system when started with Proton, so it's not easy for me to test anything regarding VBASIOTest at the moment.

joaociocca commented 2 months ago
Not useful for this issue. > ### Trying to fix > Instead, try to copy the files with original names: > > ```shell > # !!! WATCH OUT FOR VARIABLES !!! > cp /usr/lib32/wine/i386-unix/wineasio32.dll.so "$PROTON/lib/wine/i386-unix/wineasio32.dll.so" > cp /usr/lib/wine/x86_64-unix/wineasio64.dll.so "$PROTON/lib64/wine/x86_64-unix/wineasio64.dll.so" > cp /usr/lib32/wine/i386-windows/wineasio32.dll "$PROTON/lib/wine/i386-windows/wineasio32.dll" > cp /usr/lib/wine/x86_64-windows/wineasio64.dll "$PROTON/lib64/wine/x86_64-windows/wineasio64.dll" > ``` > > And run the registration (again). > > ``` > env WINEPREFIX=$STEAMLIBRARY/steamapps/compatdata/221680/pfx ./wineasio-register > ``` > > The initially mentioned test command should work! > > ``` > WINEPREFIX=$STEAMLIBRARY/steamapps/compatdata/221680/pfx $PROTON/bin/wine /path/to/VBASIOTest32.exe > ``` > > Rather than the `#0003 OPEN ASIO DEVICE ERROR: Driver not found` the test sound should play when selecting the device. I missed seeing this issue before, so I had opened a [Q&A question](https://github.com/theNizo/linux_rocksmith/discussions/55)... but this did the trick for me too, on Garuda! ~~But it seems I can't create the launch script using proton-ge... when I put `PRESSURE_VESSEL_SHELL=instead %command%` in the launch configuration, it just launches the game, I see no terminal window =( guess I should add a new issue about this one, even though proton-ge is never mentioned anywhere..?~~ well, whatever, let's just switch to Proton 9