/dev/dri/renderD128 is not a device (500)

rekordskratch

Member
Aug 19, 2021
16
3
8
43
Hoping someone can help. Seeing as we can now try out mapping devices directly in the gui, I am getting this error on an intel server runing a Xeon(R) E-2146G.

ls -la /dev/dri gives me

root@pve:~# ls -la /dev/dri/
total 0
drwxr-xr-x 3 root root 100 Jun 11 15:15 .
drwxr-xr-x 18 root root 4400 Jun 11 15:15 ..
drw-rw-rw- 2 root root 60 Jun 11 15:15 by-path
crw-rw-rw- 1 root video 226, 0 Jun 11 15:15 card0
-rw-rw-rw- 1 root root 0 Jun 11 15:15 renderD128

On this machine I have never gotten /dev/dri/renderD128 to pass through though I have tried all the normal advice ie

lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file

On a different AMD powered machine, I have it passing through fine with the above. The output of ls -la is also very different. What could be the issue?
drwxr-xr-x 3 root root 100 Jun 8 17:05 .
drwxr-xr-x 19 root root 4520 Jun 8 17:06 ..
drwxr-xr-x 2 root root 80 Jun 8 17:05 by-path
crw-rw---- 1 root video 226, 0 Jun 8 17:05 card0
crw-rw---- 1 root render 226, 128 Jun 8 17:05 renderD128

On a slightly separate note, I see there has been a gui method for passing devices through to lxc. How does doing it this way differ from doing it with a mount entry in the config file? I did have a look at the docs but can't find anything obvious about this feature.

Interestingly, when I use the gui on the AMD system to pass through /dev/dri/renderD128 it seems to add it just fine although it shows up in the lxc config file a little differently than I'd expect. When I do the same thing on the intel machine I get the error "/dev/dri/renderD128 is not a device (500)"
 
-rw-rw-rw- 1 root root 0 Jun 11 15:15 renderD128
Note that the output of ls on the Intel machine does not show a "c" at the beginning of this line. A "c" stands for a character device and a "b" stands for a block device. Instead there is just a "-" indicating that /dev/dri/renderD128 is just a regular file.

Was the file maybe accidentally created? Is the appropriate driver for this device installed?

On a slightly separate note, I see there has been a gui method for passing devices through to lxc. How does doing it this way differ from doing it with a mount entry in the config file? I did have a look at the docs but can't find anything obvious about this feature.
When using lxc.mount.entry, the device node is bind mounted directly into the container. However when using an unprivileged container, id mapping would need to be set up [1] as well, otherwise the device node would just be mapped to "nobody" inside the container, preventing the container from accessing the device.

On the other hand, when configuring device passthrough in the GUI or with the pct set <vmid> --dev0 path=/dev/dri/renderD128 command, a new device node is created specifically for the container with the correct uid and gid, making the device accessible from within the container.

[1] https://pve.proxmox.com/wiki/Unprivileged_LXC_containers#Using_local_directory_bind_mount_points
 
Hmm yes I suspected that might be the case. I don't recall creating that file but it's possible it was created by a script I have used. I can't see why that would be the case though. In any event, I've deleted the file, I'm going to try installing the drivers from scratch again.

Very interesting about the device passthrough, I'm sure it will prove useful.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!