Skip to content

100% CPU usage when switching playback devices or after long idle periods #199

@minwelll

Description

@minwelll

Describe the bug
Spotatui experiences 100% CPU usage triggered by switching playback devices or after long periods of inactivity. Specifically, when transferring playback from Spotatui to a mobile device, the program becomes "dominant" to device changes (forcing playback back to itself) and also keeps maximum CPU load until the process is manually terminated.

To Reproduce

  1. Launch Spotatui and start playback.
  2. Switch the playback device from Spotatui to a phone (via Spotify Connect).
  3. Observe that Spotatui immediately attempts to regain control as the active playback device.
  4. Try to switch back to the phone from the mobile app (the toggle fails unless changed directly within Spotatui).
  5. Check system resources to confirm 100% CPU usage.
    Alternative: Leave Spotatui idle without playback for several hours and monitor CPU spikes.

Expected behavior

  • The handoff between devices should be seamless without CPU spikes.
  • Spotatui should remain idle/backgrounded when another device is selected as the primary output.
  • CPU usage should remain minimal when the application is not actively playing audio or syncing large amounts of data.

Desktop (please complete the following information):

  • Trisquel GNU/Linux
  • Bash running inside two nested Screen sessions
  • v0.38.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions