ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
787 stars 69 forks source link

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

Open C0rn3j opened 2 months ago

C0rn3j commented 2 months ago

Workarounds:


System information ```yaml 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 ```

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 commented 1 month ago

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

NickTheOnlyNeko commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

Maltesaa commented 1 month ago

This seems to have fixed it for me at least https://github.com/ValveSoftware/csgo-osx-linux/issues/3805#issuecomment-2235159020

C0rn3j commented 1 month ago

-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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 3 weeks ago

Same issue, sound sometimes cuts off, I also commented this on https://github.com/ValveSoftware/csgo-osx-linux/issues/3852 since Pop!_OS uses PipeWire as well.

sillyh4ck3r commented 3 days ago

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