Closed Siarkowy closed 1 year ago
Managed to produce some pipewire log output by providing PIPEWIRE_DEBUG=3
and redirecting to a file.
Attempting to load original DLL from: C:\windows\system32\avrt.dll
Load OK; fetching procedure addresses...
[I][23082.528824] pw.context | [ pipewire.c: 647 pw_init()] version 0.3.69
[I][23082.529125] jack | [ pipewire-jack.c: 3284 jack_client_open()] 0xf11de270: open 'Rocksmith2014' options:1
[I][23082.529237] pw.conf | [ conf.c: 403 conf_load()] 0xdece36b0: loaded config '/usr/share/pipewire/jack.conf' with 5 items
[I][23082.529257] pw.conf | [ conf.c: 950 pw_context_conf_section_for_each()] handle config '/usr/share/pipewire/jack.conf' section 'context.properties'
[I][23082.529266] pw.context | [ context.c: 241 pw_context_new()] 0xdece3370: parsed 1 context.properties items
[I][23082.529874] pw.conf | [ conf.c: 950 pw_context_conf_section_for_each()] handle config '/usr/share/pipewire/jack.conf' section 'context.spa-libs'
[I][23082.529894] pw.context | [ context.c: 342 pw_context_new()] 0xdece3370: parsed 1 context.spa-libs items
[I][23082.529903] pw.conf | [ conf.c: 950 pw_context_conf_section_for_each()] handle config '/usr/share/pipewire/jack.conf' section 'context.modules'
[I][23082.529912] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdece3370: name:libpipewire-module-rt args:{
#rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
}
[I][23082.530175] mod.rt | [ module-rt.c: 581 check_realtime_privileges()] Clamp rtprio 88 to 0
[I][23082.530187] mod.rt | [ module-rt.c: 589 check_realtime_privileges()] Priority max (0) must be at least 11
[I][23082.531657] pw.conf | [ conf.c: 582 load_module()] 0xdece3370: loaded module libpipewire-module-rt
[I][23082.531672] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdece3370: name:libpipewire-module-protocol-native args:(null)
[I][23082.532445] pw.conf | [ conf.c: 582 load_module()] 0xdece3370: loaded module libpipewire-module-protocol-native
[I][23082.532460] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdece3370: name:libpipewire-module-client-node args:(null)
[I][23082.533225] pw.conf | [ conf.c: 582 load_module()] 0xdece3370: loaded module libpipewire-module-client-node
[I][23082.533239] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdece3370: name:libpipewire-module-metadata args:(null)
[I][23082.533650] pw.conf | [ conf.c: 582 load_module()] 0xdece3370: loaded module libpipewire-module-metadata
[I][23082.533662] pw.context | [ context.c: 346 pw_context_new()] 0xdece3370: parsed 4 context.modules items
[I][23082.533669] pw.context | [ context.c: 351 pw_context_new()] 0xdece3370: parsed 0 context.objects items
[I][23082.533675] pw.context | [ context.c: 354 pw_context_new()] 0xdece3370: parsed 0 context.exec items
[E][23082.533683] pw.data-loop | [ data-loop.c: 190 pw_data_loop_start()] 0xdece54c0: can't create thread: Resource temporarily unavailable
[I][23082.533998] jack | [ pipewire-jack.c: 3562 jack_client_close()] 0xf11de270: close
[I][23082.534015] jack | [ pipewire-jack.c: 3800 jack_deactivate()] 0xf11de270: active:0
Unable to open a JACK client as: Rocksmith2014
[I][23082.534957] pw.context | [ pipewire.c: 647 pw_init()] version 0.3.69
[I][23082.535186] jack | [ pipewire-jack.c: 3284 jack_client_open()] 0xdece7e50: open 'Rocksmith2014' options:1
[I][23082.535254] pw.conf | [ conf.c: 403 conf_load()] 0xdd30f680: loaded config '/usr/share/pipewire/jack.conf' with 5 items
[I][23082.535271] pw.conf | [ conf.c: 950 pw_context_conf_section_for_each()] handle config '/usr/share/pipewire/jack.conf' section 'context.properties'
[I][23082.535279] pw.context | [ context.c: 241 pw_context_new()] 0xdd30f340: parsed 1 context.properties items
[I][23082.535621] pw.conf | [ conf.c: 950 pw_context_conf_section_for_each()] handle config '/usr/share/pipewire/jack.conf' section 'context.spa-libs'
[I][23082.535637] pw.context | [ context.c: 342 pw_context_new()] 0xdd30f340: parsed 1 context.spa-libs items
[I][23082.535645] pw.conf | [ conf.c: 950 pw_context_conf_section_for_each()] handle config '/usr/share/pipewire/jack.conf' section 'context.modules'
[I][23082.535653] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdd30f340: name:libpipewire-module-rt args:{
#rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
}
[I][23082.535789] mod.rt | [ module-rt.c: 581 check_realtime_privileges()] Clamp rtprio 88 to 0
[I][23082.535801] mod.rt | [ module-rt.c: 589 check_realtime_privileges()] Priority max (0) must be at least 11
[I][23082.536941] pw.conf | [ conf.c: 582 load_module()] 0xdd30f340: loaded module libpipewire-module-rt
[I][23082.536958] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdd30f340: name:libpipewire-module-protocol-native args:(null)
[I][23082.537115] pw.conf | [ conf.c: 582 load_module()] 0xdd30f340: loaded module libpipewire-module-protocol-native
[I][23082.537128] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdd30f340: name:libpipewire-module-client-node args:(null)
[I][23082.537280] pw.conf | [ conf.c: 582 load_module()] 0xdd30f340: loaded module libpipewire-module-client-node
[I][23082.537291] pw.module | [ impl-module.c: 162 pw_context_load_module()] 0xdd30f340: name:libpipewire-module-metadata args:(null)
[I][23082.537380] pw.conf | [ conf.c: 582 load_module()] 0xdd30f340: loaded module libpipewire-module-metadata
[I][23082.537391] pw.context | [ context.c: 346 pw_context_new()] 0xdd30f340: parsed 4 context.modules items
[I][23082.537398] pw.context | [ context.c: 351 pw_context_new()] 0xdd30f340: parsed 0 context.objects items
[I][23082.537405] pw.context | [ context.c: 354 pw_context_new()] 0xdd30f340: parsed 0 context.exec items
[E][23082.537412] pw.data-loop | [ data-loop.c: 190 pw_data_loop_start()] 0xdd3103c0: can't create thread: Resource temporarily unavailable
[I][23082.537638] jack | [ pipewire-jack.c: 3562 jack_client_close()] 0xdece7e50: close
[I][23082.537656] jack | [ pipewire-jack.c: 3800 jack_deactivate()] 0xdece7e50: active:0
Unable to open a JACK client as: Rocksmith2014
Unloading original DLL
There seems to be some threading related culprit.
[E][23082.537412] pw.data-loop | [ data-loop.c: 190 pw_data_loop_start()] 0xdd3103c0: can't create thread: Resource temporarily unavailable
Looking into several places currently, most promising leads so far:
For anyone wanting to reproduce this locally, check out my Steam WineASIO Flatpak repository below.
https://github.com/Siarkowy/com.valvesoftware.Steam.CompatibilityTool.WineASIO
Note that I have pretty limited knowledge about Flatpak, so consider this to be possible hints.
# register wineasio as available DLL in Proton (wondering, is this necessary anymore?)
Since you mentioned the file structure of the Steam Flatpak, I would be interested how that compares to other software. There's Flatpak versions of Guitarix or Ardour.
"generate proton script and run as non-steam game" workaround
This is why I mentioned the 3rd step.Cut out complexity and unnecessary issues with wineasio that appear even when knowing the whole setup process well.
I was able to solve all issues when running Rocksmith 2014 from Steam Flatpak.
The setup at https://github.com/Siarkowy/com.valvesoftware.Steam.CompatibilityTool.WineASIO already provides a stable gaming experience, as tested with both audio interface & RTC cable, with several hours of play. Please feel free to try it out!
(Opening as separate issue as it is more specific than https://github.com/theNizo/linux_rocksmith/issues/30.)
Coming from Fedora, I was trying to run Rocksmith 2014 in
com.valvesoftware.Steam
Flatpak.I managed to build
wineasio
extension, usingcom.valvesoftware.Steam
as runtime, which inherits theorg.freedesktop.Platform
runtime itself. (This essentially mimics how other Steam compatibility tools likecom.valvesoftware.Steam.CompatibilityTool.Proton
are packaged with Flatpak.)Above solves the problem of building & packaging but doesn't automatically configure any installations of Proton to actually use
wineasio.dll
. (This is because all extensions are just layers over base Steam app.)So I manually copied the files into target Proton library & prefix dirs, and registered. (I installed
GE-Proton7-55
using https://davidotek.github.io/protonup-qt/ for this specific proof of concept.)Starting the game with
PROTON_LOG=1
leads to the familiar error about missing jack socket.For Flatpak, it seems necessary to add additional permissions which Steam Flatpak misses by default. (Those can be added from Flatseal or the command line.)
This still didn't fix the jack socket error, however the
cleanup
section from the linked issue is interesting. It basically says, remove any default (non-pipewire?) jack libs fromorg.freedesktop.Platform
runtime, which Steam Flatpak doesn't do. (Cleaning this up would make sense, as we are trying to avoid the original jack library, and use pipewire-jack instead.)This got me thinking, can we
LD_PRELOAD
proper jack implementation here? I wanted to preload the correct.so
but interestingly,org.freedesktop.Platform
does not provide pipewire-jack.Also, jack (pipewire?) versions differ from host to container, and that can possibly be a problem according to https://github.com/ValveSoftware/steam-runtime/issues/307#issuecomment-743175065 and https://github.com/ValveSoftware/steam-runtime/issues/438#issuecomment-890885632. Yet, we cannot just ditch jack here and switch to pulseaudio, for obvious reasons.
This seems to be a general blocker at this point. I didn't try the "generate proton script and run as non-steam game" workaround yet, maybe that gives some more insight into what's going on here.