Uj947nXmRqV2nRaWshKtHzTvckUUpD/ethernally

stay awake error when connecting

Closed this issue · 3 comments

[server] ERROR: Could not change "stay_on_while_plugged_in"
com.genymobile.scrcpy.SettingsException: Could not access settings: put global stay_on_while_plugged_in 7
at com.genymobile.scrcpy.Settings.execSettingsPut(Settings.java:24)
at com.genymobile.scrcpy.Settings.putValue(Settings.java:59)
at com.genymobile.scrcpy.Settings.getAndPutValue(Settings.java:78)
at com.genymobile.scrcpy.Server.initAndCleanUp(Server.java:63)
at com.genymobile.scrcpy.Server.lambda$startInitThread$2(Server.java:168)
at com.genymobile.scrcpy.Server$$ExternalSyntheticLambda3.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:920)
Caused by: java.io.IOException: Command [settings, put, global, stay_on_while_plugged_in, 7] returned with value 255
at com.genymobile.scrcpy.Command.exec(Command.java:16)
at com.genymobile.scrcpy.Settings.execSettingsPut(Settings.java:22)
... 6 more

workaround: temporarily fixed on #22

stay-awake disabled.
per https://github.com/Genymobile/scrcpy/blob/master/doc/device.md:
If the device is not plugged in (i.e. only connected over TCP/IP), --stay-awake has no effect (this is the Android behavior).