Page MenuHomeSolus

SDL2 2.0.22 causes raw mouse input stutter, version 2.0.24 leads to crackling audio
Closed, ResolvedPublic

Description

As mentioned in the title, updating to the latest SDL2 Version cause heavy stutter in Counterstrike GO while using mice raw input. Switching in game raw input off helped a bit but not a lot.
I tested two mice models: roccat kova, razer basilisk essential <- no difference.

Vorgang #29: installieren
Datum: 2022-08-07 22:57

  • sdl2 wurde heruntergestuft von 2.0.22-28-1-x86_64 auf 2.0.16-27-1-x86_64.
  • sdl2-32bit wurde heruntergestuft von 2.0.22-28-1-x86_64 auf 2.0.16-27-1-x86_64.

After downgrading both of these packages, the stutter where gone an raw mice input worked again.

[Update: SDL2 2.0.24 solves the input stutter issue, but leads to crackling audio; possibly related to this issue: https://github.com/libsdl-org/SDL/issues/6121 ]

Revisions and Commits

Event Timeline

Just built packages for 2.0.18 and 2.0.20. Please try BOTH of them, and after installing each one log out and back in (just to ensure a clean state), and then test the issue.

For each one report back whether it is "good" (the mouse stutter is NOT present), "bad" (the mouse stutter IS present), or "not testable" (for whatever reason you were not able to test the issue such as CSGO crashed on startup).

2.0.18:

sudo eopkg it https://solus.reillybrogan.com:8443/sdl2-bisect/sdl2-2.0.18-28-1-x86_64.eopkg https://solus.reillybrogan.com:8443/sdl2-bisect/sdl2-32bit-2.0.18-28-1-x86_64.eopkg

2.0.20:

sudo eopkg it https://solus.reillybrogan.com:8443/sdl2-bisect/sdl2-2.0.20-28-1-x86_64.eopkg https://solus.reillybrogan.com:8443/sdl2-bisect/sdl2-32bit-2.0.20-28-1-x86_64.eopkg

Here's another one. This one is built from the most recent commit of the development branch, so this one is more likely to not work than the previous two. This one will show us if the issue has already been identified and fixed upstream (and save us a lot of work if so).

2.23.4f19421e:

sudo eopkg it https://solus.reillybrogan.com:8443/sdl2-bisect/sdl2-2.23.4f19421e-28-1-x86_64.eopkg https://solus.reillybrogan.com:8443/sdl2-bisect/sdl2-32bit-2.23.4f19421e-28-1-x86_64.eopkg

Ok, now I got a lot tested. At first, I was confused, because I expected every package being down- or upgraded from the already installed one, but my history showed only "installed again". Then decided to test again and do a downgrade to version 2.0.16-27-1 between each test.

In short:
2.0.18 <- Is fine. Stutter is not present. No audio crack.
2.0.20 <- Should be okay. Stutter is not present but maybe slightly little minor, nearly not noticeably audio cracks?
2.0.22 <- Up-to-date package distributed right now via the software center. Mouse stutter is present and the game unplayable. No audio cracks.
2.23.4f19421e <- Yes, definitely Audio cracks now. Can't tell for sure, if mouse input stutter in a really slightly way, correlating with the audio cracks, or if it's even there at all. So mouse input seems most likely normal, but audio cracks for sure in nearly every second.

I hope you find this helpful. If it is beneficial, I can share my whole history with some comments between.

OK, if this is fixed upstream I don't really see the point in trying to work on pinning down exactly what fixes this. I say you (and anyone else who jumps in here with the same issue) should just use the 2.0.18 packages given that they are the newest one without issues and when we update to 2.24 (I think it's due soon) this should be fixed overall. I would expect the audio cracks in the dev build to be something that should be resolved before they do the full release.

OK, if this is fixed upstream I don't really see the point in trying to work on pinning down exactly what fixes this. I say you (and anyone else who jumps in here with the same issue) should just use the 2.0.18 packages given that they are the newest one without issues and when we update to 2.24 (I think it's due soon) this should be fixed overall. I would expect the audio cracks in the dev build to be something that should be resolved before they do the full release.

Hello, sorry for maybe stupid question but how I can downgrade this package on Solus, or I can wait and update cooming soon?

@xonus: The SDL2 upstream project hasn't released a new version with the fix yet, so I don't know how long it will take until our package can receive an update.

One way to downgrade is to install Reilly's 2.0.18 packages (see his comment above), if he is still hosting those packages.

Another way would be to install the old version from our repository:

sudo eopkg it https://packages.getsol.us/shannon/s/sdl2/sdl2-2.0.16-27-1-x86_64.eopkg https://packages.getsol.us/shannon/s/sdl2/sdl2-32bit-2.0.16-27-1-x86_64.eopkg

Of course that would mean that on every update those packages get updated to the current version again, unless you run the update with sudo eopkg up -x sdl2 sdl2-32bit

@Staudey Very grateful, of course I understand that will try to update)

So, SDL2 version 2.24.0 was released, which should hopefully fix this. Haven't experienced any crackling audio myself (but don't have CS:GO available to test, only all sorts of other games).

2.24.0 didn't quite make it in before the sync, but if anyone wants to try it on stable they can run the following:

sudo eopkg it https://mirrors.rit.edu/solus/packages/unstable/s/sdl2/sdl2-2.24.0-29-1-x86_64.eopkg https://mirrors.rit.edu/solus/packages/unstable/s/sdl2/sdl2-32bit-2.24.0-29-1-x86_64.eopkg

And if you have some kind of issue with that you can run the following to reinstall the previous stable version:

sudo eopkg it sdl2 sdl2-32bit --reinstall

Hey ReillyBrogan,

I tested version 2.24.0 from your post above. No mouse stutter, but audio cracks.
The game itself runs good, but I can't tell for sure, but I think HID inputs just feel a bit off.

Did the reinstall as you mentioned above and got 2.0.22 installed. No audio cracks but mouse stutter.

Could you please host version 2.0.18 again? I tried to rollback but eopkg fails to fetch the data.

Could you please host version 2.0.18 again? I tried to rollback but eopkg fails to fetch the data.

Unfortunately I moved a few weeks ago and don't yet have a proper internet connection (relying on my neighbors wifi for now). Without that I can't put my home server online and won't be able to host eopkgs like I did before. I wonder if your issue is related to this one.

probably. it sounds familiar.
So, there wont be another way to downgrade ?

Could somebody please reopen this ticket?
The problem is not resolved.
The suggested solution to update sdl2 to version 2.24.0, isnt'n one.

If I can help further, I will do.

Thank you.

THIS PROBLEM IS NOT SOLVED!

Vorgang #69: Upgrade ausführen
Datum: 2022-10-27 21:53

  • sdl2 wurde aktualisiert von 2.24.0-29-1-x86_64 auf 2.24.1-30-1-x86_64.

STILL AUIDO CRACKS.

PLEASE REOPEN THIS TICKET.

Thank you.

@Animpacz: Just to confirm: The original issue of heavy stuttering with raw mouse input is gone, and now the audio cracks remain, correct?

@Staudey: I can confirm, you got that right.
With the latest sdl2 version 2.24.1-30-1-x86_64 raw mouse input is fine and only audio cracks remain.

Staudey renamed this task from Latest SDL2 package broke raw mice input and cause hevy stutter in CSGO to SDL2 2.0.22 causes raw mouse input stutter, version 2.0.24 leads to crackling audio.Oct 30 2022, 9:49 AM
Staudey reopened this task as Open.
Staudey updated the task description. (Show Details)
Staudey updated the task description. (Show Details)

That bug mentions that this might be a pulseaudio bug, @Animpacz have you tried running pipewire as your audio server instead?

No, I didn't try that.
Is this the proper way to do so?: Reddit

Yeah that'll do it. Make sure you log out and back in after running those commands.

@ReillyBrogan Thank you for your hint!
I'm kinda new to Linux as a desktop, so didn't know about pipewire at all.

After switching to pipewire my crackling audio in CS is now gone, and I hear everything clear. Beside CS, I think i noticed some minor, barely noticeable scratching audio while using TeamSpeak 3 and even from other audio streams. They seem all gone by now.

The only hurdle for me remaining is to figure out how I can assign audio streams to certain devices. Thanks to everyone!

@Animpacz The original SDL2 issue is now closed after they've reverted a certain change, so this issue should hopefully be fixed. That fix was part of SDL 2.26.0.

In addition to that the new SDL 2.26.1 also contains an "Improved audio resampling quality" change.

Of course you're welcome to stay on pipewire and don't have to test the new releases in pulseaudio, but I think I can close this issue now. If you ever switch back to pulseaudio and still notice those issues, just add a comment here for us to re-open it.