remote-android/redroid-doc

ubuntu use gpu not work

sakura2333 opened this issue · 6 comments

Describe the bug
请详细描述问题(ZH_CN)
A clear and concise description of what the bug is.
run redroid use "- androidboot.redroid_gpu_mode=host" , container is running but adb is down

origin compose works:

version: "3"
services:
  redroid:
    image: redroid/redroid:12.0.0-latest
    stdin_open: true
    tty: true
    privileged: true
    ports:
      - 5513:5555
    volumes:
      - /home/username/containers/redroid/dehua/data:/data 
    command: >
      - androidboot.redroid_width=1080
      - androidboot.redroid_height=1920
      - androidboot.redroid_dpi=320
      - androidboot.redroid_fps=30

when I add "- androidboot.redroid_gpu_mode=host",it not works

version: "3"
services:
  redroid:
    image: redroid/redroid:12.0.0-latest
    stdin_open: true
    tty: true
    privileged: true
    ports:
      - 5513:5555
    volumes:
      - /home/username/containers/redroid/dehua/data:/data 
    command: >
      - androidboot.redroid_width=1080
      - androidboot.redroid_height=1920
      - androidboot.redroid_dpi=320
      - androidboot.redroid_fps=30
      - androidboot.redroid_gpu_mode=host

uname -r 5.15.0-125-generic

docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c9be481876de redroid/redroid:12.0.0-latest "/init qemu=1 androi…" 10 minutes ago Up 9 minutes 0.0.0.0:5513->5555/tcp, [::]:5513->5555/tcp dehua-redroid-1

lsmod | grep virtio virtio_gpu 73728 0 virtio_dma_buf 16384 1 virtio_gpu drm_kms_helper 311296 2 virtio_gpu,nvidia_drm drm 622592 5 drm_kms_helper,nvidia,virtio_gpu,nvidia_drm

telnet localhost 5513 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host.

adb devices List of devices attached localhost:5513 offline

sudo lsof -i -P -n | grep 5513 docker-pr 52270 root 3u IPv4 6167561 0t0 TCP 127.0.0.1:5513->127.0.0.1:46283 (ESTABLISHED) docker-pr 52270 root 4u IPv4 5687989 0t0 TCP *:5513 (LISTEN) docker-pr 52276 root 4u IPv6 5687994 0t0 TCP *:5513 (LISTEN) adb 60759 perilla 4u IPv4 6167560 0t0 TCP 127.0.0.1:46283->127.0.0.1:5513 (ESTABLISHED)

make sure the required kernel modules present
确保必须的内核功能已开启(ZH_CN)

  • grep binder /proc/filesystems
    grep binder /proc/filesystems
    nodev binder
  • grep ashmem /proc/misc (optional)
    grep ashmem /proc/misc
    123 ashmem

Collect debug logs
收集调试日志(ZH_CN)
curl -fsSL https://raw.githubusercontent.com/remote-android/redroid-doc/master/debug.sh | sudo bash -s -- [CONTAINER]
omit CONTAINER if not exist any more.
如容器已退出,可忽略CONTAINER参数(ZH_CN)
redroid-debug.7zforpEz.tgz

Screenshots
截图(ZH_CN)
If applicable, add screenshots to help explain your problem.

nvidia-drm is not supported.
Check #282 (comment) for Nvidia GPU support.

nvidia-drm is not supported. Check #282 (comment) for Nvidia GPU support.

I'm sorry to bother you. I'm not very familiar with Docker and Linux yet. It seems that if I want to enable GPU support, The only way is run Redroid directly on the host machine using QEMU with the Virtio driver, instead of using Docker?

Try setup a Ubuntu VM with virtio-gpu support, then run redroid inside that VM via docker. Or try switch to nouveau kernel driver for Nvidia cards.

Try setup a Ubuntu VM with virtio-gpu support, then run redroid inside that VM via docker. Or try switch to nouveau kernel driver for Nvidia cards.

Is there any way to download redroid system.img,or the only way is build by myself

Try setup a Ubuntu VM with virtio-gpu support, then run redroid inside that VM via docker. Or try switch to nouveau kernel driver for Nvidia cards.

thanks for help。
#248
it works for me

Try setup a Ubuntu VM with virtio-gpu support, then run redroid inside that VM via docker. Or try switch to nouveau kernel driver for Nvidia cards.

thanks for help。 感谢您的帮助。 #248 it works for me 这对我有用

占用大吗 是用的哪个驱动