Closed Siarkowy closed 1 year ago
First of all, thank you very much for the work and the debug info. You'll be credited.
Now, this still doesn't resolve the issue why wineasio doesn't work when an application is launched from Steam, but this is a solution that could replace JustInCaseWeNeedIt
One note, could it be possible to generate the "correct" script by using PROTON_LOG=1 PROTON_DUMP_DEBUG_COMMANDS=1 PIPEWIRE_LATENCY="256/48000" %command%
for Steam launch options? (The difference being pipewire latency added)
There's a lot of overlapping information between the guides, which is why they are generated from building pieces that can be found in the src folder (I hope that's documented good enough). If you're quicker than me (I don't have time immediately), you can do either one the following:
Wow, thanks for such a quick response!
One note, could it be possible to generate the "correct" script by using
PROTON_LOG=1 PROTON_DUMP_DEBUG_COMMANDS=1 PIPEWIRE_LATENCY="256/48000" %command%
for Steam launch options? (The difference being pipewire latency added)
I tried this but sadly, no lunch options are propagated to the generated script. One might try running PIPEWIRE_LATENCY="256/48000" /tmp/proton_deck/run
from terminal. However my gut feeling is, the env variable will not be propagated to Steam properly.
Best to move the original Proton script somewhere else and amend it with PIPEWIRE_LATENCY
so everything is contained in one place, in my opinion.
There's a lot of overlapping information between the guides, which is why they are generated from building pieces that can be found in the src folder (I hope that's documented good enough). If you're quicker than me (I don't have time immediately), you can do either one the following:
Let me try looking into this the following days.
I tried this but sadly, no lunch options are propagated to the generated script. One might try running
PIPEWIRE_LATENCY="256/48000" /tmp/proton_deck/run
from terminal. However my gut feeling is, the env variable will not be propagated to Steam properly.
Quick update, my gut feeling was wrong! It is enough to regenerate the script from Steam and run from terminal:
PIPEWIRE_LATENCY="256/48000" /tmp/proton_deck/run
This might be the most reproducible way to run things with minimal changes needed.
(Also, tried hacking this up to run in Lutris but since it's in its own flatpak on Steam Deck, it makes no sense. I would ditch the mention of Lutris in Steam Deck guide altogether to be fair, aside from how useful of a tool it is.)
since it's in its own flatpak on Steam Deck, it makes no sense.
Didn't think of this since I don't own a Steam Deck, but I see your point.
Also added /tmp/proton_deck/run
as a non Steam game, with following launch options:
PIPEWIRE_LATENCY="256/48000" %command%
No need for terminal anymore! This makes it at most a two click process:
/tmp/proton_deck/run
Not sure if Steam counts playtime correctly but this is peak UX now.
I just noticed a few things about the path /tmp/proton_deck/run
.
/tmp
ist obviously temporary. AFAIK, this is actually stored in your RAM.
The second part is proton_$USER
The file name run
sounds really generic
so I would recommend to copy it to steamapps/common
and calling it something like "rocksmith-launcher":
cp /tmp/proton_$USER/run $STEAMLIBRARY/steamapps/common/rocksmith-launcher.sh
Also added
/tmp/proton_deck/run
as a non Steam game
I also thought about trying this as well when I first saw this issue and it's kind of ridiculus (launch it from Steam? Well yes, but actually no). But if it works, I'll take it ^^
You might even make the entry pretty with something from SteamGridDB
The non-important stuff first ^^ (so that I don't forget)
make the entry on steam pretty
hero - the art you see above the "play" button logo - usually text that you see at the same place icon - shown in desktop mode in steam to the left of the name grid - cover art, seen in big picture mode
game properties -> select an icon right below the text "shortcut" - rename the game to something pretty too, eg. "Rocksmith 2014 - Launcher"
right click where the hero would be -> set custom background
navigate to $HOME/.steam/steam/userdata/<number>/config/grid/
there's a file that represents the hero. you need the number of that (it represents the game's ID).
copy the grid in this folder and name it
I would recommend making the shortcut look different than the game so you can see which is which.
Seems like I was quicker, now I just need to fix everything I broke.
Btw we can output the Proton script outside of /tmp
using another variable.
PROTON_DEBUG_DIR | Root directory for the Proton debug scripts, /tmp by default. |
---|
Maybe something like the following works (didn't test yet)?
PROTON_DUMP_DEBUG_COMMANDS=1 PROTON_DEBUG_DIR=~/.rocksmith-launcher %command%
This would create the proton_$USER
folder in the given directory, along with the other files in it.
We could either do that and specify another folder, or copy it like it is now.
Since we only need one file from the debug info to start the game, I would opt for copying from /tmp, but I'm open to other opinions too.
I'll close the issue now, since the main thing is resolved. Thank you for all the information.
but I'm open to other opinions too.
You can still do that of course
Sure thing; in the end I opted for the following launch options in my Steam Deck setup.
Launch Options
PROTON_LOG=1 PROTON_DUMP_DEBUG_COMMANDS=1 PROTON_DEBUG_DIR=~/.rocksmith2014 %command%
Launch Options
PIPEWIRE_LATENCY="256/48000" %command%
Target Path
/home/deck/.rocksmith2014/proton_deck/run
Adjust to taste. Cheers!
After switching to onboard audio instead of the random sound card I use, as well as opening pavucontrol and keeping it open, I can finally start the game reliably.
I should really write a troubleshooting page at this point.
Just a heads up; after any SteamOS update (which most recently shipped like 3 days ago), it is necessary to reinstall wine-staging & copy DLLs/SOs over again, since all OS customizations are wiped clean.
I spent far too much time the other day debugging the changed setup - instead of just redoing it from scratch. Posting my Rocksmith install script - https://gist.github.com/Siarkowy/f834658f4903058992f4a1247ec0a6d6
Sounds great. Shoud I copy that, or link to your gist?
One question, do you have to disable readonly mode again after the update? Because I didn't see it in this script.
Hi, thanks for a great guide & kudos to all contributors too!
I've been trying to run a low latency Rocksmith setup on Steam Deck using my audio interface. However, I run into problems when running the game. Basically, it was only possible to run one of the following scenarios exclusively:
(Feel free to skip to the summary at the bottom for a solution if you are not interested in debugging.)
Setup
lsusb
:ID 1235:8210 Focusrite-Novation Scarlett 2i2 Camera
Relevant bits from
RS_ASIO.ini
Relevant bits from
Rocksmith.ini
Debugging wineasio errors
Running Rocksmith from Steam, the following error was produced in
RS_ASIO-log.txt
.Having no more debugging info, I tried running Rocksmith again with more verbose launch options.
Then, when inspecting Proton log file at
~/steam-221680.log
, an interesting bit showed up.This log file confirmed that both wineasio & rs_asio DLLs loaded successfully.
Additionally, it seems like running Rocksmith directly from Steam results in some missing audio related socket file. This explains why wineasio complains about no devices available - since it is not able to connect to pipewire.
However, there is an interesting solution available which I found by complete coincidence.
Running the Game
After some tinkering, I found a way to make both audio & Steam auth work (without cracking anything).
First, start Rocksmith from Steam with the following launch options.
This instructs Proton to dump a game launch script at
/tmp/proton_deck/run
.Running
/tmp/proton_deck/run
script from terminal makes both audio & Steam activation work reliably!At this point, I had crackling sound from my Scarlett Focusrite 2i2 audio interface which was fixed by amending the script to include
PIPEWIRE_LATENCY
env variable.I think I found the proper buffer size of 256 by inspecting
pw-top
entries when the game was running. The standard recommendation to try 48/96/192 as buffer size for Focusrite 2i2 didn't work correctly.As a side note, it might be a good idea to save
/tmp/proton_deck/run
under a different path. Otherwise it will be overwritten the next time Rocksmith is run from Steam. Also, the generated script doesn't contain any env vars defined in game launch options by default.Summary
The way of launching Rocksmith on Steam Deck as described in the guide, when using Steam installation defaults and custom terminal script, results for me in either Steam auth/profile/(C)DLC working or wineasio working with the audio interface at all.
By running Rocksmith from Steam with
PROTON_DUMP_DEBUG_COMMANDS=1 %command%
launch option, it is possible to generate a Proton script that works flawlessly. It is unknown, why the very same Proton works from terminal script, and doesn't work from Steam directly. (pipewire/jack socket connection problem might be a good lead.)Debug output can be produced with
PROTON_LOG=1 %command%
launch option, to verify wineasio & rs_asio are registered and running. Solving the pipewire/jack socket issue would allow it to run without resorting to customized Proton scripts. (Maybe Steam runtime misses/doesn't see pipewire-jack client libs? or it is some container isolation problem?)Gaming mode might be a bit more tricky to figure out, as the default Deck audio devices need to be disabled from Desktop mode anyway. But solving the socket issue would also possibly enable Gaming mode setup. (I can smell HDMI related issues already.)
What Next
@theNizo Should we extend the Steam Deck guide? I could try integrating relevant info as a PR.
Someone more knowledgeable might be able to tinker with custom Proton version and patch audio socket issue.
Anyway, back to my bass. Thanks! ❤️