Skip to content

The resolution goes from 1366x768 to 1360x768 #4949

Closed

Description

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

Environment

  • OS: Debian
  • scrcpy version: 2.4
  • installation method: manual build
  • device model: SM-918B
  • Android version: 14

Describe the bug

The screen resolution is 1366x768, but the texture resolution is set to 1360x768? This makes the screen look really blurry with no way to fix it.

The screen is a virtual screen created from an option called 'Simulate secondary displays' in 'Developer options` with 1080p resolution. Then the resolution is changed through an app called 'SecondScreen' from the play store(I could give more info on the app if needed).

I looked through other people's logs and they also seem to be doing the same thing (only on this resolution).

Is there a way to set it to the correct resolution?

Also thank you for the awesome software!

Output of scrcpy --list-displays:

scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  R5CWC05MXTX                     device  SM_S918B
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 4.5 MB/s (69007 bytes in 0.015s)
[server] INFO: Device: [samsung] samsung SM-S918B (Android 14)
[server] INFO: List of displays:
    --display-id=0    (1440x3088)
    --display-id=27    (1366x768)

Terminal log:

scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  R5CWC05MXTX                     device  SM_S918B
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 7.4 MB/s (69007 bytes in 0.009s)
[server] INFO: Device: [samsung] samsung SM-S918B (Android 14)
[server] WARN: Display doesn't have FLAG_SUPPORTS_PROTECTED_BUFFERS flag, mirroring can be restricted
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.0.3-1pop1~1711635559~22.04~7a9f319
INFO: Trilinear filtering enabled
INFO: Texture: 1360x768
[server] WARN: Could not get initial audio timestamp

image
Im not sure if it is visible from the screenshot :P But you can tell that it is not the right resolution from the tiny 6 pixels worth of black bars around the screenshot.

Activity

  1. rom1v commented on May 27, 2024

    @rom1v
    Collaborator

    Is there a way to set it to the correct resolution?

    Use a resolution multiple of 8. It always rounds down to a multiple of 8 because it is a requirement of many encoders.

  2. niliota commented on May 27, 2024

    @niliota
    Author

    But then I would still not be able to go into fullscreen since the my display's resolution is 1366x768 and it looks really bad with any other resolution. If I change the encoder would that fix it?

    Thank you a lot for replying so fast!

  3. rom1v commented on May 27, 2024

    @rom1v
    Collaborator

    Try removing all roundings (& ~7):

    options.maxSize = Integer.parseInt(value) & ~7; // multiple of 8

    w &= ~7; // in case it's not a multiple of 8
    h &= ~7;
    if (maxSize > 0) {
    if (BuildConfig.DEBUG && maxSize % 8 != 0) {
    throw new AssertionError("Max size must be a multiple of 8");
    }
    boolean portrait = h > w;
    int major = portrait ? h : w;
    int minor = portrait ? w : h;
    if (major > maxSize) {
    int minorExact = minor * maxSize / major;
    // +4 to round the value to the nearest multiple of 8
    minor = (minorExact + 4) & ~7;

  4. niliota commented on May 27, 2024

    @niliota
    Author

    It did work! tysm!
    Why not add the changes to main? Would be too dangerous? Or maybe an option to disable the rounding?

    Anyway, thank you a lot.

  5. rom1v commented on May 27, 2024

    @rom1v
    Collaborator

    Why not add the changes to main?

    I think that many encoders fail with non-multiples of 8 (at least that was the case a few years ago).

    Or maybe an option to disable the rounding?

    Yes, an option --size-rounding= (or with a better name?) would be useful:

    • only accepts powers of two
    • the default would be 8
    • to avoid any rounding, use --size-rounding=1

    Do you want to work on it?

  6. niliota commented on May 27, 2024

    @niliota
    Author

    Sure, I will try.

    You can mark this issue as closed if you want.

  7. rom1v commented on Mar 31, 2026

    @rom1v
    Collaborator

    See #6746.

  8. added a commit that references this issue on Apr 7, 2026
    ae8ecb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions