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

Dex is not filling the Scrcpy window #4157

Closed
2 tasks done
Obsidiannite21 opened this issue Jul 11, 2023 · 16 comments
Closed
2 tasks done

Dex is not filling the Scrcpy window #4157

Obsidiannite21 opened this issue Jul 11, 2023 · 16 comments

Comments

@Obsidiannite21
Copy link

Obsidiannite21 commented Jul 11, 2023

Screenshot 2023-07-11 at 11 17 13 AM

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

Environment

  • OS: [e.g. Debian, Windows, macOS...] macOS
  • scrcpy version: [e.g. 1.12.1] 2.1
  • installation method: [e.g. manual build, apt, snap, brew, Windows release...] brew
  • device model: S23 Ultra
  • Android version: [e.g. 10] 13

Describe the bug
After upgrading to 2.1, when I launch scrcpy --display 2, it gives the following WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
INFO: Renderer: metal

The window is able to be resized but the Dex desktop is much smaller the the actual window. It's easier to understand if you check out the attached screenshot. It is likely related to issue: #4120 but it looks like that was resolved. Am I missing something?

On errors, please provide the output of the console (and adb logcat if relevant).

Please paste terminal output in a code block.

scrcpy 2.1 <https://github.com/Genymobile/scrcpy>
/opt/homebrew/Cellar/scrcpy/2.1/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 48.2 MB/s (56955 bytes in 0.001s)
[server] INFO: Device: [samsung] samsung SM-S918U1 (Android 13)
[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
INFO: Renderer: metal
INFO: Texture: 3088x1440

Please do not post screenshots of your terminal, just post the content as text instead.
@rom1v
Copy link
Collaborator

rom1v commented Jul 11, 2023

After upgrading to 2.1

Did you have the same problem with earlier versions?

If you record (scrcpy --record=file.mp4), are there any black padding in the recorded file like in the screenshot?

As a workaround, does cropping work correctly?

@Obsidiannite21
Copy link
Author

@rom1v No, but to be fair this is the first upgrade I've done since I installed it.

Yes the recorded video contains the black padding like the screenshot.

Yes scrcpy --display 2 --crop=1080:1920:0:0 -e fixes the issue, thank you for the work around!! I was looking for one but didn't see crop.

@nikp123
Copy link

nikp123 commented Jul 13, 2023

I also have the "same-ish" issue it seems, but manifested when using the simulated display mode.

@nikp123
Copy link

nikp123 commented Jul 13, 2023

The issue seems that scrcpy is grabbing the wrong texture size. It takes the resolution of the primary display (aka the phones) rather than of the the display that you're targeting.

@rom1v
Copy link
Collaborator

rom1v commented Jul 13, 2023

It takes the resolution of the primary display (aka the phones) rather than of the the display that you're targeting.

Could you please test on dev branch? #4120 has been fixed since scrcpy v2.1 (808bd14)

@nikp123
Copy link

nikp123 commented Jul 13, 2023

It takes the resolution of the primary display (aka the phones) rather than of the the display that you're targeting.

Could you please test on dev branch? #4120 has been fixed since scrcpy v2.1 (808bd14)

Do I need to build the scrcpy-server part because I am having NDK difficulties.

@rom1v
Copy link
Collaborator

rom1v commented Jul 13, 2023

Do I need to build the scrcpy-server part

Yes, the change impacts scrcpy-server. You don't need the Android NDK to build scrcpy (just the Android SDK).

Anyway, here is a release of the current dev branch:

@nikp123
Copy link

nikp123 commented Jul 13, 2023

Do I need to build the scrcpy-server part

Yes, the change impacts scrcpy-server. You don't need the Android NDK to build scrcpy (just the Android SDK).

Anyway, here is a release of the current dev branch:

Thanks, will test when I get home on my Windows PC (in about 3-4 hours), sorry for the delay

@nikp123
Copy link

nikp123 commented Jul 14, 2023

@rom1v sorry for the additional delay, yes the issue has been fixed.

@rom1v
Copy link
Collaborator

rom1v commented Jul 14, 2023

@Obsidiannite21 Is the issue also fixed for you?

@Obsidiannite21
Copy link
Author

Obsidiannite21 commented Jul 14, 2023

@rom1v How would I install the dev branch using Brew on MacOS?

@rom1v
Copy link
Collaborator

rom1v commented Jul 14, 2023

Take scrcpy-server from the zip (I guess the client changes are not important), and execute:

export SCRCPY_SERVER_PATH=/the/path/to/the/downloaded/scrcpy-server
scrcpy

(adapt the path)

@yougg
Copy link

yougg commented Jul 19, 2023

Do I need to build the scrcpy-server part

Yes, the change impacts scrcpy-server. You don't need the Android NDK to build scrcpy (just the Android SDK).

Anyway, here is a release of the current dev branch:

I'm using Arch Linux and got the same display problem
after got the scrcpy-server extract from the above zip file
and run with it SCRCPY_SERVER_PATH=~/Downloads/scrcpy-win64-v2.1-6-g01d785d9a/scrcpy-server scrcpy --display=2
finally it display correct. thanks so much.

@rom1v
Copy link
Collaborator

rom1v commented Jul 19, 2023

👍 The fix has been released in scrcpy v2.1.1.

@rom1v rom1v closed this as completed Jul 19, 2023
@carcinocron
Copy link

how are you activating Samsung Dex (or Android Desktop)? mine just stays in cellphone mode.

@Obsidiannite21
Copy link
Author

I connect my S23 to a hub that has a monitor attached. That allows me to mirror OR run dex, depending on how you run Scrcpy. Some use fake HDMI dongles. I haven't found a "software" solution to run Dex using Scrcpy but if in your search find one, please let me know.

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