theNizo/linux_rocksmith

easier way to launch through steam

Closed this issue · 12 comments

In your guides you say the way to launch "without lutris" is:

# cd is necessary for the Rocksmith.ini and the DLC folder cd $STEAMLIBRARY/steamapps/common/Rocksmith2014 PIPEWIRE_LATENCY=256/48000 WINEPREFIX=$STEAMLIBRARY/steamapps/compatdata/221680/pfx $PROTON/bin/wine $STEAMLIBRARY/steamapps/common/Rocksmith2014/Rocksmith2014.exe

However an easier way is to open the Rocksmith 2014 game properties in steam, and under launch options, add the following:
PIPEWIRE_LATENCY=256/48000 %command%

Please list the following first, so this issue can be of use to me:

  • Which distro du you use
  • Which Proton version do you use
  • Did you do any other steps not listed in the guide? Did you do certain steps different? Did you leave anything out?

Now it gets interesting, because everytime i tried this setup, starting the game from Steam would make wineasio not work - the game told me that there are no audio devices. I tried using the command to get console output and it suddenly worked.

The big question here is what you did different.

So, in case my explanation wasn't good: I added the tool recommended here as a non Steam game (the 32 bit exe). I then set the prefix up as you should. Starting it from Steam, the program gives me this error:

#0001 ------------------------------------------------------
#0002 (32Bits) TEST ASIO DEVICE: WineASIO
#0003 OPEN ASIO DEVICE Error: WineASIO does not return error messages
 Failed to init ASIO Driver...

But if I start it with the command PIPEWIRE_LATENCY=256/48000 WINEPREFIX=/home/<user>/.steam/steam/steamapps/compatdata/3186972007/pfx $PROTON/bin/wine /path/to/VBASIOTest32.exe it works perfectly fine.

And that's the problem. I have to correct myself: If I start it via Steam, it does find WineASIO. However, it doesn't work for some reason that I don't understand.

comparison output when starting from the command line
#0001 ------------------------------------------------------
#0002 (32Bits) TEST ASIO DEVICE: WineASIO
#0003 PREPARE DEVICE: sr:48000 Hz / buffer: 256 smp / in: 16 / out: 16
#0004 Latency: in:384 smp / buffer: 256 smp / out: 384 smp / total: 21.33 ms
#0005 Must Call ASIOOutputReady(): NO
#0006 -----------------------------------------------------------
#0007  ASIO Buffer 0 / Input / type:19 / ASIOSTFloat32LSB (in_1)
#0008  ASIO Buffer 1 / Input / type:19 / ASIOSTFloat32LSB (in_2)
#0009  ASIO Buffer 2 / Input / type:19 / ASIOSTFloat32LSB (in_3)
#0010  ASIO Buffer 3 / Input / type:19 / ASIOSTFloat32LSB (in_4)
#0011  ASIO Buffer 4 / Input / type:19 / ASIOSTFloat32LSB (in_5)
#0012  ASIO Buffer 5 / Input / type:19 / ASIOSTFloat32LSB (in_6)
#0013  ASIO Buffer 6 / Input / type:19 / ASIOSTFloat32LSB (in_7)
#0014  ASIO Buffer 7 / Input / type:19 / ASIOSTFloat32LSB (in_8)
#0015  ASIO Buffer 8 / Input / type:19 / ASIOSTFloat32LSB (in_9)
#0016  ASIO Buffer 9 / Input / type:19 / ASIOSTFloat32LSB (in_10)
#0017  ASIO Buffer 10 / Input / type:19 / ASIOSTFloat32LSB (in_11)
#0018  ASIO Buffer 11 / Input / type:19 / ASIOSTFloat32LSB (in_12)
#0019  ASIO Buffer 12 / Input / type:19 / ASIOSTFloat32LSB (in_13)
#0020  ASIO Buffer 13 / Input / type:19 / ASIOSTFloat32LSB (in_14)
#0021  ASIO Buffer 14 / Input / type:19 / ASIOSTFloat32LSB (in_15)
#0022  ASIO Buffer 15 / Input / type:19 / ASIOSTFloat32LSB (in_16)
#0023  ASIO Buffer 16 / Output / type:19 / ASIOSTFloat32LSB (out_1)
#0024  ASIO Buffer 17 / Output / type:19 / ASIOSTFloat32LSB (out_2)
#0025  ASIO Buffer 18 / Output / type:19 / ASIOSTFloat32LSB (out_3)
#0026  ASIO Buffer 19 / Output / type:19 / ASIOSTFloat32LSB (out_4)
#0027  ASIO Buffer 20 / Output / type:19 / ASIOSTFloat32LSB (out_5)
#0028  ASIO Buffer 21 / Output / type:19 / ASIOSTFloat32LSB (out_6)
#0029  ASIO Buffer 22 / Output / type:19 / ASIOSTFloat32LSB (out_7)
#0030  ASIO Buffer 23 / Output / type:19 / ASIOSTFloat32LSB (out_8)
#0031  ASIO Buffer 24 / Output / type:19 / ASIOSTFloat32LSB (out_9)
#0032  ASIO Buffer 25 / Output / type:19 / ASIOSTFloat32LSB (out_10)
#0033  ASIO Buffer 26 / Output / type:19 / ASIOSTFloat32LSB (out_11)
#0034  ASIO Buffer 27 / Output / type:19 / ASIOSTFloat32LSB (out_12)
#0035  ASIO Buffer 28 / Output / type:19 / ASIOSTFloat32LSB (out_13)
#0036  ASIO Buffer 29 / Output / type:19 / ASIOSTFloat32LSB (out_14)
#0037  ASIO Buffer 30 / Output / type:19 / ASIOSTFloat32LSB (out_15)
#0038  ASIO Buffer 31 / Output / type:19 / ASIOSTFloat32LSB (out_16)
#0039 -----------------------------------------------------------
#0040           Performance Counter Frequency: +10.000.000
#0041      Performance Counter for one buffer: +53.333 (5.3 ms)
#0042             Performance Counter for 10%: +5.333
#0043 -----------------------------------------------------------
#0044 GENERATE SINUS: 440 Hz -10 dBfs
#0045 DSP LOAD: nothing
#0046    INFO: callback thread priority: 0
#0047 START ASIO DEVICE: Running

And terminal output:

wineserver: using server-side synchronization.
wine: Using setpriority to control niceness in the [-11,11] range
0024:fixme:heap:RtlSetHeapInformation unimplemented HeapEnableTerminationOnCorruption
0118:fixme:imm:ImeSetActiveContext (0x4803d0, 0): stub
0118:fixme:imm:ImmReleaseContext (0000000000020030, 00000000004803D0): stub
0024:fixme:imm:ImeSetActiveContext (0x710030, 1): stub
0024:fixme:imm:ImmReleaseContext (0002004A, 00710030): stub
0130:fixme:oleacc:find_class_data unhandled window class: L"#32768"
0130:fixme:oleacc:find_class_data unhandled window class: L"#32769"

I'm using arch linux, 2:GE.Proton7.37-1 from chaotic-aur, and wineasio 1.1.0-3 also from chaotic-aur.

I copied wineasio into my proton directories:

sudo cp lib32/wine/i386-unix/wineasio.dll.so share/steam/compatibilitytools.d/proton-ge-custom/files/lib/wine/i386-unix
sudo cp lib32/wine/i386-windows/wineasio.dll share/steam/compatibilitytools.d/proton-ge-custom/files/lib/wine/i386-windows
sudo cp lib/wine/x86_64-unix/wineasio.dll.so share/steam/compatibilitytools.d/proton-ge-custom/files/lib64/wine/x86_64-unix
sudo cp lib/wine/x86_64-windows/wineasio.dll share/steam/compatibilitytools.d/proton-ge-custom/files/lib64/wine/x86_64-windows
sudo cp lib32/wine/i386-windows/wineasio.dll share/steam/compatibilitytools.d/proton-ge-custom/files/share/default_pfx/drive_c/windows/system32
sudo cp lib/wine/x86_64-windows/wineasio.dll share/steam/compatibilitytools.d/proton-ge-custom/files/share/default_pfx/drive_c/windows/syswow64

and ran this to register the wineasio dll

WINEPREFIX=/home/michael/.steam/steam/steamapps/compatdata/221680/pfx regsvr32 /usr/lib32/wine/i386-windows/wineasio.dll

Everything else was the same as your guide, except the final step of how to launch rocksmith2014.exe

Steam has proton-ge-custom selected as the runtime.

Also, when I tried launching from the command line as you described, Rocksmith wanted me to login to my Ubisoft account and wouldn't let me use my DLC. That doesn't happen when launching via Steam.

I'm using arch linux, 2:GE.Proton7.37-1 from chaotic-aur, and wineasio 1.1.0-3 also from chaotic-aur.

(Chaotic AUR: Proton version and wineasio version)

Okay, after testing a bit, I've come to this conclusion:

  • copying to default_prefix not necessary.
  • wineasio version doesn't matter. Compiling myself works just as well as the chaotic AUR one.
  • Proton version does matter. Official (from Steam/Valve) didn't work, GE-7-37 from GEs repo didn't work, but GE-7-37 from chaotic AUR did.

So there's a difference between those versions. I don't know what it is yet, but my first guess would be that it was built on an arch machine instead of a [insert distro here]?

Chaotic AUR is known as unsafe, but if you believe the description (and it's literally a URL with the correct domain), this GE-Proton is by Garuda, so I think it's alright.

Also, when I tried launching from the command line as you described, Rocksmith wanted me to login to my Ubisoft account and wouldn't let me use my DLC. That doesn't happen when launching via Steam.

That's because of the game's update, see the info about previous_version on the main README.md - EDIT: If you launch the game from the terminal, you need to go back in order for it to work properly. You don't need that step, if you can launch the game from Steam.

So, my theory about which system it's built on is probably wrong. I compiled this (ver. 7.0) and it didn't work.

(Keep in mind that I don't know much about debugging wine. All I'm doing is guesswork.)

So there's a difference between those versions. I don't know what it is yet, but my first guess would be that it was built on an arch machine instead of a [insert distro here]?

I am not sure, but my guess is that the difference with proton GE from AUR (and therefore Chaotic AUR) is that it uses system library instead of Steam runtime ones (the PKGBUILD has a dependency to steam-native-runtime and the configure.sh uses a flag --steam-runtime=native).

I was able to run the game from Steam with Proton Experimental with working wineasio using the following command to use system libjack :
LD_PRELOAD=/usr/lib32/libjack.so PIPEWIRE_LATENCY=256/48000 %command%

On my system (Arch Linux), with pipewire 0.3.67, the game crashed systematically at startup, but using the alt-tab trick I have managed to (randomly) run it.

With pipewire 0.3.68, the game starts without crashing, BUT nothing is wired to Rocksmith in the patchbay, so there is no sound in/output. I have to manually wire things after the game has started (I use Helvum). I have tried to automate the wiring with scripting, but it works only if there is another window in front of the game, otherwise the game crashes when the script is run.

I was able to run the game from Steam with Proton Experimental with working wineasio using the following command to use system libjack :

Worked on my machine.
Wanted to make sure and test further.
Redid my setup.
Nothing works now.
(Not the method's fault)
Will report back.

Alright, so prefixes generated by Steam (when starting a game) all come broken on my machine at the moment (#28). I can't test this currently.

(#28)

Okay, that's done.


LD_PRELOAD technically works. You have to do the Alt-Tab trick only the first few times you boot the game up.
The disadvantage that I see to the current method is that you have to connect input and output by hand in the JACK patchbay, instead of having it work out of the box. Saves you from setting up the audio devices a certain way though...

Don't wire all connections in the patchbay at once. Do one, window focus on Rocksmith, do the second one, window focus on Rocksmith, and so on.

I would opt to list both options (LD_PRELOAD and the one that's currently in the guide) and let the reader choose. They don't seem to break each other.

The disadvantage that I see to the current method is that you have to connect input and output by hand in the JACK patchbay

I use a workaround to do this automatically, I use the following launch command, it is ugly, but it works :
LD_PRELOAD="/usr/lib32/libjack.so" PIPEWIRE_LATENCY="256/48000" %command% & sleep 5; zenity --progress --title="PipeWire" --text="Configuring..." --percentage=100 & pid=$!; sleep 0.5; pw-link "alsa_input.usb-Hercules_Rocksmith_USB_Guitar_Adapter-00.mono-fallback:capture_MONO" "Rocksmith2014:in_1"; pw-link "Rocksmith2014:out_1" "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo:playback_FL"; pw-link "Rocksmith2014:out_2" "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo:playback_FR"; kill $pid

The device names in the pw-link command must be adapted, they can be listed with
pw-link -io
Maybe the sleep timer must be adapted too.
The zenity window does nothing, but being here prevent the game from crashing.

I use a workaround to do this automatically

Line breaks make it quite easy to see what's going on here. Actually quite alright.

I was about to add this to the guide, but this is pipewire-specific. That will probably have to wait until I figure out the equivalent commands.

I think jack_connect should work (it requires jack-example-tools to be installed on Arch).
See https://github.com/tilk/run_rocksmith_linux/blob/master/run_rocksmith.sh to have an example of use.