remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.32k stars 311 forks source link

Mali硬件加速后,特别卡 #614

Closed CuiZhaoHui closed 9 months ago

CuiZhaoHui commented 9 months ago

image

板子是RK3588,系统ubuntu22。 目标是启动硬件加速,使用了别人编好的镜像shangzebei/rk3588,从信息上看应该是成功了一切正常,但是使用时特别卡,从log看似乎是OpenGL渲染的卡顿。 是kernel那边还需要增加什么配置么。我目前配置了

ARM Mali Display Processor
Panfrost (DRM support for ARM Mali Midgard/Bifrost GPUs)

之前redroid会起不来,看log是缺少mali_csffw.bin就下载了一份放到/lib/firmware后启动成功。 logcat:run_gpu.log 感谢!

zhouziyang commented 9 months ago

Seems something wrong with the GPU driver.

0     0 E mali fb000000.gpu: Power transition timed out unexpectedly
0     0 E mali fb000000.gpu: MCU desired = 1
0     0 E mali fb000000.gpu: MCU sw state = 2
0     0 E mali fb000000.gpu: Current state :
0     0 E mali fb000000.gpu: Shader=0000000000000000
0     0 E mali fb000000.gpu: Tiler =0000000000000000
0     0 E mali fb000000.gpu: L2    =0000000000000001
0     0 E mali fb000000.gpu: MCU status = 2
0     0 E mali fb000000.gpu: Cores transitioning :
0     0 E mali fb000000.gpu: Shader=0000000000000000
0     0 E mali fb000000.gpu: Tiler =0000000000000000
0     0 E mali fb000000.gpu: L2    =0000000000000000
0     0 E mali fb000000.gpu: Sending reset to GPU - all running jobs will be lost
0     0 E mali fb000000.gpu: Preparing to soft-reset GPU
0     0 E mali fb000000.gpu: Wait for MCU power on failed on scheduling tick/tock
0     0 E mali fb000000.gpu: Resetting GPU (allowing up to 500 ms)
0     0 E mali fb000000.gpu: Register state:
0     0 E mali fb000000.gpu: GPU_IRQ_RAWSTAT=0x00040000   GPU_STATUS=0x00000000  MCU_STATUS=0x00000002
0     0 E mali fb000000.gpu: JOB_IRQ_RAWSTAT=0x00000000   MMU_IRQ_RAWSTAT=0x00000000   GPU_FAULTSTATUS=0x00000000
0     0 E mali fb000000.gpu: GPU_IRQ_MASK=0x00000000   JOB_IRQ_MASK=0x00000000   MMU_IRQ_MASK=0x00000000
0     0 E mali fb000000.gpu: PWR_OVERRIDE0=0x00000000   PWR_OVERRIDE1=0x00000000
0     0 E mali fb000000.gpu: SHADER_CONFIG=0x00000000   L2_MMU_CONFIG=0x00000000   TILER_CONFIG=0x00000000
0     0 I mali fb000000.gpu: reloading firmware
0     0 E mali fb000000.gpu: Reset complete
felix9ia commented 9 months ago

Is it resolved now?

CuiZhaoHui commented 9 months ago

Is it resolved now?

No,Im trying to work it out...

CuiZhaoHui commented 9 months ago

Is it resolved now?

I got a driver file in this repository ,it works for me. @felix9ia But I don't know how to compile it.

And tks a lot for @zhouziyang Happy new year!

felix9ia commented 9 months ago

@CuiZhaoHui Can you share the docker image you made?

CuiZhaoHui commented 9 months ago

@CuiZhaoHui Can you share the docker image you made?

@felix9ia

docker image : shangzebei/rk3588

my docker run command:

sudo docker run -d --privileged \
--name redroid12 -p 5555:5555 \
-v /mnt/sda/data12:/data \
-v /dev/net/tun:/dev/tun \
-v /dev/mali0:/dev/mali0 \
shangzebei/rk3588 \
androidboot.redroid_gpu_mode=mali
felix9ia commented 9 months ago

@CuiZhaoHui Can you share the docker image you made?

@felix9ia

docker image : shangzebei/rk3588

my docker run command:

sudo docker run -d --privileged \
--name redroid12 -p 5555:5555 \
-v /mnt/sda/data12:/data \
-v /dev/net/tun:/dev/tun \
-v /dev/mali0:/dev/mali0 \
shangzebei/rk3588 \
androidboot.redroid_gpu_mode=mali

So what is the role of this repo libmali-rockchip? Do I need to replace some files on the host machine? Can you explain it in detail? Thanks!

CuiZhaoHui commented 9 months ago

My problem is that the gpu isn't working properly. This repo provides gpu driver,get the right version of your gpu and install it to your board. But Im sorry that I don't event know how to get the right version,there are too many versions. I got my version from an other one.

Cherish-Gww commented 6 months ago

Seems something wrong with the GPU driver.

0     0 E mali fb000000.gpu: Power transition timed out unexpectedly
0     0 E mali fb000000.gpu: MCU desired = 1
0     0 E mali fb000000.gpu: MCU sw state = 2
0     0 E mali fb000000.gpu: Current state :
0     0 E mali fb000000.gpu: Shader=0000000000000000
0     0 E mali fb000000.gpu: Tiler =0000000000000000
0     0 E mali fb000000.gpu: L2    =0000000000000001
0     0 E mali fb000000.gpu: MCU status = 2
0     0 E mali fb000000.gpu: Cores transitioning :
0     0 E mali fb000000.gpu: Shader=0000000000000000
0     0 E mali fb000000.gpu: Tiler =0000000000000000
0     0 E mali fb000000.gpu: L2    =0000000000000000
0     0 E mali fb000000.gpu: Sending reset to GPU - all running jobs will be lost
0     0 E mali fb000000.gpu: Preparing to soft-reset GPU
0     0 E mali fb000000.gpu: Wait for MCU power on failed on scheduling tick/tock
0     0 E mali fb000000.gpu: Resetting GPU (allowing up to 500 ms)
0     0 E mali fb000000.gpu: Register state:
0     0 E mali fb000000.gpu: GPU_IRQ_RAWSTAT=0x00040000   GPU_STATUS=0x00000000  MCU_STATUS=0x00000002
0     0 E mali fb000000.gpu: JOB_IRQ_RAWSTAT=0x00000000   MMU_IRQ_RAWSTAT=0x00000000   GPU_FAULTSTATUS=0x00000000
0     0 E mali fb000000.gpu: GPU_IRQ_MASK=0x00000000   JOB_IRQ_MASK=0x00000000   MMU_IRQ_MASK=0x00000000
0     0 E mali fb000000.gpu: PWR_OVERRIDE0=0x00000000   PWR_OVERRIDE1=0x00000000
0     0 E mali fb000000.gpu: SHADER_CONFIG=0x00000000   L2_MMU_CONFIG=0x00000000   TILER_CONFIG=0x00000000
0     0 I mali fb000000.gpu: reloading firmware
0     0 E mali fb000000.gpu: Reset complete

because mali_csffw.bin is too old. I have tested the mali_csffw.bin in Android13 source tree, have no error, but using download from github, will print those log.

Ybuzhenzhuo commented 5 months ago

我也遇到了同样的问题。请问如何解决。

Cherish-Gww commented 5 months ago

mali_csffw.bin

mali_csffw.bin 固件太旧,用原厂提供的。

Ybuzhenzhuo commented 5 months ago

mali_csffw.bin

mali_csffw.bin 固件太旧,用原厂提供的。

Where can I find this file?

Ybuzhenzhuo commented 5 months ago

mali_csffw.bin

mali_csffw.bin 固件太旧,用原厂提供的。

我的设备不是安卓的,能用安卓的版本吗?

Ybuzhenzhuo commented 5 months ago

mali_csffw.bin

mali_csffw.bin 固件太旧,用原厂提供的。

我的arm设备/lib/firmware/路径下有mali_csffw.bin文件,但是/vendor/etc/firmware/没有mali_csffw.bin文件。 是不是执行如下命令? sudo docker cp redroid:/vendor/etc/firmware/mali_csffw.bin /lib/firmware/ sudo docker restart redroid

Ybuzhenzhuo commented 5 months ago

mali_csffw.bin

mali_csffw.bin 固件太旧,用原厂提供的。

解决了。我从我的RK3588编译环境找到了mali_csffw.bin文件,放到/lib/firmware/路径下面重启就行 了。那两行命令不知道是否有用。

DarkevilPT commented 3 months ago

Guess now we will need a panthor droid driver 😬