bk138 / droidVNC-NG

VNC server app for Android that does not require root privileges.
GNU General Public License v2.0
1.31k stars 187 forks source link

Remove small black bar on the right side of the mirrored screen #145

Open iptleo opened 1 year ago

iptleo commented 1 year ago

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG

Describe the bug Small black bar appears on the right side of the screen.

To Reproduce

  1. Started the VNC server on the App.
  2. Connected to the server on my desktop using TigerVNC Viewer client.

Expected Behavior The screen sharing works with no black bar.

Logs/Backtraces

Your environment (please complete the following information):

Additional context

I have this problem on a Motorola Edge 20, also tested on a Motorola Edge 30 Ultra and had the same thing. I could just adjust the size of the client window to match the screen but the true screen has this black bar on the right. Also tested on other clients such as gvncviewer and the problem persisted. Example

bk138 commented 1 year ago

That's intended, see cf78f1813fc085c5106c3baa31f1d3bae9ffb5c8 where it was introduced. It's got to do with how the Android OS provides the screen data, this basically has this pixel row padding to the right for reasons of data word alignment on the CPU and stuff like that.

To keep things fast and simple, we directly use the data provided by Android and don't do any transformation. #127 added those at the cost of extra copies, but needed to be reverted via #139 as it was crashing the server on some devices.

Happy to merge a fast and stable implementation!

iptleo commented 1 year ago

Oh okay, thanks for the explanation.

SatAmnesiac commented 1 day ago

That's intended, see cf78f18 where it was introduced. It's got to do with how the Android OS provides the screen data, this basically has this pixel row padding to the right for reasons of data word alignment on the CPU and stuff like that.

On my Xaoimi M2101K9G (renoir) phone running MIUI 14.0.6, Android 13 the black bar to the right is clearly showing a memory buffer of some kind in the top left (of the bar).

As the phone is operating the data in the displayed memory changes so the pattern in the box changes.

I'm not sure if this is consistent with your description of why the black line is there, so not sure if I should raise it as a separate bug.

droidVNC-NG was downloaded/installed from F-Droid and is 2.7.2 The same happens with the Chicken VNC viewer on MacOS and ultraVNC viewer on Windows.

Screenshot 2024-09-18 at 11 35 17