Android rotate screen sets TeamViewer error

I built my custom image from Android12_Radxa_rk14 repository to a Rock 5B board and I changed the screen orientation to 270 because that is how my display is setup in the product.

It works fine, except when I connect via TeamViewer.
The screen is cut in half for the host:

Without rotation, it works fine, both screen and TeamViewer appear correct in landscape.

But when I change to portrait the problem appears.

I managed to make the TeamViewer work as I expect by changing some parameters, but then the screen is in landscape and all streched up.

These are the parameters:
ro.surface_flinger.primary_display_orientation ORIENTATION_0
persist.vendor.framebuffer.main 1080x1920@60
wm size 1080x1920

The result is screen streched in landscape and TeamViewer OK in Portrait


If I change the parameters to:
ro.surface_flinger.primary_display_orientation ORIENTATION_270
persist.vendor.framebuffer.main 1920x1080@60
wm size 1920x1080

The result is screen in portrait OK, but TeamViewer is cut in half.


I tried many ways to keep the screen orientation in landscape and rotate the screen, but I could not make the screen rotate.

Any ideas?

If you want the screen orientation to be 270 when booting up, you can modify the SF-PRIMRY-DIPLAY-Orientation value to 270 in device/dockchip/rk3588/BoardConfig.mk.

Hello Liu Peng, thanks for your reply.

I already changed the screen orientation and it works, but the issue I am facing is when using TeamViewer.

When the screen orientation is 270 the TeamViewer’s Host only shows half the screen:

Regards,

I have the same issue with the latest image Rock5B_Android12_rkr14_20240419-gpt.

I tried also with anydesk, same behaviour. in portrait mode half screen is rendered.

Best Regards