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

Turn device screen off (keep mirroring) not working with Android 10 #788

Closed
WesleyM77 opened this issue Sep 5, 2019 · 6 comments
Closed

Comments

@WesleyM77
Copy link

I've pressed ctrl+o and it doesn't turn off the screen on my device. Recently updated to Android 10 on Pixel 2 XL.

@rom1v
Copy link
Collaborator

rom1v commented Sep 5, 2019

What about:

scrcpy --turn-screen-off

?

@rom1v rom1v added the screenoff label Sep 5, 2019
@WesleyM77
Copy link
Author

WesleyM77 commented Sep 5, 2019

Nope.

Got this call stack though:

Exception on thread Thread[Thread-1,5,main]
java.lang.AssertionError: java.lang.NoSuchMethodException: android.view.SurfaceControl.getBuiltInDisplay [int]
        at com.genymobile.scrcpy.wrappers.SurfaceControl.getBuiltInDisplay(SurfaceControl.java:82)
        at com.genymobile.scrcpy.Device.setScreenPowerMode(Device.java:164)
        at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:113)
        at com.genymobile.scrcpy.Controller.control(Controller.java:73)
        at com.genymobile.scrcpy.Server$1.run(Server.java:45)
        at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.getBuiltInDisplay [int]
        at java.lang.Class.getMethod(Class.java:2072)
        at java.lang.Class.getMethod(Class.java:1693)
        at com.genymobile.scrcpy.wrappers.SurfaceControl.getBuiltInDisplay(SurfaceControl.java:80)
        ... 5 more

@rom1v
Copy link
Collaborator

rom1v commented Sep 5, 2019

scrcpy --version

#586 #587

@WesleyM77
Copy link
Author

Oof, I was on 1.9. Thought I updated... my bad. Thanks for the extremely quick help!

@agsola
Copy link

agsola commented Sep 19, 2019

I'm on Android 10 and, despite trying to work, and not crashing, the screen doesn't turn off. Instead it shows a weird colorful (like old tv with no image) static image.

I can provide a photo is desired or logs.

@agsola
Copy link

agsola commented Sep 20, 2019

After restarting and updating it does not happens anymore...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants