Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
108.04k stars 10.42k forks source link

scrcpy exits with error on device screen on/off #5104

Open MangoTCF opened 1 month ago

MangoTCF commented 1 month ago

Environment

Describe the bug

scrcpy exits with ERROR: Controller error when i turn my phone screen on/off (lock/unlock my phone?)

mango@mtcf in ~ λ scrcpy --keyboard=disabled --mouse=disabled --no-video-playback -Vverbose -w \

scrcpy 2.5 <https://github.com/Genymobile/scrcpy>
INFO: No video playback, no recording, no V4L2 sink: video disabled
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.0.15:5555               device  23013PC75G
DEBUG: Device serial: 192.168.0.15:5555
DEBUG: Using server: /usr/share/scrcpy/scrcpy-server
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 126.4 MB/s (69624 bytes in 0.001s)
[server] INFO: Device: [Xiaomi] POCO 23013PC75G (Android 14)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
DEBUG: Using icon: /usr/share/icons/hicolor/256x256/apps/scrcpy.png
[server] DEBUG: Using audio encoder: 'c2.android.opus.encoder'
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.1.3-arch1.1
INFO: Trilinear filtering disabled
DEBUG: Demuxer 'audio': starting thread
VERBOSE: [Audio] Inserting initial buffering silence: 240 samples
VERBOSE: [Audio] Inserting initial buffering silence: 240 samples
VERBOSE: [Audio] Inserting initial buffering silence: 240 samples
VERBOSE: [Audio] Inserting initial buffering silence: 240 samples
VERBOSE: [Audio] Inserting initial buffering silence: 240 samples
VERBOSE: [Audio] Inserting initial buffering silence: 240 samples
VERBOSE: [Audio] Buffering: target=2400 avg=2592.000244 cur=2640 compensation=-192
VERBOSE: [Audio] Buffering: target=2400 avg=2520.346924 cur=2575 compensation=-120
VERBOSE: [Audio] Buffering: target=2400 avg=2493.369141 cur=2304 compensation=0
VERBOSE: [Audio] Buffering: target=2400 avg=2475.840820 cur=2064 compensation=0
VERBOSE: [Audio] Buffering: target=2400 avg=2477.398438 cur=2064 compensation=0
DEBUG: User requested to quit
DEBUG: quit...
DEBUG: Demuxer 'audio': end of frames
DEBUG: Receiver stopped
[server] DEBUG: Controller stopped
[server] DEBUG: Device message sender stopped
[server] DEBUG: Audio encoder stopped
DEBUG: Server disconnected
DEBUG: Server terminated

Please do not post screenshots of your terminal, just post the content as text instead.

rom1v commented 1 month ago

https://github.com/Genymobile/scrcpy/issues/2995#issuecomment-1029114499 https://github.com/Genymobile/scrcpy/issues/1382#issuecomment-627591729 ?

itsm3v1nc3 commented 1 month ago

Hi, Same issue as mine. see the attached screenshot below. I tried the #2995 & #1382 still having an error. image

18637 commented 1 month ago

This is perhaps a UI 6.1 issue? After updating one phone to UI6.1 it now does the same.

image

The same phone on UI6.0 does not have this issue?

I will note that I ma not using the latest Scrcpy server to get around a ADB push issue.

rom1v commented 1 month ago

I will note that I ma not using the latest Scrcpy server to get around a ADB push issue.

What's the problem with adb push?

If the reason is that latest adb do not work on Windows 7, you can replace the adb-related files in the latest scrcpy version.

18637 commented 1 month ago

No, this was the issue. https://github.com/Genymobile/scrcpy/issues/4638 I ended up getting by, by removing the push from Scrcpy, pushing manually and not cleaning up the server when done. But I just have not had a chance to modify the latest version.

MangoTCF commented 1 month ago

My issue manifests only when connecting the phone over wireless debugging. I tried to to adb tcpip 5555 bit it still disconnects on lock/unlock

18637 commented 1 week ago

My issue manifests only when connecting the phone over wireless debugging. I tried to to adb tcpip 5555 bit it still disconnects on lock/unlock

Yes, that is the same for me. @MangoTCF only happed on a device that is running the latest android update.