[GH-ISSUE #1631] WSL2: GPU not working anymore #908

Closed
opened 2026-04-12 10:35:19 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @mircomir on GitHub (Dec 20, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1631

I updated Ollama to latest version (0.1.17) on a Ubuntu WSL2 and the GPU support is not recognized anymore.
At the end of installation I have the followinf message: "WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode."
Running nvidia-smi:

Wed Dec 20 14:23:15 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.146.01 Driver Version: 537.99 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Quadro P4000 On | 00000000:17:00.0 Off | N/A |
| 46% 34C P8 6W / 105W | 0MiB / 8192MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
| 1 Quadro P2200 On | 00000000:65:00.0 On | N/A |
| 47% 35C P8 5W / 75W | 318MiB / 5120MiB | 3% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+

Originally created by @mircomir on GitHub (Dec 20, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1631 I updated Ollama to latest version (0.1.17) on a Ubuntu WSL2 and the GPU support is not recognized anymore. At the end of installation I have the followinf message: "WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode." Running nvidia-smi: Wed Dec 20 14:23:15 2023 +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.146.01 Driver Version: 537.99 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 Quadro P4000 On | 00000000:17:00.0 Off | N/A | | 46% 34C P8 6W / 105W | 0MiB / 8192MiB | 0% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+ | 1 Quadro P2200 On | 00000000:65:00.0 On | N/A | | 47% 35C P8 5W / 75W | 318MiB / 5120MiB | 3% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+
Author
Owner

@jmorganca commented on GitHub (Jan 10, 2024):

Hi @mircomir would it be possible to try the latest version and let me how it goes? This should be fixed as we've improved how CUDA is detected. You can upgrade by re-running the install script here: https://ollama.ai/download/linux

<!-- gh-comment-id:1885025732 --> @jmorganca commented on GitHub (Jan 10, 2024): Hi @mircomir would it be possible to try the [latest version](https://github.com/jmorganca/ollama/releases/tag/v0.1.19) and let me how it goes? This should be fixed as we've improved how CUDA is detected. You can upgrade by re-running the install script here: https://ollama.ai/download/linux
Author
Owner

@mircomir commented on GitHub (Jan 10, 2024):

Hi @jmorganca. Sure!

ubuntu@CERWS169:~$ sudo curl https://ollama.ai/install.sh | sh
[sudo] password for ubuntu:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0>>> Downloading ollama...
100  8354    0  8354    0     0  22635      0 --:--:-- --:--:-- --:--:-- 22701
######################################################################## 100.0%##O#-#
######################################################################## 100.0%
>>> Installing ollama to /usr/local/bin...
>>> Adding ollama user to render group...
>>> Adding current user to ollama group...
>>> Creating ollama systemd service...
>>> Enabling and starting ollama service...
>>> NVIDIA GPU installed.
ubuntu@CERWS169:~$ ollama --version
ollama version is 0.1.19

The running ollama the GPU are used:

image

It works for me :)

<!-- gh-comment-id:1885117317 --> @mircomir commented on GitHub (Jan 10, 2024): Hi @jmorganca. Sure! ``` ubuntu@CERWS169:~$ sudo curl https://ollama.ai/install.sh | sh [sudo] password for ubuntu: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0>>> Downloading ollama... 100 8354 0 8354 0 0 22635 0 --:--:-- --:--:-- --:--:-- 22701 ######################################################################## 100.0%##O#-# ######################################################################## 100.0% >>> Installing ollama to /usr/local/bin... >>> Adding ollama user to render group... >>> Adding current user to ollama group... >>> Creating ollama systemd service... >>> Enabling and starting ollama service... >>> NVIDIA GPU installed. ubuntu@CERWS169:~$ ollama --version ollama version is 0.1.19 ``` The running ollama the GPU are used: ![image](https://github.com/jmorganca/ollama/assets/19854897/1744c7c3-f6a5-4b34-8c2d-29cbf9ac0a9f) It works for me :)
Author
Owner

@mircomir commented on GitHub (Jan 10, 2024):

PS: thanks!

<!-- gh-comment-id:1885119107 --> @mircomir commented on GitHub (Jan 10, 2024): PS: thanks!
Author
Owner

@abdinal1 commented on GitHub (Jan 13, 2024):

Hi @mircomir would it be possible to try the latest version and let me how it goes? This should be fixed as we've improved how CUDA is detected. You can upgrade by re-running the install script here: https://ollama.ai/download/linux

For me since the new update it does not detect the GPU anymore, before it did without any problems. Im running Ollama on Kaggle enviroment: https://www.kaggle.com/code/aliabdin1/ollama-server

I now get:

2024/01/13 10:22:29 gpu.go:88: Detecting GPU type
2024/01/13 10:22:29 gpu.go:203: Searching for GPU management library libnvidia-ml.so
2024/01/13 10:22:29 gpu.go:248: Discovered GPU libraries: [/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.545.23.08]
t=2024-01-13T10:22:29+0000 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040 allow_hosts=[]
2024/01/13 10:22:29 gpu.go:259: Unable to load CUDA management library /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.545.23.08: nvml vram init failure: 18
2024/01/13 10:22:29 gpu.go:203: Searching for GPU management library librocm_smi64.so
2024/01/13 10:22:29 gpu.go:248: Discovered GPU libraries: []
2024/01/13 10:22:29 routes.go:953: no GPU detected

While before the new update I just got:
2024/01/08 11:55:24 gpu.go:34: Detecting GPU type
2024/01/08 11:55:24 gpu.go:53: Nvidia GPU detected

<!-- gh-comment-id:1890408987 --> @abdinal1 commented on GitHub (Jan 13, 2024): > Hi @mircomir would it be possible to try the [latest version](https://github.com/jmorganca/ollama/releases/tag/v0.1.19) and let me how it goes? This should be fixed as we've improved how CUDA is detected. You can upgrade by re-running the install script here: https://ollama.ai/download/linux For me since the new update it does not detect the GPU anymore, before it did without any problems. Im running Ollama on Kaggle enviroment: https://www.kaggle.com/code/aliabdin1/ollama-server I now get: 2024/01/13 10:22:29 gpu.go:88: Detecting GPU type 2024/01/13 10:22:29 gpu.go:203: Searching for GPU management library libnvidia-ml.so 2024/01/13 10:22:29 gpu.go:248: Discovered GPU libraries: [/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.545.23.08] t=2024-01-13T10:22:29+0000 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040 allow_hosts=[] 2024/01/13 10:22:29 gpu.go:259: Unable to load CUDA management library /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.545.23.08: nvml vram init failure: 18 2024/01/13 10:22:29 gpu.go:203: Searching for GPU management library librocm_smi64.so 2024/01/13 10:22:29 gpu.go:248: Discovered GPU libraries: [] 2024/01/13 10:22:29 routes.go:953: no GPU detected While before the new update I just got: 2024/01/08 11:55:24 gpu.go:34: Detecting GPU type 2024/01/08 11:55:24 gpu.go:53: Nvidia GPU detected
Author
Owner

@mircomir commented on GitHub (Jan 13, 2024):

For me since the new update it does not detect the GPU anymore, before it did without any problems. Im running Ollama on Kaggle enviroment: https://www.kaggle.com/code/aliabdin1/ollama-server

I can confirm that also in WSL2 the installer of v0.20 didn't find the GPU anymore. But when running ollama as a user (ollama run llama) the GPU is used. Evidently there is still something to refine in GPU research :)

root@CERWS169:~# curl https://ollama.ai/install.sh | sh
...
Install complete. Run "ollama" from the command line.
WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode.
root@CERWS169:~# ollama --version
ollama version is 0.1.20
<!-- gh-comment-id:1890431984 --> @mircomir commented on GitHub (Jan 13, 2024): > For me since the new update it does not detect the GPU anymore, before it did without any problems. Im running Ollama on Kaggle enviroment: https://www.kaggle.com/code/aliabdin1/ollama-server I can confirm that also in WSL2 the installer of v0.20 didn't find the GPU anymore. But when running ollama as a user (ollama run llama) the GPU is used. Evidently there is still something to refine in GPU research :) ``` root@CERWS169:~# curl https://ollama.ai/install.sh | sh ... Install complete. Run "ollama" from the command line. WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode. root@CERWS169:~# ollama --version ollama version is 0.1.20 ```
Author
Owner

@abdinal1 commented on GitHub (Jan 13, 2024):

For me since the new update it does not detect the GPU anymore, before it did without any problems. Im running Ollama on Kaggle enviroment: https://www.kaggle.com/code/aliabdin1/ollama-server

I can confirm that also in WSL2 the installer of v0.20 didn't find the GPU anymore. But when running ollama as a user (ollama run llama) the GPU is used. Evidently there is still something to refine in GPU research :)

root@CERWS169:~# curl https://ollama.ai/install.sh | sh
...
Install complete. Run "ollama" from the command line.
WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode.
root@CERWS169:~# ollama --version
ollama version is 0.1.20

I just do a work around now and it works again:
!curl https://ollama.ai/install.sh | sed 's#https://ollama.ai/download#https://github.com/jmorganca/ollama/releases/download/v0.1.17#' | sh

<!-- gh-comment-id:1890751529 --> @abdinal1 commented on GitHub (Jan 13, 2024): > > For me since the new update it does not detect the GPU anymore, before it did without any problems. Im running Ollama on Kaggle enviroment: https://www.kaggle.com/code/aliabdin1/ollama-server > > I can confirm that also in WSL2 the installer of v0.20 didn't find the GPU anymore. But when running ollama as a user (ollama run llama) the GPU is used. Evidently there is still something to refine in GPU research :) > > ``` > root@CERWS169:~# curl https://ollama.ai/install.sh | sh > ... > Install complete. Run "ollama" from the command line. > WARNING: No NVIDIA GPU detected. Ollama will run in CPU-only mode. > root@CERWS169:~# ollama --version > ollama version is 0.1.20 > ``` I just do a work around now and it works again: ` !curl https://ollama.ai/install.sh | sed 's#https://ollama.ai/download#https://github.com/jmorganca/ollama/releases/download/v0.1.17#' | sh `
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#908