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

1 Like

Any idea of how to solve this?

I checked logs and think it might be a permissions issue.

Permission failure: android.permission.ACCESS_SURFACE_FLINGER

Hi @Rafael_KC

I didn’t had the time to check better, for now i resolved using the older build RK12, based on Rock5B-Android12-rkr12-20230315-gpt.zip

The problem with this release is that i had to recompile with BoardConfig.mk SF_PRIMARY_DISPLAY_ORIENTATION := 270

in this version the ro.surface_flinger.primary_display_orientation=ORIENTATION_270 in build.prop doesn’t works, in rk14 works correclty so a recompile is not needed.

another disavantage of rk12 is that it has the older kernel and the hdmi->dvi adapters doesn’t works.

Best Regards

1 Like

You are a lifesaver man… thanks a lot.

I have been debugging the rk14 build for ages with no success.

Unfortunately some features don’t work on this RK12 version. Also, it is not running on the new Rock 5B+ board.

So I have to continue trying to make it run on RK14, but your help was essential.