redroid-doc icon indicating copy to clipboard operation
redroid-doc copied to clipboard

Could not connect to ReDroid11 on Arch Linux

Open TTsdzb opened this issue 1 year ago • 10 comments

Describe the bug Followed the instructions in the docs, but adb is always "offline" and could not be connected.

docker run -itd --privileged -v ~/.local/share/redroid/data11:/data -p 5555:5555 --name redroid11 redroid/redroid:11.0.0-latest androidboot.use_memfd=true androidboot.redroid_width=1080 androidboot.redroid_height=1920 androidboot.redroid_dpi=480 androidboot.redroid_fps=60 androidboot.redroid_net_proxy_type=static androidboot.redroid_net_proxy_host=172.17.0.1 androidboot.redroid_net_proxy_port=7890

I've checked the data directory is an empty one.

I have also tried androidboot.use_memfd=1 but it does not work either.

make sure the required kernel modules present

  • grep binder /proc/filesystems 图片
  • grep ashmem /proc/misc (This is and should not present since I'm using zen kernel and memfd)

collect debug logs tmp.PxnYK0EIX2.tar.gz

Screenshots 图片

TTsdzb avatar Jan 06 '24 03:01 TTsdzb

How about software rendering (docker run ... androidboot.redroid_gpu_mode=guest)? Something goes wrong if data partition is empty.

Try start a new container and wait for 5 to 10 seconds before collecting the debug logs (The logcat you provided is overlapped) if still cannot figure out.

zhouziyang avatar Jan 06 '24 04:01 zhouziyang

How about software rendering (docker run ... androidboot.redroid_gpu_mode=guest)? Something goes wrong if data partition is empty.

Try start a new container and collect the debug logs immediately (The logcat you provided is overlapped) if still cannot figure out.

Software rendering is fine and could work properly. However if I switch back to androidboot.redroid_gpu_mode=auto with a non-empty data partition, the same issue still exists.

Could we figure out what's happening here? Software rendering is somehow annoying in performance. Here is a logcat captured immediately:

tmp.2y14umoLRK.tar.gz

It is also worth mentioning that I used to use 11.0.0-230331 with exactly same environment, and it works fine with hardware rendering and empty data directories.

If the problem could not be solved, mention it in the docs for newcomers could also be helpful.

TTsdzb avatar Jan 06 '24 05:01 TTsdzb

Well, it seems something wrong with the graphic software stack (mesa3d, llvm etc.). I will update those libs soon.

BTW, can you provide the GPU platform you tested?

zhouziyang avatar Jan 08 '24 10:01 zhouziyang

Well, it seems something wrong with the graphic software stack (mesa3d, llvm etc.). I will update those libs soon.

BTW, can you provide the GPU platform you tested?

I'm running directly on my physical machine, Legion R7000P 2021, with AMD integrated GPU and NVIDIA GeForce RTX 3060 Laptop. I'm using Arch Linux with linux-zen kernel, with the following drivers:

xf86-video-amdgpu: 23.0.0-1 nvidia-dkms: 545.29.06-1

I'm having these OpenGL libs on my physical machine and they work properly:

mesa: 1:23.3.2-2 lib32-mesa: 1:23.3.2-2 nvidia-utils: 545.29.06-1 lib32-nvidia-utils: 545.29.06-1

I update my software packages every day, so these can be determined to be up-to-date.

Does ReDroid supports NVIDIA proprietary drivers? Maybe I should manually use AMD GPU? I'm willing to perform further tests if you could give me direct instructions.

TTsdzb avatar Jan 08 '24 10:01 TTsdzb

redroid only shares kernel mode drivers with your host. amdgpu should work out of the box; while nouveau (nVidia proprietary drivers not work) probably works on some platforms.

zhouziyang avatar Jan 09 '24 09:01 zhouziyang

How could I specify which GPU to use? I noticed there's an androidboot.redroid_gpu_node but there isn't any description about it.

TTsdzb avatar Jan 09 '24 12:01 TTsdzb

Try docker run ... androidboot.redroid_gpu_node=/dev/dri/renderD128; Try ls /dev/dri and cat /sys/kernel/debug/dri/*/name to identify render node.

zhouziyang avatar Jan 10 '24 07:01 zhouziyang

I tried the following configuration but still cannot connect:

docker run -itd --privileged -v ~/.local/share/redroid/data11:/data -p 5555:5555 --name redroid11 redroid/redroid:11.0.0-latest androidboot.use_memfd=true androidboot.redroid_width=1080 androidboot.redroid_height=1920 androidboot.redroid_dpi=480 androidboot.redroid_fps=60 androidboot.redroid_net_proxy_type=static androidboot.redroid_net_proxy_host=172.17.0.1 androidboot.redroid_net_proxy_port=7890 androidboot.redroid_gpu_mode=host androidboot.redroid_gpu_node=/dev/dri/renderD128

Here's my render node:

图片

图片

Here is a logcat with the command:

tmp.EAFwIh9TGT.tar.gz

TTsdzb avatar Jan 10 '24 09:01 TTsdzb

According to tmp.PxnYK0EIX2.tar.gz (Abort message: 'FORTIFY: pthread_mutex_destroy called on a destroyed mutex (0x706f829ff2f8)'), it seems something wrong with the graphic drivers. I will update them soon.

BTW, please wait 5~10 seconds before collecting debug logs (otherwise, it's not complete).

zhouziyang avatar Jan 10 '24 10:01 zhouziyang

Well, it seems something wrong with the graphic software stack (mesa3d, llvm etc.). I will update those libs soon.

BTW, can you provide the GPU platform you tested?

Can you please provide some guide about how to build these libs? I would like to try mesa 24.1 which is not released yet.

tzmtl avatar May 02 '24 18:05 tzmtl