Skip to content
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

Too much CPU consumption if invisible #5847

Open
eku opened this issue Feb 16, 2025 · 4 comments
Open

Too much CPU consumption if invisible #5847

eku opened this issue Feb 16, 2025 · 4 comments

Comments

@eku
Copy link

eku commented Feb 16, 2025

Please read the prerequisites to run scrcpy.

Also read the FAQ and check if your issue already exists.

Environment

  • OS: Fedora 41
  • Scrcpy version: 2.4
  • Installation method: manual build
  • Device model: Xiaomi
  • Android version: LOS21

Describe the bug

scrcpy consumes 10-20% of cpu even when the window is not visible, i.e. minimized or behind other windows.

I would expect that scrcpy honours visbility and runs in idle mode if invisible, i.e. does not refresh window content and others.

@rom1v
Copy link
Collaborator

rom1v commented Feb 16, 2025

Visible or not, it continues to decode video frames coming from the device (they must be decoded anyway, because further frames depends on earlier frames).

@eku
Copy link
Author

eku commented Feb 16, 2025

Visible or not, it continues to decode video frames coming from the device (they must be decoded anyway, because further frames depends on earlier frames).

So there's no control channel back to the server running on the device that can be used to halt streaming?

@rom1v
Copy link
Collaborator

rom1v commented Feb 16, 2025

No. It theory, it could be possible, but there would be a delay before the first frame is upfated on window restore.

Moreover, the video stream can be recorded or forwarded to v4l2, regardless of the window visibility.

@eku
Copy link
Author

eku commented Feb 16, 2025

Moreover, the video stream can be recorded or forwarded to v4l2, regardless of the window visibility.

But this could be done with an option.

Feel free close the issue if you won't implement this.

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

No branches or pull requests

2 participants