Open eiyooooo opened 1 month ago
Temporary solution: not change the power mode for all physical displays, use SurfaceControl to change only one display instead
My device is being affected by this bug too. @eiyooooo is there a walk-around for this issue? Thanks!
Is there a walk-around for this issue?
Temporary solution: not change the power mode for all physical displays, use SurfaceControl to change only one display instead
git diff diff --git a/server/src/main/java/com/genymobile/scrcpy/Device.java b/server/src/main/java/com/genymobile/scrcpy/Device.java index 8d0ee231..671ef2c5 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Device.java +++ b/server/src/main/java/com/genymobile/scrcpy/Device.java @@ -319,7 +319,8 @@ public final class Device { * @param mode one of the {@code POWER_MODE_*} constants */ public static boolean setScreenPowerMode(int mode) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q + && !(Build.BRAND.toLowerCase() + Build.MANUFACTURER.toLowerCase()).contains("honor")) { // On Android 14, these internal methods have been moved to DisplayControl :
Environment
Describe the bug When server reaching here
https://github.com/Genymobile/scrcpy/blob/206809a99affad9a7aa58fcf7593cea71f48954d/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayControl.java#L31
server get killed, cause by