Glxinfo not showing my nvidia card

Then please uninstall bbswitch+bumblebee.

I did, and right after that I got a different output from nvidia-smi. Look:

# nvidia-smi
Fri Mar 19 10:17:05 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.67       Driver Version: 460.67       CUDA Version: 11.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  GeForce 940M        Off  | 00000000:04:00.0 Off |                  N/A |
| N/A   45C    P0    N/A /  N/A |      0MiB /  2004MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

But after a restart that output is gone again:

# nvidia-smi 
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

And the output of glxinfo -B has never changed at all.

Please create a new nvidia-bug-report.log

Sure!
nvidia-bug-report.log.gz (124.4 KB)

uninstalling bumblebee un-blacklisted nouveau. Please blacklist it using kernel parameter
nouveau.modeset=0

I added it and then ubuntu got stuck in the loading screen forever. I had to remove it again.