-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Unlocking from scrcpy makes scrcpy quit #597
Comments
Is it really related to unlocking? It looks like a "fragile" cable. It never happens in other situations? |
It's on Wifi. I don't know if it happens when connected with a cable and I don't have one to test this at the moment, sorry. |
OK, it's weird that unlocking the device disconnects |
I'm not sure I'm still seeing this. I still think that you may want to implement a workaround for this issue, or not, so feel free to close. Thanks again for scrcpy, very useful! |
It's definitely an
So I'm closing 👍 |
@raphj, in LOS, try going to USB settings in Developer options and select 'No Data Transfer's and keep 'USB debugging' with 'Show USB debugging notification' on. This might help you. This usually happens when you toggle the 'ADB over WiFi Switch' which doesn't allow PC's ADB to initiate the connection. Doing it using the Will surely solve the problem. Next option is to update the ADB to latest version. Hope it helps! |
Also see: #1382 (comment) |
change usb setting to "No Data Transfer's" worked for me |
This fixed it for me as well. Really weird, as in my case I was also connecting wirelessly (wifi). Note: under developer options, the option is called 'Default USB configuration' (Android 11). There is also another 'USB Preferences' menu when searching android settings by 'USB', but that only changes temporarilly the mode when the cable is plugged, after disconnecting the cable the mode is reverted back to the 'Default USB configuration' which is the one that must be changed to 'No Data Transfer' In my case scrcpy was quitting both when locking and unlocking when 'Default USB configuration' was set to 'File Transfer' Is there any explanation for this strange behavior? |
Yes, if the mode is changed between the locked/unlocked mode, it might changes the USB vendor id / product id, causing Check the vendor id and product id with |
Indeed, adb shell disconnectes as well. lsusb doesn't return anything in my case. |
|
Yes, even with cable connected and under root shell |
Me too, after unlocking (screen lock), I need to re.lanch scrcpy |
I solved this problem by changing the default USB configuration to charge only |
I am using scrcpy though Wifi with a phone running LineageOS 16.
When the screen is off and the device is locked, I run scrcpy.
I see the locked screen. Typing the pin code unlocks the phone, and makes scrcpy quit without any error message.
If I am connected to the phone using an adb shell, the session is interrupted too when unlocking.
I y try to re-run scrcpy right after, I get this error:
If I wait a few seconds, scrcpy works again and shows the phone screen, unlocked.
When the device locks itself after inactivity, scrcpy quits (I can reconnect just after).
Should a workaround be implemented in scrcpy to handle this interruption?
The text was updated successfully, but these errors were encountered: