Open viruscamp opened 3 months ago
Actually, we can see they are the same files, even in different distros.
Arch$ sudo chgrp video /dev/dri/card0
Arch$ ls -l /dev/dri/
crw-rw---- 1 root video 226, 0 Mar 7 10:46 card0
crw-rw---- 1 root 110 226, 128 Mar 7 10:46 renderD128
Arch$ stat /dev/dri/card0
File: /dev/dri/card0
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 0,5 Inode: 94 Links: 1 Device type: 226,0
Access: (0660/crw-rw----) Uid: ( 0/ root) Gid: ( 985/ video)
Access: 2024-03-07 10:46:19.750578888 +0800
Modify: 2024-03-07 10:46:19.750578888 +0800
Change: 2024-03-07 10:47:40.876383552 +0800
Birth: -
Ubuntu$ ls -l /dev/dri/
crw-rw---- 1 root 985 226, 0 Mar 7 10:46 card0
crw-rw---- 1 root render 226, 128 Mar 7 10:46 renderD128
Ubuntu$ stat /dev/dri/card0
File: /dev/dri/card0
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 0,5 Inode: 94 Links: 1 Device type: 226,0
Access: (0660/crw-rw----) Uid: ( 0/ root) Gid: ( 985/ UNKNOWN)
Access: 2024-03-07 10:46:19.750578888 +0800
Modify: 2024-03-07 10:46:19.750578888 +0800
Change: 2024-03-07 10:47:40.876383552 +0800
Birth: -
As I know, user distro is a linux namespace under system distro, there is a feature called user_namespaces can be used to mapping groups.
Maybe it as echo '0 1000 1' > /proc/2/gid_map
.
https://www.man7.org/linux/man-pages/man7/user_namespaces.7.html
I've updated my existing Ubuntu 22.04 to 24.04 and facing the the issue.
Windows build number:
10.0.22631.0
Your Distribution version:
Arch and Ubuntu-24.04
Your WSL versions:
WSL Version: 2.0.14.0 Kernel Version: 5.15.133.1-1 WSLg Version: 1.0.59 MSRDC Version: 1.2.4677 Direct3D Version: 1.611.1-81528511 DXCore Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows Version: 10.0.22631.3235
Steps to reproduce:
wsl --shutdown
start Arch, execute the code below, it will be all OK.
start Ubuntu after 1 minute, execute the code below, it will be all OK too.
switch back to Arch and execute the code below, you will found that the group of
/dev/dri/card0
had been the to the gid ofvideo
from the last started distro, and make the current user does not have the access right to/dev/dri/card0
, makevainfo --display drm
failed.WSL logs:
No response
WSL dumps:
No response
Expected behavior:
No response
Actual behavior:
As the reproduce