radxa / manifests

91 stars 38 forks source link

Rock 5B Android_rk12.1 display rotation not working #37

Open mb-tapgest opened 1 year ago

mb-tapgest commented 1 year ago

On latest release display rotation (port, reversed-port, reversed-land) not working.

I try fallows, but noone works:

1. settings put system user_rotation [1,2,3] settings put system accelerometer_rotation 0

2. setprop persist.prop.screenorientation [portrait,seascape,upsideDown]

3. setprop persist.sys.hwrotation [90,180,270]

Raywang80s commented 1 year ago

yeah, i just wanna say this issue too .. i can't find out where to set the hdmi rotattion on the GUI .

Danjuanlab commented 1 year ago

same problem

Raywang80s commented 1 year ago

How to fix it ,anyone have solution?

Danjuanlab commented 1 year ago

How to fix it ,anyone have solution?

no solution,wait for new android image

stoiji commented 11 months ago

any ideas when new android image is arriving? "unsupported sd card" and settings not saving on restart.

kdservice commented 6 months ago

There have been recent commits and there seems to be some movement. It would be helpful if you could also help me solve this rotation problem!

yjxyx commented 6 months ago

The source code needs to be modified. SF_PRIMARY_DISPLAY_ORIENTATION in BoardConfig.mk defines the main display direction.

kdservice commented 6 months ago

Thank you for the information.

I would like to try it. Currently, 'sync' fails midway.

This is my first time using REPO, but I'm still trying.

Checking out projects:  71% (769/1083) rk/hardware/rk35/vibrator_aidlerror: Cannot checkout kernel/prebuilts/5.10/arm64: ManifestInvalidRevisionError: revision Android12_RK3588_Radxa_rk8 in kernel/prebuilts/5.10/arm64 not found
error: in `sync -f -j4`: revision Android12_RK3588_Radxa_rk8 in kernel/prebuilts/5.10/arm64 not found
yjxyx commented 6 months ago

use this: repo init -u https://github.com/radxa/manifests.git -b Android12_RK3588_Radxa_rk12 -m rockchip-s-release.xml

kdservice commented 6 months ago

@yjxyx

Thank you very much for the information.

I was able to make the screen vertical by modifying the following and building.

./device/rockchip/common/BoardConfig.mk:178:SF_PRIMARY_DISPLAY_ORIENTATION ?= 90
./device/rockchip/rk3588/BoardConfig.mk:31:SF_PRIMARY_DISPLAY_ORIENTATION := 90

However, I am having trouble because the touch panel direction remains at 0 degrees. If you know how to solve this problem, could you please let me know?

yjxyx commented 6 months ago

What type of touch device? USB interface? There are generally two ways to adjust:

  1. Modify the corresponding driver file
  2. Adjust the idc file setting direction cd device/rockchip find ./ -name *.idc
kdservice commented 6 months ago

Thank you for your early reply!!

It is connected to an external monitor via HDMI and USB (for touch panels).

I also thought that the idc file was suspicious, but The situation has not been able to be investigated.

Do we actually add the idc file? Should I edit the idc file?

The sample file is something like the following... https://android.googlesource.com/device/google/taimen/+/ee73c28eea6ca17d6e5a21383b54eb281d1d07d5/touchscreen.idc

Please help me a little more.

stoiji commented 6 months ago

idc file alone will not adjust rotation correctly. unless it's more authoratitive since 5 months ago. i was only able to get partial success with the idc file screen_rotation value. looks like this thread has progressed since 5 months ago.

idc file does work for simply recognising the correct resolutions on third party screens. that was very successful, e.g. i have a 8" elecrow screen, i was able to extract the vendor and model, then add a corresponding .idc file. by doing this my touch screen was accurate

kdservice commented 6 months ago

@stoiji

Thank you for your comment!

If you don't mind, could I have a look at that idc file? Also, could you please tell me how you extracted the vendor and model?

please. m(__)m

stoiji commented 6 months ago

u need platform-tools for .adb which can be run in both linux and windows, after that connect over usb and enable usb debugging. from there you need to ./adb root ./adb remount then do ./adb dumpsys input find ur display vendor and product ids, then create a file on your local machine Vendor_YOURVENDORID_Product_YOURPRODUCTID.idc with the contents device.internal=1 then you can ./adb push Vendor_YOURVENDORID_Product_YOURPRODUCTID.idc /system/usr/idc/ then you can do ./adb shell and cd /system/usr/idc and finally ls to view ur file is in the correct folder. reboot and u've got a screen with the correct config.

file contents would be something like this if not identical to

`device.internal = 1

touch.deviceType = touchScreen touch.orientationAware = 1`

kdservice commented 6 months ago

@stoiji

Thank you very much for your prompt reply!

Let's prepare the environment and try it out!

By the way, isn't this something that can be done for general purposes such as HD or 4K? It seems like it would take a lot of effort to adapt it to the customer's environment every time. . . orz

cjcdev commented 6 months ago

@yjxyx

use this: repo init -u https://github.com/radxa/manifests.git -b Android12_RK3588_Radxa_rk12 -m rockchip-s-release.xml

Using that branch and manifest, I get the following errors during sync:

error: Cannot checkout kernel/prebuilts/5.10/arm64: ManifestInvalidRevisionError: revision Android12_RK3588_Radxa_rk8 in kernel/prebuilts/5.10/arm64 not found
Checking out:  76% (832/1083), done in 1m10.803s
error: in `sync -j4`: revision Android12_RK3588_Radxa_rk8 in kernel/prebuilts/5.10/arm64 not found
yjxyx commented 6 months ago

@cjcdev
1.cd .repo/manifests 2.git branch -r //See what the corresponding remote branch is 3.vi commit/commit_release_rkr12_no_remote.xml //Find the corresponding kernel/prebuilts/5.10/arm64 option and remove the clone-depth="1" field 4.repo sync kernel/prebuilts/5.10/arm64

cjcdev commented 6 months ago

@yjxyx

 $ git branch -r
  m/Android12_RK3588_Radxa_rk12 -> origin/Android12_RK3588_Radxa_rk12
  origin/Android11_Radxa_rk10.1
  origin/Android11_Radxa_rk11
  origin/Android11_Radxa_rk11.1
  origin/Android11_Radxa_rk12
  origin/Android12_RK3588_Radxa_rk10
  origin/Android12_RK3588_Radxa_rk12
  origin/Android12_RK3588_Radxa_rk8
  origin/Android12_Radxa_rk14
  origin/Android9_Radxa_AML_r1
  origin/default
  origin/rk3399-all-7.1
  origin/rk3399pro-android-8.1
  origin/rockchip-android-10
  origin/rockpi-box-9.0

Modifying commit_release_rkr12_no_remote.xml didn't fix it.

$ repo sync kernel/prebuilts/5.10/arm64/
Fetching:  0% (0/1) 0:04 | 1 job | 0:04 kernel/prebuilts/5.10/arm64 @ kernel/prebuilts/5.10/arm64
fatal: couldn't find remote ref refs/heads/Android12_RK3588_Radxa_rk8

kernel/prebuilts/5.10/arm64:
fatal: couldn't find remote ref refs/heads/Android12_RK3588_Radxa_rk8
kernel/prebuilts/5.10/arm64: sleeping 4.0 seconds before retrying
fatal: couldn't find remote ref refs/heads/Android12_RK3588_Radxa_rk8
error: Cannot fetch kernel/prebuilts/5.10/arm64 from http://gitlab.com/rockchip_android_s/kernel/prebuilts/5.10/arm64
Fetching: 100% (1/1), done in 4.703s
Fetching:  0% (0/1) 0:04 | 1 job | 0:04 kernel/prebuilts/5.10/arm64 @ kernel/prebuilts/5.10/arm64
fatal: couldn't find remote ref refs/heads/Android12_RK3588_Radxa_rk8

kernel/prebuilts/5.10/arm64:
fatal: couldn't find remote ref refs/heads/Android12_RK3588_Radxa_rk8
kernel/prebuilts/5.10/arm64: sleeping 4.0 seconds before retrying
fatal: couldn't find remote ref refs/heads/Android12_RK3588_Radxa_rk8
error: Cannot fetch kernel/prebuilts/5.10/arm64 from http://gitlab.com/rockchip_android_s/kernel/prebuilts/5.10/arm64
Fetching: 100% (1/1), done in 4.781s
error: Cannot checkout kernel/prebuilts/5.10/arm64: ManifestInvalidRevisionError: revision Android12_RK3588_Radxa_rk8 in kernel/prebuilts/5.10/arm64 not found
error: in `sync kernel/prebuilts/5.10/arm64/`: revision Android12_RK3588_Radxa_rk8 in kernel/prebuilts/5.10/arm64 not found

Why does Android12_RK3588_Radxa_rkr12.xml reference "_rk8"?

<project clone-depth="1" groups="pdk" name="platform/external/chromium-webview" path="external/chromium-webview" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
  <project clone-depth="1" groups="pdk" name="kernel/prebuilts/5.10/arm64" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
  <project clone-depth="1" groups="pdk-fs" name="platform/prebuilts/android-emulator" path="prebuilts/android-emulator" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
  <project clone-depth="1" groups="pdk,darwin" name="platform/prebuilts/clang/host/darwin-x86" path="prebuilts/clang/host/darwin-x86" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
  <project clone-depth="1" groups="pdk" name="platform/prebuilts/clang/host/linux-x86" path="prebuilts/clang/host/linux-x86" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
  <project clone-depth="1" groups="pdk" name="platform/prebuilts/rust" path="prebuilts/rust" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
  <project clone-depth="1" groups="pdk" name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
  <project clone-depth="1" groups="pdk,tools" name="platform/prebuilts/tools" path="prebuilts/tools" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
yjxyx commented 6 months ago

@cjcdev
The downloaded manifest file should be this. It should be rkr12. Did you upgrade from rkr8 to rkr12? https://github.com/radxa/manifests/blob/Android12_RK3588_Radxa_rk12/rockchip-s-release.xml https://github.com/radxa/manifests/blob/Android12_RK3588_Radxa_rk12/Android12_RK3588_Radxa_rkr12.xml https://github.com/radxa/manifests/blob/Android12_RK3588_Radxa_rk12/commit/commit_release_rkr12_no_remote.xml

cjcdev commented 6 months ago

@cjcdev The downloaded manifest file should be this. It should be rkr12. Did you upgrade from rkr8 to rkr12? https://github.com/radxa/manifests/blob/Android12_RK3588_Radxa_rk12/rockchip-s-release.xml https://github.com/radxa/manifests/blob/Android12_RK3588_Radxa_rk12/Android12_RK3588_Radxa_rkr12.xml https://github.com/radxa/manifests/blob/Android12_RK3588_Radxa_rk12/commit/commit_release_rkr12_no_remote.xml

@yjxyx No, I am starting a new workspace with the repo init command you initially sent. Look at the link you just sent me for Android12_RK3588_Radxa_rk12.xml. Scroll to the end of the file and the revisions are set to "Android12_RK3588_Radxa_rk8" for some of the projects.

kdservice commented 6 months ago

@stoiji

Thank you for the information yesterday.

I prepared the environment today and tried it out.

Using the confirmed vendor ID and product ID, I created a file like the one below and built the OS.

dumpsys input :

    1: Melfas LGD AIT Touch Controller
      Classes: TOUCH | TOUCH_MT | LIGHT | EXTERNAL
      Path: /dev/input/event1
      Enabled: true
      Descriptor: acdba4549f26874f356b3b63bd7dbdd43091abf0
      Location: usb-fc800000.usb-1.1.2.1/input0
      ControllerNumber: 0
      UniqueId:
      Identifier: bus=0x0003, vendor=0x1fd2, product=0x6103, version=0x0200
      KeyLayoutFile:
      KeyCharacterMapFile:
      ConfigurationFile:
      VideoDevice: <none>

device/rockchip/rk3588/RadxaRock5B/Vendor_1fd2_Product_6103.idc:

touch.deviceType = touchScreen
device.internal= 1
touch.orientationAware = 1

device/rockchip/rk3588/RadxaRock5B/RadxaRock5B.mk:

:
:
PRODUCT_COPY_FILES += \
        $(LOCAL_PATH)/Vendor_1fd2_Product_6103.idc:$(TARGET_COPY_OUT_SYSTEM)/usr/idc/Vendor_1fd2_Product_6103.idc

However, unfortunately, the touch detection remained at 0 degrees despite the screen orientation being 90 degrees. I also checked with 'adb' that the file was properly placed in '/system/usr/idc'.

Am I doing something wrong? Please give me a lecture.

yjxyx commented 6 months ago

@cjcdev It does look like there are some project definition errors in this manifest file, we will fix them later

cjcdev commented 6 months ago

@yjxyx I was able to move past the sync issues by changing the revision name that is found in gitlab now:

diff --git a/Android12_RK3588_Radxa_rkr12.xml b/Android12_RK3588_Radxa_rkr12.xml
index b903959..99a2061 100644
--- a/Android12_RK3588_Radxa_rkr12.xml
+++ b/Android12_RK3588_Radxa_rkr12.xml
@@ -82,7 +82,7 @@
   <remove-project name="platform/prebuilts/tools" />

   <project clone-depth="1" groups="pdk" name="platform/external/chromium-webview" path="external/chromium-webview" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
-  <project clone-depth="1" groups="pdk" name="kernel/prebuilts/5.10/arm64" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
+  <project clone-depth="1" groups="pdk" name="kernel/prebuilts/5.10/arm64" revision="Android12_Radxa_rk8" upstream="Android12_Radxa_rk8"/>
   <project clone-depth="1" groups="pdk-fs" name="platform/prebuilts/android-emulator" path="prebuilts/android-emulator" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
   <project clone-depth="1" groups="pdk,darwin" name="platform/prebuilts/clang/host/darwin-x86" path="prebuilts/clang/host/darwin-x86" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
   <project clone-depth="1" groups="pdk" name="platform/prebuilts/clang/host/linux-x86" path="prebuilts/clang/host/linux-x86" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
diff --git a/Android12_Radxa_rk12.xml b/Android12_Radxa_rk12.xml
index b77ee93..d908ac1 100644
--- a/Android12_Radxa_rk12.xml
+++ b/Android12_Radxa_rk12.xml
@@ -83,7 +83,7 @@
   <remove-project name="platform/prebuilts/tools" />

   <project clone-depth="1" groups="pdk" name="platform/external/chromium-webview" path="external/chromium-webview" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
-  <project clone-depth="1" groups="pdk" name="kernel/prebuilts/5.10/arm64" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
+  <project clone-depth="1" groups="pdk" name="kernel/prebuilts/5.10/arm64" revision="Android12_Radxa_rk8" upstream="Android12_Radxa_rk8"/>
   <project clone-depth="1" groups="pdk-fs" name="platform/prebuilts/android-emulator" path="prebuilts/android-emulator" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
   <project clone-depth="1" groups="pdk,darwin" name="platform/prebuilts/clang/host/darwin-x86" path="prebuilts/clang/host/darwin-x86" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>
   <project clone-depth="1" groups="pdk" name="platform/prebuilts/clang/host/linux-x86" path="prebuilts/clang/host/linux-x86" revision="Android12_RK3588_Radxa_rk8" upstream="Android12_RK3588_Radxa_rk8"/>