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

Display 2 now shows black screen. #3925

Closed
2 tasks done
31337-4554551n opened this issue Apr 17, 2023 · 5 comments
Closed
2 tasks done

Display 2 now shows black screen. #3925

31337-4554551n opened this issue Apr 17, 2023 · 5 comments

Comments

@31337-4554551n
Copy link

31337-4554551n commented Apr 17, 2023

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS:pop os 22.04
  • scrcpy version: scrcpy 2.0
  • installation method:git pull, ./install_release.sh
  • device model: Galaxy fold 4
  • Android version:13

Describe the bug
After connecting to adb and running
/usr/local/bin/scrcpy --video-bit-rate 2m --display 2 --window-title 'DexOnLinux' --turn-screen-off --stay-awake
I get a black screen and
[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
Which I didn't get before.

/usr/local/bin/scrcpy --video-bit-rate 2m --display 0 --window-title 'DexOnLinux' --turn-screen-off --stay-awake

Works fine, so it's just the actual dex output having problems
But display 0 doesn't respect the screen off option, so the phone display is always on. Whereas

/usr/local/bin/scrcpy --video-bit-rate 2m --display 2 --window-title 'DexOnLinux' --turn-screen-off --stay-awake

Used to let me use dex and keep the phone off.

I am using a USB c dock with an HDMI display terminator-I believe that is still necessary.

@rom1v
Copy link
Collaborator

rom1v commented Apr 17, 2023

But display 0 doesn't respect the screen off option, so the phone display is always on.

That's unexpected. If you just run scrcpy --turn-screen-off, you don't get the main screen off?

Refs #3716.

[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
Which I didn't get before.

Probably due to a change in the device system. Refs #1238.

@31337-4554551n
Copy link
Author

But display 0 doesn't respect the screen off option, so the phone display is always on.

That's unexpected. If you just run scrcpy --turn-screen-off, you don't get the main screen off?

Refs #3716.

[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
Which I didn't get before.

Probably due to a change in the device system. Refs #1238.

If I just do scrcpy --turn-screen-off it does the display, and turns off the screen. But if the screen is off to begin with, I get a the lock screen, and swiping up gives me a black screen I can't interact with.

@rom1v
Copy link
Collaborator

rom1v commented Apr 17, 2023

Oh, that's probably because an unrelated issue: since Android 12, apps with secure flag may not be mirrored (#36, #2129). With screen turned off or not, the mirrored screen is black on apps which request the system to disable capture. And it seems that your vendor lock screen enables this "secure flag".

@31337-4554551n
Copy link
Author

Oh, that's probably because an unrelated issue: since Android 12, apps with secure flag may not be mirrored (#36, #2129). With screen turned off or not, the mirrored screen is black on apps which request the system to disable capture. And it seems that your vendor lock screen enables this "secure flag".

So the only way for it to work is to start it when it's on? Because any other way you're going through a lock screen?

Ok, what about the main dex issue? Any thoughts?

@31337-4554551n
Copy link
Author

Nevermind, I just have to start dex with the screen initially on.

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

2 participants