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

Can't screening with display off on Android 10 #878

Closed
ImYourGege opened this issue Oct 22, 2019 · 13 comments
Closed

Can't screening with display off on Android 10 #878

ImYourGege opened this issue Oct 22, 2019 · 13 comments

Comments

@ImYourGege
Copy link

Yeah if i put -S on the startup, i cant control the phone with mouse and keyboard.
Also if i start without -S but using ctrl+o. Still freezing after.
Here is the error displayed on cmd:

[server] ERROR: 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 Oct 22, 2019

Even with v1.10?

There are two separate issues with this. One is fixed in v1.10 (#586, #587), the other (#835) is fixed on dev branch.

@Seumi
Copy link

Seumi commented Oct 24, 2019

Even with v1.10?

There are two separate issues with this. One is fixed in v1.10 (#586, #587), the other (#835) is fixed on dev branch.

i also get this problem with my oneplus7pro(android 10, scrcpy v1.10)

PS C:\Windows\System32> scrcpy -S INFO: scrcpy 1.10 https://github.com/Genymobile/scrcpy D:\scrcpy\scrcpy-server.jar: 1 file pushed. 0.1 MB/s (22546 bytes in 0.159s) INFO: Initial texture: 1440x3120 [server] ERROR: Exception on thread Thread[Thread-1,5,main] java.lang.AssertionError: java.lang.reflect.InvocationTargetException at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplayPowerMode(SurfaceControl.java:96) at com.genymobile.scrcpy.Device.setScreenPowerMode(Device.java:165) 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.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplayPowerMode(SurfaceControl.java:94) ... 5 more Caused by: java.lang.IllegalArgumentException: displayToken must not be null at android.view.SurfaceControl.setDisplayPowerMode(SurfaceControl.java:1523) ... 7 more

@ImYourGege
Copy link
Author

Even with v1.10?

There are two separate issues with this. One is fixed in v1.10 (#586, #587), the other (#835) is fixed on dev branch.

Just updated my scrcpy, now its working thanks

@naytonsan
Copy link

naytonsan commented Mar 31, 2020

Hi, someone could be help me?
the "scrcpy -S" command does not work.
I am using Windows 10 with Samsung S9 with android 10.

error

C:\Users\Nayton User\Documents\scrcpy-win64>scrcpy -S
C:\Users\Nayton User\Documents\scrcpy-win64\scrcpy-server.jar: 1 file pushed. 0.4 MB/s (22470 bytes in 0.059s)
INFO: Initial texture: 1440x2960
[server] ERROR: 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

`C:\Users\Nayton User\Documents\scrcpy-win64>scrcpy --version
scrcpy 1.9

dependencies:

  • SDL 2.0.8
  • libavcodec 58.35.100
  • libavformat 58.20.100
  • libavutil 56.22.100`

@rom1v
Copy link
Collaborator

rom1v commented Mar 31, 2020

Which scrcpy version?

@naytonsan
Copy link

naytonsan commented Mar 31, 2020

@rom1v Can you help me?

C:\Users\Nayton User\Documents\scrcpy-win64>scrcpy --version
scrcpy 1.9

dependencies:
 - SDL 2.0.8
 - libavcodec 58.35.100
 - libavformat 58.20.100
 - libavutil 56.22.100

@rom1v
Copy link
Collaborator

rom1v commented Mar 31, 2020

So just use the latest version…

@naytonsan
Copy link

naytonsan commented Mar 31, 2020

@rom1v
Hi, I install [scrcpy-win64-v1.12.1.zip] and worked.(https://github.com/Genymobile/scrcpy/releases/download/v1.12.1/scrcpy-win64-v1.12.1.zip)

However after some time without touching the mirrored screen it goes out. Is it possible to leave the mirrored screen always on?

@ShiverZm
Copy link

hello,i met the similar promble, my HUAWEI phone cannot screen on with display on,and sometime screen off with display on need to try twice,there are some method to solve it ?

@rom1v
Copy link
Collaborator

rom1v commented Sep 17, 2020

@ShiverZm Sorry, I didn't understand. Which version btw?

@ShiverZm
Copy link

i met two problem, first problem:my HUAWEI phone cannot be lighted when i made it display on with screen off; the second,is that,i made it screen off with display on, i need try it twice,cirl+o twice,my HUAWEI is Android 10

@ShiverZm
Copy link

in addition,the cannot-not-light means my screen still off

@rom1v
Copy link
Collaborator

rom1v commented Sep 17, 2020

first problem:my HUAWEI phone cannot be lighted when i made it display on with screen off;

Even with physical power button?

i need try it twice,cirl+o twice

That's probably device-related.

Which version of scrcpy?

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

No branches or pull requests

5 participants