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

Edge 40 Neo Freeze #5296

Closed
nikmattos opened this issue Sep 16, 2024 · 8 comments
Closed

Edge 40 Neo Freeze #5296

nikmattos opened this issue Sep 16, 2024 · 8 comments

Comments

@nikmattos
Copy link

Environment

  • OS: Windows 10
  • Scrcpy version: 2.7
  • Installation method: manual build
  • Device model: Motorola Edge 40 Neo
  • Android version: 14

Describe the bug

Hello!! Sorry for my bad english, its not my native language. I'm facing with a peculiar problem, I have e Edge 40 Neo and Scrcpy works very well via USB, with sounds, etc. But when I use internet way (Via tcpip) my phone simply stop to work after some seconds and freeze completely, being necessary restart the phone. Also while its freezed, my phone gets very hot (Somehow it's working at full capacity... For what???? It gets very very hot)

Even with low resolutions, my phone still freezes.

I already change the encodes with the list-encode.

Its literally the same thing with "--video-source=camera", via USB it works perfectly, but via TCPIP it does not work and freezes my phone.

When I share only audio, I cant listen to my phone often, sometimes I can listen the audio android but with the audio sliced.

Do you have some idea about what is happening?

@rom1v
Copy link
Collaborator

rom1v commented Sep 16, 2024

My guess is that the video bit rate is greater than your network bandwidth (for any reason, bad network hardware, packet loss, etc.). At some point, the TCP buffer to send new packets is full, applying backpressure to MediaCodec, and the MediaCodec backend can't handle it (either it bufferizes packets until an out-of-memory, or something else).

This is just a guess, but if it works over USB but not TCP/IP, that might be an explanation.

Can you reproduce with a tiny bit rate (and awful quality):

scrcpy -m640 -b500k --no-audio

?

@nikmattos
Copy link
Author

Nop! I tested it and it didnt work :c
Im not sure about weak network, im using Wifi 5G, its something in my phone that does not allow it works aaaaa
I can test in next days to make sure about network!

Oh, an important thing that I forgot to say, the Windows does not create a pop-out when im using tcpip. When I use USB, it appears instantly.

Also when I turn off the Wifi before freeze in my phone, the scrcpy does not warn about disconnection. It only give a notification about it when I turn on the wifi again!

I could try to ask in some kind of Motorola forum, but I have no idea about how i could ask this kind of question

Im going to sleep now, its 5am in my timezone. But thanks for the attention!

@rom1v
Copy link
Collaborator

rom1v commented Sep 16, 2024

the Windows does not create a pop-out when im using tcpip. When I use USB, it appears instantly.

You mean you don't have any video at all?

Try adb over tcp/ip manually (without scrcpy):

Plug your device over USB, run adb tcpip 5555.
Find your device ip, then execute adb connect 192.168.1.x (adapt the ip)
Then adb devices, adb logcat, adb shell: how do they behave?

@YanYiGe2023
Copy link

不!我测试了一下,它不起作用 :c 我不确定网络是否较弱,我使用的是 Wifi 5G,我手机里的东西不允许它工作啊啊我可以在接下来的几天里测试以确保网络正常!

哦,我忘了说一件重要的事情,当我使用 tcpip 时,Windows 不会创建弹出窗口。当我使用 USB 时,它会立即出现。

此外,当我在手机冻结之前关闭 Wifi 时,scrcpy 不会警告断开连接。它只会在我再次打开 wifi 时发出通知!

我可以尝试在某种 Motorola 论坛上提问,但我不知道如何提出这种问题

我现在要睡觉了,现在是我所在时区的凌晨 5 点。但感谢您的关注!

尝试电脑开启一个AP,手机连接上电脑的AP,排查掉网络的原因
Try to turn on an AP on the computer and connect the phone to the AP of the computer to check the cause of the network

@nikmattos
Copy link
Author

YanYiGe2023 尝试电脑开启一个AP,手机连接上电脑的AP,排查掉网络的原因
Try to turn on an AP on the computer and connect the phone to the AP of the computer to check the cause of the network

What is AP? Sorry, I'm not someone who's used to acronyms or codes, I'm not a programmer. How can I do it?

rom1v You mean you don't have any video at all?

I have video when I use USB, but when i use tcpip it does not appear!

Try adb over tcp/ip manually (without scrcpy):
Plug your device over USB, run adb tcpip 5555. Find your device ip, then execute adb connect 192.168.1.x (adapt the ip) Then adb devices, adb logcat, adb shell: how do they behave?

If I use adb devices, my IP appear and a USB number appear

C:\Users\casa1>adb devices
List of devices attached
0084690216      device
192.168.XXX.XX device

adb logcat and adb shell has the same message

adb.exe: more than one device/emulator

If I remove the USB and type adb shell, will appear manaus:/ $
If I remove the USB and type adb logcat, a lot of log will appear xD

09-16 17:12:49.921 10089 10089 D ViewRootImpl:   fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
09-16 17:12:49.921 10089 10089 D ViewRootImpl:   pfl=NO_MOVE_ANIMATION FORCE_DRAW_STATUS_BAR_BACKGROUND FIT_INSETS_CONTROLLED
09-16 17:12:49.921 10089 10089 D ViewRootImpl:   bhv=DEFAULT
09-16 17:12:49.921 10089 10089 D ViewRootImpl:   fitSides=} by setView
09-16 17:12:49.923  1923  2412 D CompatibilityChangeReporter: Compat change id reported: 168419799; UID 10385; state: DISABLED
09-16 17:12:49.924  1923  2412 D CompatibilityChangeReporter: Compat change id reported: 273564678; UID 10385; state: DISABLED
09-16 17:12:49.929  1923  2412 D CoreBackPreview: Window{17612bf u0 com.whatsapp/com.whatsapp.Conversation}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@f6eacd5, mPriority=0, mIsAnimationCallback=false}
09-16 17:12:50.025  1923  2006 I LaunchCheckinHandler: MotoDisplayed com.whatsapp/.Conversation,wp,ca,183
09-16 17:12:50.029  1923  2001 V WindowManager: Sent Transition #344 createdAt=09-16 17:12:49.819 via request=TransitionRequestInfo { type = 1, triggerTask = TaskInfo{userId=0 taskId=70 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.whatsapp/.Main } baseActivity=ComponentInfo{com.whatsapp/com.whatsapp.HomeActivity} topActivity=ComponentInfo{com.whatsapp/com.whatsapp.Conversation} origActivity=null realActivity=ComponentInfo{com.whatsapp/com.whatsapp.Main} numActivities=2 lastActiveTime=42580204 supportsMultiWindow=true supportsGlobalFreeform=true resizeMode=1 isResizeable=true isAppLocked=false canKillAndRestart=true isShowDecorCaptionWindowRequest=false minWidth=-1 minHeight=-1 defaultMinSize=200 token=WCT{RemoteToken{28d37cb Task{7826ca0 #70 type=standard A=10385:com.whatsapp}}} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 105 - 0, 0) topActivityInfo=ActivityInfo{1d0a18d com.whatsapp.Conversation} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false topActivityLetterboxed= false isFromDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}, remoteTransition = null, displayChange = null, flags = 0 }
09-16 17:12:50.029 24367 24675 V WindowManagerShell: onTransitionReady android.os.BinderProxy@d1bcfc9: {id=344 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{null m=OPEN f=FILLS_TASK leash=Surface(name=ActivityRecord{d46a363 u0 com.whatsapp/.Conversation)/@0xd6aacfc sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1080, 2400) d=-1->0 r=-1->0:-1},{null m=TO_BACK f=FILLS_TASK leash=Surface(name=ActivityRecord{9004586 u0 com.whatsapp/.HomeActivity)/@0xe089f85 sb=Rect(0, 0 - 1080, 2400) eb=Rect(0, 0 - 1080, 2400) d=0}]}
09-16 17:12:50.029  1923  2001 V WindowManager:     startWCT=WindowContainerTransaction { changes = {} hops = [] errorCallbackToken=null taskFragmentOrganizer=null }
09-16 17:12:50.029 24367 24675 V WindowManagerShell: Playing animation for (#344)android.os.BinderProxy@d1bcfc9@0
09-16 17:12:50.029  1923  2001 V WindowManager:     info={id=344 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{null m=OPEN f=FILLS_TASK leash=Surface(name=ActivityRecord{d46a363 u0 com.whatsapp/.Conversation)/@0x78d9ab7 sb=Rect(0, 0 - 0, 0) eb=Rect(0, 0 - 1080, 2400) d=-1->0 r=-1->0:-1},{null m=TO_BACK f=FILLS_TASK leash=Surface(name=ActivityRecord{9004586 u0 com.whatsapp/.HomeActivity)/@0xa8d605b sb=Rect(0, 0 - 1080, 2400) eb=Rect(0, 0 - 1080, 2400) d=0}]}
09-16 17:12:50.029 24367 24675 V WindowManagerShell:  try handler com.android.wm.shell.transition.DefaultMixedHandler@404581c

I hope im not revealing any sensitive data .c.

@rom1v
Copy link
Collaborator

rom1v commented Sep 16, 2024

I have video when I use USB, but when i use tcpip it does not appear!

What is the full output in the console when you run over TCP/IP (including the command you executed)?

@YanYiGe2023
Copy link

YanYiGe2023 commented Sep 17, 2024

What is AP? Sorry, I'm not someone who's used to acronyms or codes, I'm not a programmer. How can I do it?

I mean, you use the computer to open a portable hotspot.(If your computer supports WiFi), and then use your phone to connect to a wireless hotspot on your computer.Ideally, the Internet connection between the phone and the computer will be very stable.

@nikmattos
Copy link
Author

@rom1v What is the full output in the console when you run over TCP/IP (including the command you executed)?
I executed it and the things happens normally

C:\Users\casa1>scrcpy -m640 -b500k --no-audio --video-codec=h264 --video-encoder=OMX.MTK.VIDEO.ENCODER.AVC --audio-codec=flac --audio-encoder=OMX.google.flac.encoder
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.XXX.XX:5555             device  motorola_edge_40_neo
C:\Users\casa1\Documents\programas\scrcpy-win64-v2.7\scrcp... file pushed, 0 skipped. 28.8 MB/s (71200 bytes in 0.002s)
[server] INFO: Device: [motorola] motorola motorola edge 40 neo (Android 14)
INFO: Renderer: direct3d
INFO: Texture: 288x640

Im not sure if i understand, sorry...

I mean, you use the computer to open a portable hotspot.(If your computer supports WiFi), and then use your phone to connect to a wireless hotspot on your computer.Ideally, the Internet connection between the phone and the computer will be very stable.

Hey! I did not know my laptop would have a portable hotspot haha
I tried to use it and... It simply worked well, I simply cant believe lol xD

My phone is not dying, everything goes well!
Im not sure about what happened, but now scrcpy is working normally, I created a hotspot using my laptop to my phone, and I typed the basic and worked!!

My wifi router is Huawei, maybe this has something to do with it.

Thank you so much for your help!! @YanYiGe2023 @rom1v <3

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