
Intenté verificar la versión de mi controlador nvidia dentro de ubuntu 22.04 instalado en el subsistema WSL2 instalado en Windows 11, sin embargo, recibí el error "Error al inicializar NVML: acceso a la GPU bloqueado por el sistema operativo". Mi objetivo es poder pasar mi RTX 2080 ti (o GTX 1060) a un sistema operativo invitado como FreeBSD. ¿Se puede lograr esto? Espero recibir su apoyo en este tema.
En el sistema operativo host Windows 11 funciona:
# nvidia-smi
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 536.40 Driver Version: 536.40 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1060 3GB WDDM | 00000000:01:00.0 On | N/A |
| 57% 41C P2 25W / 120W | 710MiB / 3072MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
| 1 NVIDIA GeForce RTX 2080 Ti WDDM | 00000000:02:00.0 Off | N/A |
| 31% 40C P8 21W / 250W | 74MiB / 11264MiB | 0% |
+_________________________________________+______________________+______________________|
en el sistema operativo invitado Ubuntu 22.04 no es así:
# nvidia-smi
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system
PERO :
# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Jun_13_19:16:58_PDT_2023
Cuda compilation tools, release 12.2, V12.2.91
Build cuda_12.2.r12.2/compiler.32965470_0
# python3 --version
Python 3.10.7
En ubuntu 22.04 instalé cuda-12.2 siguiendo las instrucciones a continuación:
# wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
# sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
# wget https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda-repo-wsl-ubuntu-12-2-local_12.2.0-1_amd64.deb
# sudo dpkg -i cuda-repo-wsl-ubuntu-12-2-local_12.2.0-1_amd64.deb
# sudo cp /var/cuda-repo-wsl-ubuntu-12-2-local/cuda-*-keyring.gpg /usr/share/keyrings/
# sudo apt-get update
# sudo apt-get -y install nvidia-cuda-toolkit
Instrucciones tomadas de aquí:
Mi PC tiene 2 tarjetas gráficas:
NVIDIA GeForce GTX 1060 3GB
NVIDIA GeForce RTX 2080 Ti
A continuación puede ver la versión del controlador nvidia instalada en Windows 11 para ambas GPU:
También agregué la siguiente línea a /home/marietto/.bashrc and to /root/.bashrc
:
export PATH=/usr/local/cuda-12.2/bin${PATH:+:${PATH}}
y lo hice :
# source /home/marietto/.bashrc
# source /root/.bashrc
Después de haber reiniciado, no sé que más hacer.
Algunos antecedentes:
Versión de Windows = Windows 11 PRO Versión 10.0.22000.2176
Versión WSL = 1.3.11.0
Estoy usando WSL 2
Versión del kernel = 6.1.38-microsoft-estándar
Versión de distribución = Ubuntu 22.10
Versión del núcleo: 5.15.90.2-3
Versión WSLg: 1.0.54
Versión MSRDC: 1.2.4240
Versión Direct3D: 1.608.2-61064218
Versión DXCore: 10.0.25880.1000-230602-1350.main