Skip to content

Sound keeps cutting off requiring me to disable and enable the device constantly #3832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
C0rn3j opened this issue Sep 6, 2024 · 18 comments

Comments

@C0rn3j
Copy link

C0rn3j commented Sep 6, 2024

Workarounds:


System information
Computer Information:
Manufacturer: Gigabyte Technology Co., Ltd.
Model: X670 AORUS ELITE AX
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 5 7600X 6-Core Processor
CPU Family: 0x19
CPU Model: 0x61
CPU Stepping: 0x2
CPU Type: 0x0
Speed: 5453 MHz
12 logical processors
6 physical processors
Hyper-threading: Supported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Supported
SSE41: Supported
SSE42: Supported
AES: Supported
AVX: Supported
AVX2: Supported
AVX512F: Supported
AVX512PF: Unsupported
AVX512ER: Unsupported
AVX512CD: Supported
AVX512VNNI: Supported
SHA: Supported
CMPXCHG16B: Supported
LAHF/SAHF: Supported
PrefetchW: Unsupported
Operating System Version:
Freedesktop SDK 23.08 (Flatpak runtime) (64 bit)
Kernel Name: Linux
Kernel Version: 6.10.8-arch1-1
X Server Vendor: The X.Org Foundation
X Server Release: 12401002
X Window Manager: KWin
Steam Runtime Version: steam-runtime_0.20240806.97925
Video Card:
Driver: NVIDIA Corporation NVIDIA GeForce RTX 4090/PCIe/SSE2
Driver Version: 4.6.0 NVIDIA 560.35.03
OpenGL Version: 4.6
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 239 Hz
VendorID: 0x1002
DeviceID: 0x164e
Revision Not Detected
Number of Monitors: 3
Number of Logical Video Cards: 2
Primary Display Resolution: 2560 x 1440
Desktop Resolution: 8960 x 2160
Primary Display Size: 23.23" x 13.15" (26.65" diag), 59.0cm x 33.4cm (67.7cm diag)
Primary VRAM: 24564 MB
Sound card:
Audio device: Nvidia GPU a3 HDMI/DP
Memory:
RAM: 63440 Mb
VR Hardware:
VR Headset: None detected
Miscellaneous:
UI Language: English
LANG: en_GB.UTF-8
Total Hard Disk Space Available: 959809 MB
Largest Free Hard Disk Block: 49940 MB
Storage:
Number of SSDs: 13
SSD sizes: 8001G,8001G,6001G,6001G,3000G,2048G,2000G,0B,0B,0B,0B,0B,0B
Number of HDDs: 0
Number of removable drives: 0
* Have you checked for system updates?: Yes

I keep losing sound randomly in the game, seems the sound lags/spikes mildly before doing so.
The workaround is to DISABLE and ENABLE the device in pavucontrol pwvucontrol, pavu has bugs making everything worse when it's kept running in the background.

I've had this issue for months at minimum.

image

This is the only way to get the sound back besides restarting the game, no audio settings in the game will re-enable the audio.

This sometimes happens very often until I reboot my entire system, once every couple minutes.

I am on Arch Linux and using pipewire-pulse and the game is being ran with %command% -nojoy parameters.

@NickTheOnlyNeko
Copy link

I think we might have the same issue mentioned in here not a day ago

@NickTheOnlyNeko
Copy link

Which HyperX do you have because I'm having a similar issue with HyperX Cloud II(2) (Kingston Version(HP bought HyperX off of Kingston so we have "'HyperX Cloud II' by Kingston"(from before they got bought) and "'HyperX Cloud II' by HP". I know it's a mess)

@C0rn3j
Copy link
Author

C0rn3j commented Oct 7, 2024

Which HyperX do you have because I'm having a similar issue with HyperX Cloud II(2) (Kingston Version(HP bought HyperX off of Kingston so we have "'HyperX Cloud II' by Kingston"(from before they got bought) and "'HyperX Cloud II' by HP". I know it's a mess)

Exact same one, using the USB sound card.

Pro Audio seems to be a 100% workaround so far.

@NickTheOnlyNeko
Copy link

Which HyperX do you have because I'm having a similar issue with HyperX Cloud II(2) (Kingston Version(HP bought HyperX off of Kingston so we have "'HyperX Cloud II' by Kingston"(from before they got bought) and "'HyperX Cloud II' by HP". I know it's a mess)

Exact same one, using the USB sound card.

Pro Audio seems to be a 100% workaround so far.

I have no idea what Pro Audio is😂😂

@C0rn3j
Copy link
Author

C0rn3j commented Oct 7, 2024

Profile for the USB sound card, set it in pwvucontrol.

@Maltesaa
Copy link

Maltesaa commented Oct 9, 2024

This seems to have fixed it for me at least #3805 (comment)

@C0rn3j
Copy link
Author

C0rn3j commented Oct 9, 2024

-sdlaudiodriver pulseaudio

That'd be a workaround, not a fix.

That suggests it's just the PW backend implementation that is affected, not the Pulse backend.

Maybe there's an SDL report about it upstream.

@NickTheOnlyNeko
Copy link

Profile for the USB sound card, set it in pwvucontrol.

I tried the "Pro" profile and it's even buggier than the regular profiles, the "Pro" profile keeps changing randomly to the "non-Pro" profiles, I've given up with the profiles at this point

@C0rn3j
Copy link
Author

C0rn3j commented Oct 9, 2024

the "Pro" profile keeps changing randomly to the "non-Pro" profiles

Latest Wireplumber? Disable Bluetooth HSP/HFP autoswitch.
Yes, I get you do not use BT, it's a bug.

@NickTheOnlyNeko
Copy link

NickTheOnlyNeko commented Oct 9, 2024

the "Pro" profile keeps changing randomly to the "non-Pro" profiles

Latest Wireplumber? Disable Bluetooth HSP/HFP autoswitch.
Yes, I get you do not use BT, it's a bug.

I'm on Arch Linux so it most likely has everything to the latest version(last updated yesterday)
My headphones don't have Bluetooth😂

@NickTheOnlyNeko
Copy link

the "Pro" profile keeps changing randomly to the "non-Pro" profiles

Latest Wireplumber? Disable Bluetooth HSP/HFP autoswitch.
Yes, I get you do not use BT, it's a bug.

My headphones don't have Bluetooth😂

Also Bluetooth is always disabled on my PC

@C0rn3j
Copy link
Author

C0rn3j commented Oct 9, 2024

My headphones don't have Bluetooth😂

Also Bluetooth is always disabled on my PC

You can edit your posts.

That is precisely why that comment you're replying to has Yes, I get you do not use BT, it's a bug.

EDIT: Fixes for multiple BT issues merged, available in WP 0.5.7 which will hopefully release soon.

@ztjuh
Copy link

ztjuh commented Oct 27, 2024

Same issue, sound sometimes cuts off, I also commented this on #3852 since Pop!_OS uses PipeWire as well.

@sillyh4ck3r
Copy link

sillyh4ck3r commented Nov 19, 2024

I can confirm that the solution to disable the soundcard in pavucontrol and then re-enable it works when losing sound in CS2. I usually lose sound in CS2 due to desktop notification sounds during game or alt+tab'ing to desktop at times. Now I don't have to restart the entire game just to get the sound back!

slackware64-current
pipewire-1.2.6
cinnamon (6.0.4) desktop environment

@C0rn3j
Copy link
Author

C0rn3j commented Dec 27, 2024

I've reset my PW config to default and I had this issue come back, turns out my quantum overrides were working around it (I don't think I changed anything else)

    default.clock.quantum       = 2048 # 1024
    default.clock.min-quantum   = 1024 # 32
    default.clock.max-quantum   = 4096

Dumping the entire ~/.config/pipewire directory here just in case.

pipewire.zip

@NickTheOnlyNeko
Copy link

NickTheOnlyNeko commented Dec 31, 2024

Replying to #3832 (comment)

weirdly i don't have that directory

@C0rn3j
Copy link
Author

C0rn3j commented Dec 31, 2024

It's an override directory, it does not exist by default.

@sillyh4ck3r
Copy link

I wrote a bash script to reset the card profile and assigned the script to a custom keyboard shortcut (for Cinnamon Desktop Environment), then I can reset the card profile without leaving the game.

#!/bin/bash
CARD_ID=`pactl -f json list short cards | jq '.[] | select(.name=="alsa_card.pci-0000_00_1f.3") | .index'`; pactl set-card-profile $CARD_ID off && sleep 1 && pactl set-card-profile $CARD_ID output:analog-stereo+input:analog-stereo

'alsa_card.pci-0000_00_1f.3' is the 'name' of the card found in the output of pactl -f json list short cards and from there I can get the index (ID) of the card. I have found that the index (ID) is not always the same, for example after reboots.

Now if I'm in-game and some external software triggers a sound event that causes CS2 to lose sound, I press Ctrl+Shift+S to reset the card profile. Easy-peasy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants