udevbe / greenfield

HTML5 Wayland compositor :seedling:
GNU Affero General Public License v3.0
901 stars 27 forks source link

/dev/dri/renderD128 permission denied. (with aside) #114

Closed bresnow closed 1 year ago

bresnow commented 1 year ago

I first had an error log much longer than this .I installed the Nvidia drivers, composed down and back up to see this. I’m weary of changing permissions of my device. But i do find it odd that the other image logs aren’t showing up in the log.

Attaching to compositor-proxy_compositor-proxy_1, compositor-proxy_alacritty_1, compositor-proxy_xterm_1, compositor-proxy_glxgears_1, compositor-proxy_gtk4-demo_1, compositor-proxy_gtk3-demo_1
alacritty_1         | thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (Error loading shared library libXrandr.so.2.2.0: No such file or directory); opening library failed (Error loading shared library libXrandr.so.2: No such file or directory); opening library failed (Error loading shared library libXrandr.so: No such file or directory)" })', /home/buildozer/aports/community/alacritty/src/cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.1/src/platform_impl/linux/mod.rs:619:9
alacritty_1         | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
compositor-proxy_1  | Reading configuration from: /app/dist/config.yaml
compositor-proxy_1  | 
compositor-proxy_1  | (node:1): GStreamer-WARNING **: 13:24:22.786: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.
compositor-proxy_1  | {"level":30,"time":1670160262800,"pid":1,"hostname":"809d8eba39bf","name":"main","msg":"Starting compositor proxy..."}
compositor-proxy_1  | Can't open device path: /dev/dri/renderD128: Permission denied
compositor-proxy_1  | Can't initialize EGL, wl_dmabuf and wl_drm disabled.{"level":30,"time":1670160262805,"pid":1,"hostname":"809d8eba39bf","name":"native-compositor-session","msg":"Listening on: WAYLAND_DISPLAY=\"wayland-0\"."}
compositor-proxy_1  | xserver listening on display :1
compositor-proxy_1  | {"level":30,"time":1670160262806,"pid":1,"hostname":"809d8eba39bf","name":"compositor-proxy-session","msg":"Session created."}
compositor-proxy_1  | {"level":30,"time":1670160262810,"pid":1,"hostname":"809d8eba39bf","name":"main","msg":"Compositor proxy started. Listening on 0.0.0.0:8081"}
compositor-proxy_1  | {"level":30,"time":1670160262966,"pid":1,"hostname":"809d8eba39bf","name":"native-compositor-session","msg":"New Wayland connection."}
compositor-proxy_1  | Spawned Xwayland server, pid 53
compositor-proxy_1  | (WW) Option "-listen" for file descriptors is deprecated
compositor-proxy_1  | Please use "-listenfd" instead.
compositor-proxy_1  | libEGL warning: failed to open /dev/dri/renderD128: Permission denied
compositor-proxy_1  | 
compositor-proxy_1  | libEGL warning: failed to open /dev/dri/renderD128: Permission denied
compositor-proxy_1  | 
compositor-proxy_1  | {"level":30,"time":1670160263456,"pid":1,"hostname":"809d8eba39bf","name":"native-compositor-session","msg":"New Wayland connection."}
compositor-proxy_1  | {"level":30,"time":1670160263458,"pid":1,"hostname":"809d8eba39bf","name":"native-compositor-session","msg":"New Wayland connection."}
compositor-proxy_1  | {"level":30,"time":1670160263852,"pid":1,"hostname":"809d8eba39bf","name":"native-compositor-session","msg":"New Wayland connection."} 

also also I’ve been building a GTK / broadwayd proxy server which led me to this project . Though I have not yet mounted GPU into my containers I also get EGL failures ( on different machines ) . I wonder what I’m missing here.

Zubnix commented 1 year ago

You need to install and configure the nvidia container runtime on the host and set the appropriate permissions inside the container (this won't affect the permissions on your host machine). To do just that, I've modified the docker-compose file with relevant parts commented out this PR: https://github.com/udevbe/greenfield/pull/115/files#diff-16cc61697a8e7853bc71730a86d3382f3de88553247418f6e572b0386018c0a4

bresnow commented 1 year ago

You need to install and configure the nvidia container runtime on the host and set the appropriate permissions inside the container (this won't affect the permissions on your host machine). To do just that, I've modified the docker-compose file with relevant parts commented out this PR: https://github.com/udevbe/greenfield/pull/115/files#diff-16cc61697a8e7853bc71730a86d3382f3de88553247418f6e572b0386018c0a4

I appreciate the reply … you are 100% correct (as well you know). I found this out shortly after my issue post and forgot to append.