Skip to content

Latest commit

 

History

History
282 lines (184 loc) · 12.5 KB

arch-pipewire.md

File metadata and controls

282 lines (184 loc) · 12.5 KB

pipewire-jack on Arch-based distros

Tested on Arch Linux

Table of contents

  1. Install necessary stuff
  2. Create a clean prefix
  3. wineasio
  4. Installing RS_ASIO
  5. Set up JACK
  6. Starting the game
  7. Troubleshooting

Install necessary stuff

(I recommend wine-staging if your distro has it, but usual wine works as well.)

I assume that pipewire and a session manager (eg. wireplumber, or pipewire-media-session) is already installed.

sudo pacman -S wine-staging pipewire-alsa pipewire-pulse pipewire-jack lib32-pipewire-jack qpwgraph realtime-privileges pavucontrol
# the groups should already exist, but just in case
sudo groupadd audio
sudo groupadd realtime
sudo usermod -aG audio $USER
sudo usermod -aG realtime $USER

Log out and back in. Or reboot, if that doesn't work.

How to check if this worked correctly

For the packages, do pacman -Q <package-name> (You can do multiple packages at once). Should output the names and versions without errors.

For the groups, run groups. This will give you a list, which should contain "audio" and "realtime".

Create a clean prefix

Set the Proton version you want to use. There's two ways to do this. In Steam

  • go to SettingsCompatibilityEnable Steam play for all other titles, then restart Steam.
  • open your library, right click Rocksmith and go toPropertiesCompatibility and force one.

Delete or rename $STEAMLIBRARY/steamapps/compatdata/221680, then start Rocksmith and stop the game once it's running.

The rest will be set up later.

wineasio

Install

Installing base-devel is very useful for using the AUR and compiling in general.

Know already what's going on? Here are all commands in one piece without an explanation

If the commands in this collapsible section don't work for you, try the "longer" variant first before asking for help.

YOU NEED TO HAVE THE $PROTON AND $STEAMLIBRARY VARIABLE SET!! (or replaced with the correct path first)

cd into the unpacked directory, then run this.

rm -rf build32
rm -rf build64
make 32
make 64
sudo cp build32/wineasio32.dll /usr/lib32/wine/i386-windows/wineasio32.dll
sudo cp build32/wineasio32.dll.so /usr/lib32/wine/i386-unix/wineasio32.dll.so
sudo cp build64/wineasio64.dll /usr/lib/wine/x86_64-windows/wineasio64.dll
sudo cp build64/wineasio64.dll.so /usr/lib/wine/x86_64-unix/wineasio64.dll.so
cp build32/wineasio32.dll.so "$PROTON/lib/wine/i386-unix/wineasio.dll.so"
cp build32/wineasio32.dll "$PROTON/lib/wine/i386-windows/wineasio.dll"
cp build64/wineasio64.dll.so "$PROTON/lib64/wine/x86_64-unix/wineasio.dll.so"
cp build64/wineasio64.dll "$PROTON/lib64/wine/x86_64-windows/wineasio.dll"
env WINEPREFIX=$STEAMLIBRARY/steamapps/compatdata/221680/pfx ./wineasio-register

And you're done, continue with Installing RS_ASIO.

Download the newest .tar.gz and unpack it. Open a terminal inside the newly created folder.

# build
rm -rf build32
rm -rf build64
make 32
make 64

# Install on normal wine
sudo cp build32/wineasio32.dll /usr/lib32/wine/i386-windows/wineasio32.dll
sudo cp build32/wineasio32.dll.so /usr/lib32/wine/i386-unix/wineasio32.dll.so
sudo cp build64/wineasio64.dll /usr/lib/wine/x86_64-windows/wineasio64.dll
sudo cp build64/wineasio64.dll.so /usr/lib/wine/x86_64-unix/wineasio64.dll.so

wineasio is now installed on your system.

How to check if it's installed correctly
find /usr/lib32/ -name "wineasio*"
find /usr/lib/ -name "wineasio*"

This should output 4 paths (ignore the errors).

Make use of

To make Proton use wineasio, we need to copy these files into the appropriate locations.

STOP! If you haven't set the environment variables yet, please follow this part of the prerequisites, then continue.

cp /usr/lib32/wine/i386-unix/wineasio32.dll.so "$PROTON/lib/wine/i386-unix/wineasio32.dll.so"
cp /usr/lib32/wine/i386-windows/wineasio32.dll "$PROTON/lib/wine/i386-windows/wineasio32.dll"
cp /usr/lib/wine/x86_64-unix/wineasio64.dll.so "$PROTON/lib64/wine/x86_64-unix/wineasio64.dll.so"
cp /usr/lib/wine/x86_64-windows/wineasio64.dll "$PROTON/lib64/wine/x86_64-windows/wineasio64.dll"

In theory, this should also work with Lutris runners (located in $HOME/.local/share/lutris/runners/wine/)

To register wineasio (so that it can be used in the prefix), run the wineasio-register script that comes in the wineasio zip and set the WINEPREFIX to Rocksmiths.

env WINEPREFIX=$STEAMLIBRARY/steamapps/compatdata/221680/pfx ./wineasio-register
How to check if this worked correctly

Download this: VBAsioTest_1013.zip

Extract it somewhere and run a command like this (replace the last path with the correct path that you chose):

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

!! The command above currently might not work. You can try instead: LD_PRELOAD=/usr/lib32/libjack.so wine /path/to/VBASIOTest32.exe !!

Installing RS_ASIO

  1. Download the newest release, unpack everything to the root of your Rocksmith installation ($STEAMLIBRARY/steamapps/common/Rocksmith2014/)
  2. Edit RS_ASIO.ini: fill in wineasio-rsasio where it says Driver=. Do this for every Output and Input section.

And you're done with RS_ASIO. But in case you want to configure the inputs further (relevant for multiplayer), see this.

Set up JACK

I prefer to set up my audio devices with pavucontrol ("PulseAudio Volume Control"), which works if pipewire-pulse is installed.

It's most reliable to NOT set your devices to Pro-Audio (under "Configuration") and leave pavucontrol open when starting the game.

All available devices will automatically be tied to Rocksmith, and the game doesn't like you messing around in the patchbay (= it's possible, but would crash often). You default audio device will be taken first, then the others will be assigned. The order can most likely not be predicted.

If you want to make sure it does what you want, select only one output and just as much inputs as you need (1 input (eg. singleplayer) = 1 device; 2 inputs (eg. 2 Players) = 2 devices, etc.). I like to do this via pavucontrol, which works if pipewire-pulse is installed.

Starting the game

Delete the Rocksmith.ini inside your Rocksmith installation. It will auto-generate with the correct values. The only important part is the LatencyBuffer=, which has to match the Buffer Periods.

Steam needs to be running.

If we start the game from the button that says "Play" in Steam, the game can't connect to wineasio (you won't have sound and will get an error message). This is an issue with Steam and pipewire-jack. There are two ways to go about this. You can apply both at the same time, they don't break each other.

1. LD_PRELOAD
  • Advantages: Run from Steam directly
  • Disadvantages: higher possibility of crashes, steps you might need to do every game-boot.

Add these launch options to Rocksmith:

LD_PRELOAD=/usr/lib32/libjack.so PIPEWIRE_LATENCY=256/48000 %command%

You can launch the game from Steam now. For the first few boot-ups, you have to remove window focus from Rocksmith (typically done with Alt+Tab) as soon as the window shows up. If it doesn't crash, continue with instructions.

If there is NO message saying "No output device found, RS_ASIO is working fine. If you can hear sound, everything works fine.

If you cannot hear sound, open qpwgraph or a different JACK patchbay software of your choice. We want to connect microphones to the inputs of Rocksmith and two outputs to our actual output device. Rocksmith will sometimes crash when messing with the patchbay, so this is how you want to go about it:

  1. Ideally do it while the game starts up (logo screens appear). The Rocksmit logo is still safe, anything after that is not recommended.
  2. Connect one device to Rocksmith
  3. Window focus to Rocksmith
  4. Go to step one, until you have connected everything

2. Start script, shortcut in Steam
  • Advantage: Reliable one time setup
  • Disadvantages: Another Steam game entry, or having to launch from terminal entirely

Get the start script

Please select the Proton Version you use (Rocksmith has been working fine since at least Proton 4 btw):

We can start the game via this script now: PIPEWIRE_LATENCY="256/48000" path/to/rocksmith-launcher.sh

If you want to do a little more automation, read this

If you want the Steam overlay to work, you need to launch the script via Steam, see the next step.

Making it nice via Steam entry (optional, but recommended)

With Proton's runtime, we can't start Rocksmith directly from the Steam Library just like that (excluding LD_PRELOAD). But we can use the Steam Library to start the script that starts the game in a way that Steam recognizes.

Fitting meme format

Go into your Steam Library and select "Add a game" ➞ "Add a Non-Steam Game" on the bottom left.

Make sure you can see all files. Select the script we generated just now and add it. This will create a shortcut to the script, which I will refer to as "shortcut" from here on. For Proton versions 8 or lower, right click on the shortcut and select "Properties". Add these launch Options: PIPEWIRE_LATENCY="256/48000" %command%

You can now start the game from Steam. Use the shortcut, it will launch the actual game.

If launching the script from Steam doesn't work

You can try and add it to Lutris, then add a Lutris shortcut by right-clicking and selecting "Create Steam shortcut".

This works because of how Lutris behaves when games are launched from Steam. All the Steam shortcut does is to notify Lutris to start a game. This is finished when Lutris received the message (= Steam sees it as "stopped"). Lutris then launches the game.

Important Settings:

  • Runner: Linux
  • Working Directory: The folder where your script is.
  • Disable Lutris Runtime: true
  • Environment Variables:
    • Name: PIPEWIRE_LATENCY
    • Value: 256/48000

Beautification (even more optional, but recommended)

Leaving the shortcut just like that is not pretty, so we're going to change that.

You can give the games in your Steam Library a custom look. A good Website for resources is the SteamGridDB.

You can take artwork from Rocksmith, Rocksmith 2014, Rocksmith+ or anything else you want. I would recommend something that makes the shortcut look different than the game.

Name and icon: Go into the shortcut's Properties. Right under the text "Shortcut" you can change the game's icon and name (both show up in the list on the left in desktop mode). I recommend something like "Rocksmith 2014 - Launcher".

"Hero (banner/background)": Located above the "Play" button in Steam. Right-click on it and choose "set custom background". You can theoretically set a logo too by right-clicking on the text, but I personally chose not to do that to clearly see which item is which.

Grid (cover art): For this it gets a bit harder. Go to $HOME/.steam/steam/userdata/<number>/config/grid. Since we added a hero, there should be a file that resembles it, so find it with an image viewer. It's called <id>_hero.<file-ending> we need the ID. copy the cover art into this folder and name it <id>p.<file-ending>.

This is how the files look on my system:

Launch Big Picture Mode now and find the entry in your Library. It should now have artwork.


Troubleshooting

Go to Troubleshooting