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

Low framerate/lag when screen is removed/broken #1285

Closed
crowbardispensingcore opened this issue Apr 12, 2020 · 6 comments
Closed

Low framerate/lag when screen is removed/broken #1285

crowbardispensingcore opened this issue Apr 12, 2020 · 6 comments

Comments

@crowbardispensingcore
Copy link

Environment

  • OS: Windows
  • scrcpy version: 1.12.1
  • installation method: Windows release
  • device model: Google Pixel 3A
  • Android version: 10

The control and frame rate was pretty smooth when the screen was working properly. However, after the screen was completely broken (equivalent to no screen connecting to the phone), the frame rate drops to 1-2 FPS at most with seconds of lags. Lowering the resolution has no improvement.

@rom1v
Copy link
Collaborator

rom1v commented Apr 12, 2020

Hardware issue due to broken screen?

@crowbardispensingcore
Copy link
Author

Hardware issue due to broken screen?

Actually I had a chance to troubleshoot this possibility. I ordered a replacement screen and when I installed the new screen, everything was smooth again. However the new screen's panel was defective so I had to return it. And now without a screen it became unusable once more.

@rom1v
Copy link
Collaborator

rom1v commented Apr 12, 2020

How does screenrecord behave?

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4

?

@crowbardispensingcore
Copy link
Author

crowbardispensingcore commented Apr 13, 2020

How does screenrecord behave?

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4

?

The issue was with the phone itself.
I fixed it by restarting the phone and use the wm command to change the resolution. Thanks for your help!

@saikrishna279
Copy link

saikrishna279 commented May 16, 2021

Pulled a log and found this out:

05-16 16:15:04.512   687   687 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 1
05-16 16:15:04.515  2667  2667 I Choreographer: Skipped 40 frames!  The application may be doing too much work on its main thread.
05-16 16:15:04.708   663   739 I SDM     : HWCSession::UEventHandler: Uevent FB0 = change@/devices/virtual/graphics/fb0
05-16 16:15:04.713   663   663 W SDM     : HWCSession::ValidateDisplay: panel is in bad state, resetting the panel
05-16 16:15:04.714   663   663 I SDM     : HWCSession::ResetPanel: Powering off primary
05-16 16:15:04.714   663   663 I SDM     : DisplayBase::SetDisplayState: Set state = 0, display 0
05-16 16:15:04.719  2667  2719 I OpenGLRenderer: Davey! duration=838ms; Flags=0, IntendedVsync=1723234961002, Vsync=1723851627644, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=1723867587403, AnimationStart=1723867658132, PerformTraversalsStart=1723868382091, DrawStart=1723868501049, SyncQueued=1723868630580, SyncStart=1724560341587, IssueDrawCommandsStart=1724560639920, SwapBuffers=1724763297180, FrameCompleted=1724765348013, DequeueBufferDuration=198255000, QueueBufferDuration=943000,
05-16 16:15:04.948   663   739 I SDM     : HWCSession::UEventHandler: Uevent FB0 = change@/devices/virtual/graphics/fb0
05-16 16:15:05.364   663   663 I SDM     : HWCSession::ResetPanel: Restoring power mode on primary
05-16 16:15:05.364   663   663 I SDM     : DisplayBase::SetDisplayState: Set state = 1, display 0

HWC keeps turning the display 0 ON and OFF again and again as the display isn't connected. The happens in the ValidateDisplay() of the HWC hwc_session.cpp.

And also, the SystemUI giving frequent davey's might be the cause of the lag ( < 1 FPS ).

Disabling the Display 0 as a whole may solve the issue. Need help of someone with this tho.

@kedestin
Copy link

Pulled a log and found this out:

05-16 16:15:04.512   687   687 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 1
05-16 16:15:04.515  2667  2667 I Choreographer: Skipped 40 frames!  The application may be doing too much work on its main thread.
05-16 16:15:04.708   663   739 I SDM     : HWCSession::UEventHandler: Uevent FB0 = change@/devices/virtual/graphics/fb0
05-16 16:15:04.713   663   663 W SDM     : HWCSession::ValidateDisplay: panel is in bad state, resetting the panel
05-16 16:15:04.714   663   663 I SDM     : HWCSession::ResetPanel: Powering off primary
05-16 16:15:04.714   663   663 I SDM     : DisplayBase::SetDisplayState: Set state = 0, display 0
05-16 16:15:04.719  2667  2719 I OpenGLRenderer: Davey! duration=838ms; Flags=0, IntendedVsync=1723234961002, Vsync=1723851627644, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=1723867587403, AnimationStart=1723867658132, PerformTraversalsStart=1723868382091, DrawStart=1723868501049, SyncQueued=1723868630580, SyncStart=1724560341587, IssueDrawCommandsStart=1724560639920, SwapBuffers=1724763297180, FrameCompleted=1724765348013, DequeueBufferDuration=198255000, QueueBufferDuration=943000,
05-16 16:15:04.948   663   739 I SDM     : HWCSession::UEventHandler: Uevent FB0 = change@/devices/virtual/graphics/fb0
05-16 16:15:05.364   663   663 I SDM     : HWCSession::ResetPanel: Restoring power mode on primary
05-16 16:15:05.364   663   663 I SDM     : DisplayBase::SetDisplayState: Set state = 1, display 0

HWC keeps turning the display 0 ON and OFF again and again as the display isn't connected. The happens in the ValidateDisplay() of the HWC hwc_session.cpp.

And also, the SystemUI giving frequent davey's might be the cause of the lag ( < 1 FPS ).

Disabling the Display 0 as a whole may solve the issue. Need help of someone with this tho.


Running scrcpy --turn-screen-off seems to rectify the issue, and allows scrcpy to run at a normal framerate.

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

4 participants