m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.96k stars 449 forks source link

black screen when using vaapi with intel gpu #224

Closed Yarn closed 1 year ago

Yarn commented 1 year ago

I'm running docker on an LXD container but I think I have the gpu fully passed through. The /dev/dri folder is visible within the docker container

ls -lh /dev/dri
total 0
crw-rw---- 1 root root 226,   0 Nov 23 03:38 card0
crw-rw-rw- 1 root root 226, 128 Nov 23 03:38 renderD128

I tried VLC and firefox with the same result, I don't see anything helpful in the logs for either. These are the logs for VLC. neko.log

I installed some packages to try to get things to work, one of the pci ones got rid of an error (not sure which) but none of them changed the result.

m1k1o commented 1 year ago

Could you try again with new images?

https://neko.m1k1o.net/#/getting-started/ image

DX37 commented 1 year ago

Could you try again with new images?

https://neko.m1k1o.net/#/getting-started/ image

That worked for me, had same issue.

Yarn commented 1 year ago

I'm still getting a black screen with no obvious error message. I assume these images have NEKO_HWENC: VAAPI by default since it happens with or without that setting now.

m1k1o commented 1 year ago

It has been changed to use by default, you can turn it off using NEKO_HWENC: none.

You could set gst debugging to more verbose to see why its failing, e.g. GST_DEBUG=*:4

Yarn commented 1 year ago

adding that I get some output about Xorg crashing

The error at the end of the log file /home/neko/.local/share/xorg/Xorg.99.0.log inside the container

[761391.567] (II) LoadModule: "void"
[761391.567] (WW) Warning, couldn't open module void
[761391.567] (EE) Failed to load module "void" (module does not exist, 0)
[761391.567] (EE) No input driver matching `void'
[761391.567] (II) Falling back to input driver `libinput'
[761391.567] (II) LoadModule: "libinput"
[761391.567] (WW) Warning, couldn't open module libinput
[761391.567] (EE) Failed to load module "libinput" (module does not exist, 0)
[761391.567] (II) LoadModule: "void"
[761391.567] (WW) Warning, couldn't open module void
[761391.567] (EE) Failed to load module "void" (module does not exist, 0)
[761391.567] (EE) No input driver matching `void'
[761391.567] (II) Falling back to input driver `libinput'
[761391.567] (II) LoadModule: "libinput"
[761391.567] (WW) Warning, couldn't open module libinput
[761391.567] (EE) Failed to load module "libinput" (module does not exist, 0)
hoonlight commented 6 months ago

On my intel n100, the VAAPI method doesn't work in any way. I'm using VAAPI fine on the media server, but on the n.eko I just get a black screen.

neko:
    image: ghcr.io/m1k1o/neko/intel-chromium:latest
    restart: "unless-stopped"
    shm_size: "2gb"
    ports:
      - "8090:8080"
      - "52000-52100:52000-52100/udp"
    cap_add:
      - SYS_ADMIN
    privileged: true
    environment:
      NEKO_SCREEN: '1920x1080@30'
      NEKO_PASSWORD: xxxx
      NEKO_PASSWORD_ADMIN: xxxx
      NEKO_EPR: 52000-52100
      NEKO_NAT1TO1: 192.168.31.xx
      NEKO_HWENC: VAAPI
    devices:
      - /dev/dri:/dev/dri
httpjamesm commented 3 months ago

I'm also still facing this issue with intel-firefox.

version: "3.4"
services:
  neko:
    image: "ghcr.io/m1k1o/neko/intel-firefox:latest"
    restart: "unless-stopped"
    shm_size: "2gb"
    environment:
      NEKO_SCREEN: 1920x1080@30
      NEKO_PASSWORD: neko
      NEKO_PASSWORD_ADMIN: <redacted>
      NEKO_EPR: 52000-52100
      NEKO_ICELITE: 1
      NEKO_NAT1TO1: <redacted>
      NEKO_HWENC: VAAPI
      LIBVA_DRIVER_NAME: i915
    devices:
      - /dev/dri:/dev/dri
      - /dev/fb0:/dev/fb0
    volumes:
      - '${PWD}/data:/home/neko/.mozilla/firefox/'
      - '${PWD}/policies.json:/usr/lib/firefox/distribution/policies.json'
    container_name: neko
    network_mode: "service:gluetun"

Running vainfo within the container returns:

libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'i915'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i915_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit