[GH-ISSUE #523] High CPU usage (~300%) caused by PulseAudio/GStreamer audio threads after stream/lobby reconnect #318

Open
opened 2026-10-15 12:59:36 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @ddfddf23 on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/523

Description

Wolf sometimes starts consuming ~250-300% CPU after a Moonlight streaming session has been stopped/reconnected or after leaving/rejoining a lobby.

The stream itself continues to work and audio is still present, but the Wolf process keeps several audio-related threads busy at ~100% CPU each.

Restarting the Wolf container resets CPU usage back to normal.

This does not appear to be caused by the client microphone or Discord. I was able to reproduce the high CPU usage without Discord running and without any microphone software active on the Moonlight client.

Expected behavior

Wolf should return to normal CPU usage after a stream/lobby teardown or reconnect.

Typical CPU usage before the issue occurs is around ~20%.

Actual behavior

After the issue is triggered:

  • docker stats wolf reports approximately 250-300% CPU
  • the pulseaudio daemon itself remains around ~1% CPU
  • /wolf/wolf is the process consuming the CPU
  • top -H shows audio-related Wolf/GStreamer threads using almost a full CPU each

Example:

audiosrc-ringbu   ~99%
wolf              ~94%
pulsesrc0:src     ~94%

The following warning is also repeatedly produced:

audiosrc gstaudiosrc.c:227:audioringbuffer_thread_func:<pulsesrc0>
error reading data -1 (reason: Success), skipping segment

Suppressing GStreamer warnings does not reduce the CPU usage, so the CPU usage appears to come from the audio pipeline itself rather than log output.

Possible trigger

From the logs it appears to happen around stream/lobby teardown and reconnect.
Example sequence:

[LOBBY] Moonlight stream ... over, leaving lobby ...
[LOBBY] Session ... leaving lobby ...
[GSTREAMER] Pipeline reached End Of Stream
...
[LOBBY] Session ... joining lobby ...

After this, Wolf may remain at ~250-300% CPU.
I have not yet confirmed the exact minimal sequence required to reproduce it every time.

System information

Host OS: CachyOS / Arch Linux
CPU: AMD Ryzen 7 5700X3D
GPU: NVIDIA GeForce RTX 5070
NVIDIA driver: 615.71.09
GStreamer: 1.26.7
Wolf: ghcr.io/games-on-whales/wolf:stable
NVIDIA setup: manual NVIDIA driver volume
Video pipeline: NVIDIA zero-copy
Encoder: NVENC

Docker Image: Image=ghcr.io/games-on-whales/wolf:stable ImageID=sha256:b0ef253739f9bd49b71eba7e150c955fd05990c0d409e666d89236995351551a

Screenshots

Image Image
Originally created by @ddfddf23 on GitHub (Oct 3, 2026). Original GitHub issue: https://github.com/games-on-whales/wolf/issues/523 ## Description Wolf sometimes starts consuming ~250-300% CPU after a Moonlight streaming session has been stopped/reconnected or after leaving/rejoining a lobby. The stream itself continues to work and audio is still present, but the Wolf process keeps several audio-related threads busy at ~100% CPU each. Restarting the Wolf container resets CPU usage back to normal. This does not appear to be caused by the client microphone or Discord. I was able to reproduce the high CPU usage without Discord running and without any microphone software active on the Moonlight client. ## Expected behavior Wolf should return to normal CPU usage after a stream/lobby teardown or reconnect. Typical CPU usage before the issue occurs is around ~20%. ## Actual behavior After the issue is triggered: - `docker stats wolf` reports approximately 250-300% CPU - the `pulseaudio` daemon itself remains around ~1% CPU - `/wolf/wolf` is the process consuming the CPU - `top -H` shows audio-related Wolf/GStreamer threads using almost a full CPU each Example: ```text audiosrc-ringbu ~99% wolf ~94% pulsesrc0:src ~94% ``` The following warning is also repeatedly produced: ``` audiosrc gstaudiosrc.c:227:audioringbuffer_thread_func:<pulsesrc0> error reading data -1 (reason: Success), skipping segment ``` Suppressing GStreamer warnings does not reduce the CPU usage, so the CPU usage appears to come from the audio pipeline itself rather than log output. ## Possible trigger From the logs it appears to happen around stream/lobby teardown and reconnect. Example sequence: ``` [LOBBY] Moonlight stream ... over, leaving lobby ... [LOBBY] Session ... leaving lobby ... [GSTREAMER] Pipeline reached End Of Stream ... [LOBBY] Session ... joining lobby ... ``` After this, Wolf may remain at ~250-300% CPU. I have not yet confirmed the exact minimal sequence required to reproduce it every time. ## System information Host OS: CachyOS / Arch Linux CPU: AMD Ryzen 7 5700X3D GPU: NVIDIA GeForce RTX 5070 NVIDIA driver: 615.71.09 GStreamer: 1.26.7 Wolf: ghcr.io/games-on-whales/wolf:stable NVIDIA setup: manual NVIDIA driver volume Video pipeline: NVIDIA zero-copy Encoder: NVENC Docker Image: Image=ghcr.io/games-on-whales/wolf:stable ImageID=sha256:b0ef253739f9bd49b71eba7e150c955fd05990c0d409e666d89236995351551a ## Screenshots <img width="1985" height="1289" alt="Image" src="https://github.com/user-attachments/assets/27bfee5d-b1cb-4467-a5ca-bb3062013b1d" /> <img width="1731" height="331" alt="Image" src="https://github.com/user-attachments/assets/5d94e3ef-17a5-44dd-a9c5-85a4eb43db10" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#318
No description provided.