Forums

Linux NXT client and pipewire

Quick find code: 409-410-514-66216866

DanRuckz

DanRuckz

Posts: 10 Bronze Posts by user Forum Profile RuneMetrics Profile
Did anyone try using pipewire-pulse and pipewire-jack replacing pulseaudio?

I tried and I have crackling sounds but have no idea how to fix this, looks like the fix that was done by the devs is actually a package specific and works only on pulseaudio.

I am running it from the flatpak it works wonders on pulseaudio, without the need to add any other launch options. the biggest problem that I currently have is that I can't move to pipewire-pulse due to the crackling sounds.

Can anyone try this? I am on arch if anyone wants to reproduce.

26-May-2021 22:15:21

Hmm
Jan Member 2016

Hmm

Posts: 13,000 Opal Posts by user Forum Profile RuneMetrics Profile
I've seen a single other bug report about it on Fedora 34 (Fwiw, one single bug report is concerning because the majority of people don't give feedback to begin with, so it doesn't take much to flag up patterns).

In theory, the AUR/deb version works best because it makes use of realtime audio threads. The Flatpak and Snap package can't do this. But the realtime threads were never the perfect fix from what I see anyway.

The other fix you'll see around is the PULSEAUDIO_LATENCY_MSEC variable, Pipewire/Pulse actually does still respect this variable, so it's unfortunate that it doesn't necessarily work in the same way. All the client packages set this value by default, but they all pick different values, and personally I don't see any trend that identifies what works best for who.

For curiosity sake, I'd personally appreciate if you could try out the Snap package, once it's installed, try running it with
runescape.rs3 -a
, which will make it use Pulse with the ALSA backend (and then pulse on your system would pass onto Pipewire). You'd think the indirection would be more problematic, but for Pulseaudio as the system server alone, this allegedly fixed a lot of the problems with audio for people. Maybe Pipewire has the same result.

Specifically, the old behaviour was that it'd usually fail to produce nice sound on the first boot, but EVERY (99.9%) boot afterwards on the same desktop session had perfect sound. I ended up having to revert it because of some complaints that might not exist now, so it'd be nice if you had any feedback on whether it helped for Arch/Pipe.

(And as a shortcut, you can mess with the Pulseaudio variable with
runescape.rs3 -p <int>
- just don't use -p and -a at the same time ;)

26-May-2021 23:50:13 - Last edited on 27-May-2021 12:07:51 by Hmm

DanRuckz

DanRuckz

Posts: 10 Bronze Posts by user Forum Profile RuneMetrics Profile
Hey thanks for the quick reply. I will try to install the snap daemon and snapd and all that on arch and try that approach, honestly, it that will work it will be great.

I did try all the other solutions they did not work.

Also, using this opportunity, there is another thing I'd like to report:

Using the client from the AUR, I was facing loading issues, I would start lagging HORRIBLY after using one of the lodestones teleports, it happened (as far as i noticed) due to one of the dependencies being updated. I tried many ways to solve it and it was just lagging too much (seems to me like it was trying to load the map).

So for that reason I moved to the flatpak, and to me it seemed that my suspicion was right, and those were some dependency issues.

I will try the snap package solution this evening.

27-May-2021 09:33:17

Hmm
Jan Member 2016

Hmm

Posts: 13,000 Opal Posts by user Forum Profile RuneMetrics Profile
The laggyness is caused by a regression with Mesa, there's some discussion on Reddit but I'd keep an eye out here

https://gitlab.freedesktop.org/mesa/mesa/-/issues/4840

The Flatpak and Snap both override the Mesa version, I'm not sure the exact version Flatpak uses because it's part of their own custom runtime, but the Snap will use the same Mesa as bundled with Ubuntu 20.04, and whatever Mesa versions are bundled with Ubuntu are likely the only ones Jagex will pay any real attention to unfortunately.

27-May-2021 12:01:53

DanRuckz

DanRuckz

Posts: 10 Bronze Posts by user Forum Profile RuneMetrics Profile
So I downloaded snap from the AUR and downloaded RS3 using the snap package.

So... apparently that works out of the box, didn't even need to do anything at all, just ran it and it works.

Of course I created a shortcut on my Desktop and ran it with gamemoderun :D

but looks like it fixed the sound problem and and also there is no other issue whatsoever. What is the difference between that and the flatpak? could it be that the latest development of the client was implemented in the snap and not in flatpak? (it would make sense).

Anyways I will update if there is anything else going on.

And one last thing, THANK YOU SUPER MUCH! Now I am able to use a workaround and stream desktop sound on Discord and other applications with pipewire and play RS3 without sound bugs, YAY!

27-May-2021 20:12:13

Hmm
Jan Member 2016

Hmm

Posts: 13,000 Opal Posts by user Forum Profile RuneMetrics Profile
Thanks for the feedback, it's really appreciated.

As far as I'm aware gamemoderun doesn't work in Flatpaks and Snaps due to their implicit sandboxing. (Particularly the process namespace, they'd broadcast the wrong pid to gamemoded).

All the packages will be using the same client, its the job of the launcher to actually grab that, and all the packages are using the latest launcher too. The only real answer I'd have is that possibly completely by chance, the Pulseaudio libraries in the snap just happen to work better than either the Flatpak or Arch. Whether this is luck or the Ubuntu libs actually have something special about them I couldn't say, but I'll pass this onto the Flatpak maintainers just incase there's anything they could do about it.

28-May-2021 01:36:28 - Last edited on 28-May-2021 01:37:10 by Hmm

DanRuckz

DanRuckz

Posts: 10 Bronze Posts by user Forum Profile RuneMetrics Profile
I'm happy to help. Also another thing that I'd like to report, although it's probably already known, is that this behavior with the sound happens rarely when you launch it, then you have to close the launcher and then relaunch and it will work normally.

Also I did experience it after a sometime I'd play, I would play for an hour or 2 and it would repeat. I have to restart every time that happens and it works again.

It works to the most part now, but this is a recurring issue and I think the answer for this problem is at the developer's hand.

28-May-2021 11:01:46

Hmm
Jan Member 2016

Hmm

Posts: 13,000 Opal Posts by user Forum Profile RuneMetrics Profile
That sounds like the existing behaviour when Pulseaudio is running as system server, unfortunately all the workarounds are never entirely 100% reliable, only some work more reliably than others varying on hardware.

All I could suggest at this point is to mess with the -p and -a flag on the snap, including potentially
-p ""
which should unset PULSE_LATENCY_MSEC entirely. Beyond that, the audio issue has been something that has been an issue for years and will likely continue to be a problem for years by the looks of it. I'd have hoped Pipewire was the solution to it, but I guess not.

I do keep it in the back of my mind a lot, but RS3 seems to be the worst game I've seen for it ever. Other games do occasionally have similar issues and the PULSE_LATENCY_MSEC flag for them works reliably, but RuneScape is unusual here.

As an extreme otion, you could try running the Windows client on Steam with Proton, it allegedly works quite well for a lot of people. Having tried RS3 on Wine in the past, it never had the sound corruption issues (graphics on the other hand...)

28-May-2021 15:29:57 - Last edited on 28-May-2021 15:32:27 by Hmm

Yarkhan
Dec Member 2023

Yarkhan

Posts: 22 Bronze Posts by user Forum Profile RuneMetrics Profile
Thank you guys, the snap version also worked flawlessly for me under pipewire-pulse.

PULSE_LATENCY_MSEC doesn't appear to be working at all with Flatpak, the QUANT column in pw-top remaining unchanged.

The cause for it all on my system, it seems, is that my audio interface runs at 48000 while Runescape runs at 44100. The upsampling seems to be the cause of the crackling sounds.

The Snap version runs with a buffer size of 2048, which fixed it, for now.

12-Nov-2021 23:50:15

Quick find code: 409-410-514-66216866 Back to Top