remote-android / redroid-doc

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

Fail to detect GPU node due to DebugFS not being mounted #741

Open andylin-hao opened 2 months ago

andylin-hao commented 2 months ago

Describe the bug I was running redroid12_arm64_only on an Alibaba ARM server with NVIDIA T4 GPUs and nouveau driver when I found that redroid counldn't properly detect the GPU node as the gpu_config.sh script didn't find anything in the sys/kernel/debug path.

I then adb shell into redroid and find that the DebugFS is not mounted during boot. dmesg said that mount() failed: Device or resource busy during the mounting command in redroid.common.rc.

I checked the system properties and found a suspicious one named ro.product.debugfs_restrictions.enabled which is set to true. I then compiled redroid on my own and set PRODUCT_SET_DEBUGFS_RESTRICTIONS := false in device.mk and the problem is fixed.

I can also reproduce this on my Windows ARM Laptop with WSL. I'm not sure if you can reproduce this as well. Perhaps it has something to do with the DebugFS policy of Android 12 (https://source.android.com/docs/core/architecture/kernel/using-debugfs-12).

make sure the required kernel modules present

Collect debug logs Sorry I closed my server a while ago and forgot to collect the log. But I collected the log on my ARM Laptop. They are basically the same problem although I'm not expecting to see redroid runs host GPU mode on WSL. Hope it can help. redroid-debug.CGIYpDyb.tar.gz

Screenshots If applicable, add screenshots to help explain your problem.

zhouziyang commented 2 months ago

Yeah, it's a known issue; and should examine drm render node (/dev/dri/renderDxxx) directly. Plan to enhance this.