rs_asio icon indicating copy to clipboard operation
rs_asio copied to clipboard

RS Error "no audio output device detected" jack server receives unknown requests

Open Juppstein opened this issue 2 years ago • 14 comments

Preamble: The setup was working prior to the upgrade from Ubuntu 20.04 to 22.04.1 LTS

After the update to 22.04 when starting RS from Steam (Beta branch) using Proton 7.0-4 I immediately get the error "No audio output detected" from Rocksmith and I get this from the jack server log via QjackCtl:

Wed Aug 17 11:35:56 2022: ERROR: Unknown request 4294967040
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 511
Wed Aug 17 11:35:56 2022: ERROR: Cannot read socket fd = 21 err = No such file or directory
Wed Aug 17 11:35:56 2022: ERROR: CheckSize error size = 81 Size() = 85
Wed Aug 17 11:35:56 2022: ERROR: CheckRead error
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 1801678674
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 1953066355
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 825242216
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 52
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 0
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 0
...snipped repeating lines.....
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 0
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 2048
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 0
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 4294967040
Wed Aug 17 11:35:56 2022: ERROR: Unknown request 511
Wed Aug 17 11:35:56 2022: ERROR: Cannot read socket fd = 21 err = No such file or directory

and this from the RS Asio log:

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

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

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

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

6.418 [INFO]  Destroying AsioSharedHost - dll: wineasio.dll
6.418 [ERROR]  RSAsioDeviceEnum::UpdateAvailableDevices - failed.
6.418 [INFO]  DebugDeviceEnum::UpdateAvailableDevices - 0 render devices, 0 capture devices
6.418 [INFO]    hr: 80070490
6.418 [INFO]    *ppEndpoint: 00000000
6.418 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eCapture - role: eMultimedia
6.418 [INFO]    hr: 80070490
6.418 [INFO]    *ppEndpoint: 00000000
6.418 [INFO]  DebugDeviceEnum::EnumAudioEndpoints - dataFlow: eAll - dwStateMask: 1
6.418 [INFO]    hr: S_OK
6.418 [INFO]    *ppDevices: 11C5F770
6.419 [INFO]  DebugDeviceEnum::RegisterEndpointNotificationCallback
8.566 [INFO]  DebugDeviceEnum::UnregisterEndpointNotificationCallback
8.673 [INFO]   - Wrapper DLL unloaded`

When testing WineASIO from the same prefix with something else, i.e the exe from http://www.tropicalcoder.com/ASIOTestSigGen.htm it works and I can use the application; the log there goes as follows:

`Date: Wednesday, August/17/2022 - Time started: 09:13:46 612

ASIOSigGen version 4.33 Copyright (C) 2021 George W. Taylor
All rights reserved!
http://www.TropicalCoder.com
"Z:\data\steamlib\steamapps\common\Proton 7.0\dist\lib\wine\ASIOSigGen.exe"

Enumerating ASIO Drivers...

numDev: 0
WineASIO Driver
wineasio.dll

Total num devices found: 1
Found ASIO Configuration file!
nRequestedDrvNum: 0, Num devices: 1
asioOpenDriver success!
Diver selected...
WineASIO Driver
wineasio.dll

WineASIO
Driver Vers: 92
numInputChannels: 2, numOutputChannels: 2
inputLatency: 0, outputLatency: 0
minSize: 128, maxSize: 128
preferredSize: 128, granularity: 0
sampleRate: 48000
Channels available...
Channel: 0 - Group: 0 - out_1, ASIO sample type: ASIOSTFloat32LSB
Channel: 1 - Group: 0 - out_2, ASIO sample type: ASIOSTFloat32LSB
bOutputReady = false
pASIOBuffers->bInitSuccess
asioDriverInfo.outputBuffers to activate: 2
asioMessages: kAsioSelectorSupported
asioMessages: kAsioSelectorSupported
asioMessages: kAsioSelectorSupported
asioMessages: kAsioSelectorSupported
asioMessages: kAsioSupportsTimeInfo
asioDriverInfo.inputLatency: 0, asioDriverInfo.outputLatency: 0
Using: out_1 / out_2
dwBufferSizeBytes: 512
OK - we are now playing silence.
Going to sleep for 500 ms to see if count_buffers_played increments
dwCountBuffers: 188
OK - Very encouraging - we played some buffers of silence.
CreatePrimaryBuffer success!
Sample rate: 48000
Completed app initialization.
GenerateSineWav - dwCountBuffers: 8318
Requested frequency: 440.000000
GenerateSineWav - dwCountBuffers: 26051
Requested frequency: 440.000000
GenerateSineWav - dwCountBuffers: 31881
Requested frequency: 391.995436
GenerateSineWav - dwCountBuffers: 33214
Requested frequency: 440.000000
GenerateSineWav - dwCountBuffers: 36664
Requested frequency: 440.000000
GenerateSineWav - dwCountBuffers: 39026
Requested frequency: 440.000000
AsioDriverList destruction.


Shutting down debug logging system...
Date: Wednesday, August/17/2022 - Time: 09:15:46 944
`

Here is my rs asio config

`[Config]
EnableWasapiOutputs=0
EnableWasapiInputs=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
BaseChannel=0
EnableSoftwareEndpointVolumeControl=0
EnableSoftwareMasterVolumeControl=0
SoftwareMasterVolumePercent=100

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


Juppstein avatar Aug 17 '22 09:08 Juppstein

It seems I won't be able to help with this. The WineASIO driver doesn't return proper error messages that could help debug this, and I've never tried the linux support myself.

However, looking at the error messages printed by jack I would say the problem lies between WineASIO and Jack. Are you sure that the ASIOSigGen executable you tested is also a 32 bit application? Rocksmith is a 32-bit application which in this case will load a 32-bit version of WineASIO.

mdias avatar Aug 17 '22 13:08 mdias

Honestly I thought about that as well. I'll try to build WineASIO for 32-bit from source on my box and see how that goes. My version comes from the old kxstudio repo, but they do not provide an updated version for Ubuntu 22.04 yet.

Juppstein avatar Aug 17 '22 13:08 Juppstein

OK, that didn't go well. It looks like right now wineasio cannot be built on 22.04. there are dependencies that cancel each other out and kxstudio is of no help because they are not up to 22.04. Looks like I am stuck at the moment. The RS - rs_asio - wineasio route seems to be closed at the moment for Ubuntu 22.04.

Juppstein avatar Aug 20 '22 15:08 Juppstein

That's not good. Unfortunately there's nothing I can do about this, sorry.

mdias avatar Aug 21 '22 17:08 mdias

OK, that didn't go well. It looks like right now wineasio cannot be built on 22.04. there are dependencies that cancel each other out and kxstudio is of no help because they are not up to 22.04. Looks like I am stuck at the moment. The RS - rs_asio - wineasio route seems to be closed at the moment for Ubuntu 22.04.

@Juppstein I'm in a similar situation and I've made a bit of progress so I'd figured I'd share:

  • I was able to build the latest WineASIO (no kxstudio)
    • I used PlayOnLinux to install 32bit wine prefix with about the same version of Wine / Proton that I have set up steam to use for RS (5.13). I'm not sure how necessary this was but I was trying not to use system-installed wine (like through apt)
    • I followed the instruction here more or less: https://gist.github.com/AGhost-7/1a13a4a09d83f2c50f23cfba0e362cf0
    • I had to make the following patch:
index 3351d5e..63833b6 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -14,7 +14,7 @@ endif

 wineasio_dll_MODULE   = wineasio.dll

-PREFIX                = /usr
+PREFIX                = /home/<username>/.PlayOnLinux/wine/linux-x86/5.13/
 SRCDIR                = .
 DLLS                  = $(wineasio_dll_MODULE) $(wineasio_dll_MODULE).so

@@ -34,6 +34,7 @@ RCEXTRA               =
 INCLUDE_PATH          = -I. -Irtaudio/include
 INCLUDE_PATH         += -I$(PREFIX)/include/wine
 INCLUDE_PATH         += -I$(PREFIX)/include/wine/windows
+INCLUDE_PATH         += -I$(PREFIX)/include/wine/wine/windows
 INCLUDE_PATH         += -I$(PREFIX)/include/wine-development
 INCLUDE_PATH         += -I$(PREFIX)/include/wine-development/wine/windows
 INCLUDE_PATH         += -I/opt/wine-stable/include
@@ -63,10 +64,10 @@ wineasio_dll_LDFLAGS  = -shared \
                        -m$(M) \
                        -mnocygwin \
                        $(wineasio_dll_MODULE:%=%.spec) \
-                       -L/usr/lib$(M)/wine \
-                       -L/usr/lib/wine \
-                       -L/usr/lib/$(ARCH)-linux-gnu/wine \
-                       -L/usr/lib/$(ARCH)-linux-gnu/wine-development \
+                       -L/$(PREFIX)/lib$(M)/wine \
+                       -L/$(PREFIX)/lib/wine \
+                       -L/$(PREFIX)/lib/$(ARCH)-linux-gnu/wine \
+                       -L/$(PREFIX)/lib/$(ARCH)-linux-gnu/wine-development \
                        -L/opt/wine-stable/lib \
                        -L/opt/wine-stable/lib/wine \
                        -L/opt/wine-stable/lib$(M) \
  • I followed these instructions to setup wineasio in the steam wine prefix: https://www.reddit.com/r/rocksmith/comments/jxngpx/howto_rocksmith_2014_on_linux_with_steamproton/
  • I used a variation of the regsvr32 line suggested by a commenter: WINEPREFIX=~/.steam/steam/steamapps/compatdata/221680/pfx ~/.steam/steam/steamapps/common/Proton\ 5.13/dist/bin/wine regsvr32 wineasio.dll which uses the wine binary in the prefix

Where I'm stuck now is that I have to invoke RS from the terminal like so: WINEPREFIX=~/.steam/steam/steamapps/compatdata/221680/pfx ~/.steam/steam/steamapps/common/Proton\ 5.13/dist/bin/wine /home/<username>/.steam/debian-installation/steamapps/common/Rocksmith2014/Rocksmith2014.exe

If I launch it through steam, RS-ASIO complains as you've described also with the same Jack messages. So I would try launching it that way. I haven't figured out what the difference is yet, but hopefully this helps.

CattleProdigy avatar Aug 22 '22 04:08 CattleProdigy

Those setup instructions on reddit for wineasio on wine prefix are mine from about two years ago or so :laughing:

the problem with the script is this line here: sudo apt-get install jackd1 -y

If I do that it will remove wine, pipewire, wireplumber, catia and some other stuff, basically everything related to the audio stack in Ubuntu 22.04, from my system because of linked dependencies. In 20.04 this wasn't an issue, you could have jackd1 installed and puslewire and alsa would happily continue to work.

Juppstein avatar Aug 22 '22 11:08 Juppstein

:laughing: I think i went with sudo apt install libjack-jackd2-dev:i386 instead and never installed jackd1

CattleProdigy avatar Aug 22 '22 13:08 CattleProdigy

So far it doesnt work for me. Are you on Ubuntu 22.04 as well? I have read about the trick of invoking RS via the command line for users that used Arch based systems. They were not able to start from Steam as well.

Juppstein avatar Aug 22 '22 20:08 Juppstein

Yeah I'm on Ubuntu 22.04. I don't have a fresh install though, I upgraded from 20

CattleProdigy avatar Aug 23 '22 02:08 CattleProdigy

OK, still no go for me. The problem for me seems to be that wineasio, as I have it now, does not seem to play well with the pipewire implementation of jack. When starting from command line I can see wineasio calls to jack with "not supported" or "not implemented" replies. I might get it to work again by moving everything back to old school pulse - alsa - jackd , but since pipewire is going to be the new standard in Ubuntu from the next version on I don't wanna switch back just to be stumped again with the next major release :laughing:

I'll try to find a way to compile wineasio against pipewire jack and then perhaps try again. Documentation is still a bit sparse for this aside from a thread on freedesktop, which is a bit too esoteric for my taste :smile: but we'll see

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1495

Juppstein avatar Aug 23 '22 09:08 Juppstein

Yeah I'm on Ubuntu 22.04. I don't have a fresh install though, I upgraded from 20

I trashed pipewire and went back to pulse/alsa. Either I am doing something totally wrong or the pipewire jack implementation is missing certain functionalities that rs_asio and wineasio require. It seems to be working in the same way now as for you. By the way if you didn't do this already: If you don't want to copy paste the winetricks string into terminal each time to start the game you could just create a shell script file and put the start line for RS in there. Then you can add the script to Steam as a non-steam game. Works quite nicely here.

Edit: Just have to find a way to have jack started automatically as soon as wineasio tries to make the connection.

Edit 2: Are you able to load CDLC when starting the game from shell?

Juppstein avatar Aug 29 '22 08:08 Juppstein

I also ran into this problem (same RS_ASIO.ini output text) and it made me drop Linux at my gaming machine for the time being as I really wanted to play this game. I'm a newcomer to the GNU/Linux OS, but I know the basics to interact with the terminal and edit files. I just want to give my two cents after trying several times to get the mod running.

I was under the impression that WineASIO didn't register in my proton environment when I used the regsvr32 with the correct wine prefix (I tried many guides and also the method with the explicit path: WINEPREFIX=~/.steam/steam/steamapps/compatdata/221680/pfx ~/.steam/steam/steamapps/common/Proton\ 5.13/dist/bin/wine /home//.steam/debian-installation/steamapps/common/Rocksmith2014/Rocksmith2014.exe).

When I ran winecfg to examine the Proton environment, it didn't register wineasio under the libraries tab or the regedit menu, but it did on the default Wine prefix. It made me think, as I had used only Ubuntu based distros that it had something to do with the Wine or the Winetricks (around version 5) version that I was using was not getting along with the Proton version and I tried to update Wine and Winetricks bypassing the official packages in the repositories, but I had no luck with that.

Freston1605 avatar Oct 17 '22 01:10 Freston1605

@Freston1605 you could use ProtonUp-Qt and protontricks to register the dll's in your proton prefix. I'm currently on Proton GE 8.23 and managed to install wineAsio there. The problem there is that running through steam causes it to use the steam linux runtime, which overrides the libraries and uses an older version of jack, so you get protocol mismatches there. The closest I've gotten was to downgrade jack to before the protocol update, but then I got those unknown request errors. I built wineasio with pipewire support from source, but ran into the same issues with the protocol mismatch. steam linux runtime should really just support the latest jack libraries, or there should be a way to use wineAsio with something other than jack :( I really want to be able to use my dlc.

gluckez avatar Nov 20 '23 20:11 gluckez

I am stuck with this issue with Linux Mint 21.3, and also new to Linux. From what I gather wineasio can't be built, so you have to get it from kxstudio. With it installed you can register the DLLs, although with a lot of errors for the 32-bit DLL. After that I got lost in understanding how anything sound related should work, and apparently Proton also puts a twist on it. I'd need a clear step-by-step explanation on how to troubleshoot devices/JACK/wineasio/pipewire before I flail around with anything related to RS_ASIO. For now I'll have to boot up windows every time I wanna play.

Knaifhogg avatar Jun 09 '24 19:06 Knaifhogg