-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
1573/Turn the screen back off if it's known to turn on by an action in scrcpy #1577
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
1573/Turn the screen back off if it's known to turn on by an action in scrcpy #1577
Conversation
d559955
to
dfdfb54
Compare
@rom1v Any comments or sth? |
@brunoais Sorry I didn't have the time to test yet. However, as I said in #1573 (comment), I still think this is too "hacky" and may cause problems. For example if 2 scrcpy are started for the same device (this is already a problem for cleanup, but here it's only a one-time problem), or it does not behave the same way if we press power physically or via Ctrl+p, and probably other problems… |
Ah OK. I didn't know whether you didn't have time or it was de-prioritized or forgotten. You are right. The behavior is different between acting directly on the device and on scrcpy. Howeverr if there are more than one instance of scrcpy connected to the same device, I don't see what kind of problem this may really create. What about we get this feature opt-in by running it behind a command line argument, with (hopefully) proper explanation about it? Would that be a good compromise? |
Tested on a low end Android 6 device
(still doesn't have docs for it)
dfdfb54
to
a99dee1
Compare
I made this feature opt-in. |
I quickly tested before my holidays, it worked quite well. I might consider merging with this behavior. But I will do more tests before. But probably not before few weeks. |
Sure. Thank you for keeping me updated. |
Fixes #1573 <#1573> PR #1577 <#1577> Signed-off-by: Romain Vimont <[email protected]>
I acknowledge that it is convenient especially on right-click to turn the screen on (keeping the physical device screen off), even if I took some of your commits and squashed them (I didn't make it optional, so I didn't include
I also suggest to replace The branch is _Also, I will probably rename "screen off" to "power mode off" (for example (The behavior is a bit weird after pressing the physical POWER button: the screen is turned on, but then pressing POWER via scrcpy turns it back off.) I don't know whether I will merge it yet. |
@rom1v I approve all the changes you did. |
PR #1577 <#1577> Fixes #1573 <#1573> Signed-off-by: Romain Vimont <[email protected]>
Merged cf9d449 |
On my phone (cheap phone running Android 6), this hack works.
I was unable to find a decent way to achieve this otherwise.
What do you think? Any better ideas?
closes #1573