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

scrcpy hangs at "Starting demuxer thread" on android 13 Galaxy S21 5G #3669

Closed
2 tasks done
jerryz12685 opened this issue Jan 9, 2023 · 13 comments
Closed
2 tasks done

Comments

@jerryz12685
Copy link

jerryz12685 commented Jan 9, 2023

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: RedHat 7.9
  • scrcpy version: 1.25
  • installation method: snap
  • device model: Samsung Galaxy S21 5G (SM-G991U)
  • Android version: 13

Describe the bug
scrcpy hangs at "Starting demuxer thread" and the device does not open.

scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
DEBUG: ADB device found:
DEBUG:           (usb)  RFCN302S5GF                     device  SM_G981U
DEBUG:           (usb)  RFCN200TYFE                     device  SM_G981U
DEBUG:           (usb)  RFCN30AE1EX                     device  SM_G981U
DEBUG:           (usb)  R52T5071FEB                     device  SM_T738U
DEBUG:           (usb)  R5CNC0Z0ZTM                     device  SM_G991U
DEBUG:           (usb)  R5CR614P2PT                     device  SM_G991U
DEBUG:           (usb)  R5CRC1KVMMM                     device  SM_G991U
DEBUG:           (usb)  RFCN8052R7A                     device  SM_G981U
DEBUG:           (usb)  RFCN20487DZ                     device  SM_G981U
DEBUG:           (usb)  RFCN20453GP                     device  SM_G981U
DEBUG:     -->   (usb)  R5CR50E5BXR                     device  SM_G991U
DEBUG:           (usb)  R5CR41DZSKB                     device  SM_G991U
DEBUG: Device serial: R5CR50E5BXR
DEBUG: Using server: /usr/local/share/scrcpy/scrcpy-server
[100%] /data/local/tmp/scrcpy-server.jar
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 4.3 MB/s (42151 bytes in 0.009s)
[server] INFO: Device: samsung SM-G991U (Android 13)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
INFO: Renderer: opengl
INFO: OpenGL version: 3.1 Mesa 20.0.8
INFO: Trilinear filtering enabled
DEBUG: Using icon: /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png
INFO: Initial texture: 1080x2400
DEBUG: Starting demuxer thread
@rom1v
Copy link
Collaborator

rom1v commented Jan 9, 2023

Please try with another encoder.

@rom1v
Copy link
Collaborator

rom1v commented Jan 9, 2023

What is the result of scrcpy -v?

In particular, what is your SDL version?

If 2.24, check #3431.

installation method: snap

Also, I suggest to try a non-snap version (for example by building it: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#simple).

@jerryz12685
Copy link
Author

scrcpy -v
scrcpy 1.25 https://github.com/Genymobile/scrcpy

Dependencies (compiled / linked):

  • SDL: 2.0.8 / 2.0.8
  • libavcodec: 57.107.100 / 57.107.100
  • libavformat: 57.83.100 / 57.83.100
  • libavutil: 55.78.100 / 55.78.100
  • libavdevice: 57.10.100 / 57.10.100
  • libusb: - / 1.0.21

@jerryz12685
Copy link
Author

I tried to list encoders, but this is the result.

scrcpy --encoder=_ -s R5CR50E5BXR
scrcpy 1.25 https://github.com/Genymobile/scrcpy
[100%] /data/local/tmp/scrcpy-server.jar
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 4.9 MB/s (42151 bytes in 0.008s)
[server] INFO: Device: samsung SM-G991U (Android 13)
INFO: Renderer: opengl
INFO: OpenGL version: 3.1 Mesa 20.0.8
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400
WARN: Device disconnected

@rom1v
Copy link
Collaborator

rom1v commented Jan 9, 2023

WARN: Device disconnected

adb has disconnected (either the USB cable, or adb server crashed on the device). Reconnect and check adb logcat.

@jerryz12685
Copy link
Author

I get the "WARN: Device disconnected" every time i run "scrcpy --encoder=_ -s R5CR50E5BXR". I opened an adb shell while running the scrcpy command and the adb shell remained open to the device the whole time, so adb is not actually losing connection.

@rom1v
Copy link
Collaborator

rom1v commented Jan 9, 2023

Clean your logcat (adb logcat -c), then execute adb logcat and keep it open.

Then run scrcpy --encoder=_ -s R5CR50E5BXR. Please post any error reported in adb logcat.

@jerryz12685
Copy link
Author

jerryz12685 commented Jan 10, 2023

I uninstalled the snap version and installed by doing the git clone and build and still seeing the same issue.

I'm not seeing any errors related to scrcpy as far as I can tell. Logcat output is attached.

cat logcat.txt | grep -i error
01-10 10:51:46.329 1313 1313 I vendor.rmt_storage: wakelock acquired: 1, error no: 11
01-10 10:51:46.375 1313 1803 I vendor.rmt_storage: rmt_storage_client_thread: /boot/modem_fs2: About to block rmt_storage client thread (th_id: 478449274032) wakelock released: 1, error no: 0

cat logcat.txt | grep -i scrcpy
01-10 10:51:39.688 10903 10903 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
01-10 10:51:39.704 10903 10903 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.Server
01-10 10:51:39.705 10903 10903 I scrcpy : Device: samsung SM-G991U (Android 13)
01-10 10:51:39.893 10949 10949 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
01-10 10:51:39.910 10949 10949 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.CleanUp
01-10 10:51:45.621 10949 10949 I scrcpy : Cleaning up
01-10 10:51:45.625 10949 10949 I scrcpy : Restoring normal power mode
logcat.txt

@rom1v
Copy link
Collaborator

rom1v commented Jan 10, 2023

01-10 10:51:39.893 10949 10949 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory

What? Why scrcpy-server.dm? Where this .dm come from?

@jerryz12685
Copy link
Author

no clue, but I saw the same thing in the log for another device which is working fine, so I didn't think it was an issue.

adb -s R5CRC1KVMMM logcat | grep scrcpy
01-10 12:41:19.522 9768 9768 I scrcpy : Cleaning up
01-10 12:41:19.527 9768 9768 I scrcpy : Restoring normal power mode
01-10 12:41:42.967 15191 15191 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
01-10 12:41:42.984 15191 15191 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.Server
01-10 12:41:42.985 15191 15191 I scrcpy : Device: samsung SM-G991U (Android 13)
01-10 12:41:43.046 1322 3338 I SurfaceFlinger: createDisplay:scrcpy
01-10 12:41:43.079 1150 1357 I libdisplayconfigqti: Register client name: scrcpy1322 device client: 0x7917286410
01-10 12:41:43.172 15208 15208 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
01-10 12:41:43.187 15208 15208 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.CleanUp
01-10 12:49:58.372 15208 15208 I scrcpy : Cleaning up
01-10 12:49:58.378 15208 15208 I scrcpy : Restoring normal power mode
01-10 12:50:10.239 15379 15379 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
01-10 12:50:10.255 15379 15379 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.Server
01-10 12:50:10.256 15379 15379 I scrcpy : Device: samsung SM-G991U (Android 13)
01-10 12:50:10.317 1322 3338 I SurfaceFlinger: createDisplay:scrcpy
01-10 12:50:10.332 1150 1357 I libdisplayconfigqti: Register client name: scrcpy1322 device client: 0x7917289230
01-10 12:50:10.406 15396 15396 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
01-10 12:50:10.420 15396 15396 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.CleanUp
01-10 12:50:14.524 15396 15396 I scrcpy : Cleaning up
01-10 12:50:14.531 15396 15396 I scrcpy : Restoring normal power mode

@jerryz12685
Copy link
Author

The issue got resolved after I did a software update on the phone. Not sure if that was the issue or it just needed a reboot, but it's working now.

@mwete1
Copy link

mwete1 commented Dec 27, 2023

I got to resolve this issue this way, open a terminal (open_a_terminal_here.bat) and run (scrcpy --no-audio --record=file.mkv), this will display your phone on your computer and automatically start recording your display, so, what you need to do is play a video using your phone media player, then stop the recording after a short while, exit (open_a_terminal_here.bat) and run (scrcpy.exe) and demuxer error will be resolved. No more device has been disconnected error, problem solved.

@mwete1
Copy link

mwete1 commented Dec 27, 2023

This is the easiest way, just insert your headphones or earphones into your computer and solve the screen display disconnection problem.

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

3 participants