[Win11]GPU appears in device manager but not in task manager or nvidia controller - gpu

I tried to use the PCIE m.2 port to attach the RTX4090. I successfully installed the driver for it, and the device manager says it works properly. However, the nvidia-smi couldn't find it. Neither tensorflow and torch could recognize it as cuda device. My laptop is MSI GE66 with Core i9-11980KH and RTX3080(Laptop)(previously disabled). If I use thunderbolt 4 to connect to my GPU, it works fine.

Related

Stopping and starting a deep learning google cloud VM instance causes tensorflow to stop recognizing GPU

I am using the pre-built deep learning VM instances offered by google cloud, with an Nvidia tesla K80 GPU attached. I choose to have Tensorflow 2.5 and CUDA 11.0 automatically installed. When I start the instance, everything works great - I can run:
Import tensorflow as tf
tf.config.list_physical_devices()
And my function returns the CPU, accelerated CPU, and the GPU. Similarly, if I run tf.test.is_gpu_available(), the function returns True.
However, if I log out, stop the instance, and then restart the instance, running the same exact code only sees the CPU and tf.test.is_gpu_available() results in False. I get an error that looks like the driver initialization is failing:
E tensorflow/stream_executor/cuda/cuda_driver.cc:355] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
Running nvidia-smi shows that the computer still sees the GPU, but my tensorflow can’t see it.
Does anyone know what could be causing this? I don’t want to have to reinstall everything when I’m restarting the instance.
Some people (sadly not me) are able to resolve this by setting the following at the beginning of their script/main:
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
I had to reinstall CUDA drivers and from then on it worked even after restarting the instance. You can configure your system settings on NVIDIAs website and it will provide you the commands you need to follow to install cuda. It also asks you if you want to uninstall the previous cuda version (yes!).This is luckily also very fast.
I fixed the same issue with the commands below, taken from https://issuetracker.google.com/issues/191612865?pli=1
gsutil cp gs://dl-platform-public-nvidia/b191551132/restart_patch.sh /tmp/restart_patch.sh
chmod +x /tmp/restart_patch.sh
sudo /tmp/restart_patch.sh
sudo service jupyter restart
Option-1:
Upgrade a Notebooks instance's environment. Refer the link to upgrade.
Notebooks instances that can be upgraded are dual-disk, with one boot disk and one data disk. The upgrade process upgrades the boot disk to a new image while preserving your data on the data disk.
Option-2:
Connect to the notebook VM via SSH and run the commands link.
After execution of the commands, the cuda version will update to 11.3 and the nvidia driver version to 465.19.01.
Restart the notebook VM.
Note: Issue has been solved in gpu images. New notebooks will be created with image version M74. About new image version is not yet updated in google-public-issue-tracker but you can find the new image version M74 in console.

How can i "attach" nvidia gpu card to xp vm in vmware?

I have an old Nvidia gpu card that basically goes unused on my host. So i wanted to attach it to a VMware vm ( Win XP ) and use it the same way i can use a usb stick. How difficult is it to write a device driver to hook VMW's API with Nvidia's API? What open source device drivers are there to do this? Its not for graphics processing but splitting parallel computations up to run faster, hence Mesa project not the right direction...

Caffe and Tensorflow on a Dell 7559 with nvidia optimus technology

I bought a dell 7559 laptop for deep learning. I got ubuntu 16.04 installed on it but I am having trouble getting caffe and tensorflow on it. The laptop used Nvidia Optimus technology to switch between gpu and cpu to save battery usage. I checked the bios to see if I can set it to use only gpu but there is no option for it. Using bumblebee or nvidia-prime didnt work either. I now have ubuntu 16 with mate desktop environment it is preventing from getting the black screen but didnt help with the cuda issue. I was able to install the drivers and cuda but when I build caffe and tensorflow they fail saying that it didnt detect a gpu. And I wasnt able to install opengl. I tried using several versions of nvidia drivers but it didnt help. Any help would be great. thanks.
I think Bumblebee can enable you to run Caffe/Tensorflow in GPU mode. More generally, it also allows you to run other CUDA programs on a laptop with Optimus technology .
When you have installed Bumblebee correctly (tutorial: Bumblebee Wiki for Ubuntu ), you can invoke the Caffe binary by pepending optirun before the caffe binary. So it goes like the following:
optirun ../../caffe-master/build/tools/caffe train --solver=solver.prototxt
This works for the NVidia DIGITS server as well:
optirun ./digits-devserver
In addition, Bumblebee also works on my dual-graphics desktop PC (Intel HD 4600 + GTX 750 Ti) as well. The display on my PC is driven by the Intel HD 4600 through the HDMI port on the motherboard. The NVidia GTX 750 Ti is only used for CUDA programs.
In fact, for my desktop PC, the "nvidia-prime" (it's actually invoked through the command line program prime-select) is used to choose the GPU that drives the desktop. I have the integrated GPU connect to the display with the HDMI port and the NVidia GPU through a DisplayPort. Currently, the DisplayPort is inactive. The display signal comes from the HDMI port.
As far as I understand, PRIME does so by modifying /etc/X11/Xorg.conf to make either the Intel integrated GPU or the NVidia GPU the current display adapter available to X. I think the PRIME settings only makes sense when both GPUs are connected to some display, which means there need not be an Optimus link between the two GPUs like in a laptop (or, for a laptop with a Mux such as Dell Precision M4600, the Optimus is disabled in BIOS).
More information about the Display Mux and Optimus may be found here: Using the NVIDIA Driver with Optimus Laptops
Hope this helps!

TensorFlow isn't using Nvidia

TensorFlow fails to use nvidia card though nvidia driver, cuda toolkit, cudnn installed and configured.
One thing that I suspect is the reason is the nvidia card on my laptop is connected to pci as 3d controller instead of VGA:
00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 07)
Subsystem: ASUSTeK Computer Inc. Skylake Integrated Graphics
Kernel driver in use: i915_bpo
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce 920M] (rev a1)
Subsystem: ASUSTeK Computer Inc. GK208M [GeForce 920M]
Kernel modules: nvidiafb, nouveau, nvidia_304
Even the Nvidia xserver settings don't see the GPU:
Is this true that tensorflow can only use the graphic card as VGA?
After three month, I finally figured out even first what the issue is and resolved it. It turned out to be a nvidia issue with Secure Boot.
Feel obliged to thank jorgemf and Yao Zhang for your help at a time I couldn't even good articulate the problem.
Meanwhile I hope my case can help other people having a same problem.
All started with my attempt to install nvidia driver again today. The installation seemed successful but in the end, it says,
Unable to load the “nvidia-drm” kernel module.
So I thought maybe I could manually load the kernel with
modprobe mvidia-drm
but got an error says something like "required key not applicable". Wonder what that meant so googled a bit. It turned out to be application not registered! So that module has been stopped by Secure Boot!
Went back to boot settings and disabled secure boot. Installed nvidia driver again, successful! Now in Nvidia settings it looks like this:
See now the gpu device shows there.
Head further to install cuda and cudnn. Found this github gist super useful: https://gist.github.com/wangruohui/df039f0dc434d6486f5d4d098aa52d07
Last step, just followed the installation on Tensorflow home page. Tested it did run on GPU!
The take-home message is if you fail to install Nvidia driver on linux system, you probably need to disable Secure Boot. Personal opinion, Windows turned this good idea into a nightmare for linux users!

Can I use the Kinect API on a virtual machine?

This programming guide implies that this is possible, so I figure what the heck.
Right now, though, it doesn't work.
Host OS is Vista 64-bit, VMWare Workstation 6.5.3 is running Windows 7 Enterprise 32-bit.
Installed Software on the VM:
Visual C# 2010 Express
Microsoft Server Speech Platform Runtime
Microsoft Server Speech Recognition Language - Kinect
Microsoft Speech Platform SDK
Kinect for Windows SDK Beta
I plug in the Kinect, the device is recognized by the VM, then I run the Sample Shape Game and it doesn't recognize the device. It says "Plug in the Kinect and try again" which turns out to be error 0x80080014, which leads to
http://social.msdn.microsoft.com/Forums/en-US/kinectsdknuiapi/thread/4da8c75e-9aad-4dc3-bd83-d77ab4cd2f82/
which gives me two things to look at:
is it plugged in with the special cable? yes
are all 4 entries in the Device Manager? no
In the Device Manager, I see a "Microsoft Kinect" group containing Microsoft Kinect Audio Control, Microsoft Kinect Camera and Microsoft Kinect Device, but there is nothing under "Sound, video and game controllers" other than VMware VMaudio. "Kinect USB Audio" should be there.
I'm guessing that there is some further twiddling I have to do with the VMWare USB / hardware options (whatever that tray with the USB / CD / HD / floppy etc icons is called) or some deft combination of rebooting and (un)plugging, but I'm almost out of enthusiasm.
Any ideas? TIA
EDIT: I realized that I had some lingering drivers on my host (Vista) system from OpenKinect. After removing them, I can no longer see the Kinect at all in the VM. Hmm.
There is this on read.me
Virtual machines: You must run applications built with the Kinect for Windows SDK Beta in a native Windows environment. Kinect for Windows applications cannot run in a virtual machine, because the Microsoft Kinect drivers and this SDK Beta must be installed on the computer where the application is running.
just to share that (not really understood how) VM Workstation 8 running in a host win 7 x64 with guest OS Ubuntu 10.04 sucessfully detected and installed Kinect drivers.
I was able to test it with libfreenect (OpenKinect Project) http://openkinect.org/wiki/Getting_Started#Manual_Build_on_Linux
best regards,
I'm late to the party, but we've been running and developing for the Kinect with Windows 7 running under VMWare under Mac OS X Mountain Lion.
I'm not a Computer Scientist, but I thought Turing showed that a universal Touring Machine was basically the same as physical hardware. I've had Distributed COM+ running on 3 or 4 VM's on the same physical hardware, but somehow the Kinect device is different? I don't buy that at all.
The most recent version of Microsoft Kinect for Windows (v1.6, possibly slightly earlier versions) in combination with the "Kinect for Windows" hardware does work inside a virtual machine. I run this setup on a MacBook Pro, Parallels 7 and Windows 7.
Note that a Kinect for Xbox does not work inside a virtual machine.
This page from Microsoft says that the "Kinect for Windows" device should work in a VM, but that the "Kinect for XBOX" does NOT work.
First of all you just need two Things to be installed:
libfreenect
libusb
after that you should set three flags to 0x02 at the line
typedef enum {FREENECT_DEVICE_MOTOR = 0x02,FREENECT_DEVICE_CAMERA = 0x02,FREENECT_DEVICE_AUDIO = 0x02,} freenect_device_flags;
Inside the headerfile located at /usr/local/include/libfreenect libfreenect.h but you will lose the ability to control the movement and the the microphone usage will be disabled so don't even try to access them or your device might get damaged after that you should also set
#define PKTS_PER_XFER 32
#define NUM_XFERS 6
inside your libfreenect/src/usb_libusb10.h file at the linux Line
After that rebuild your libfreenect by
mkdir build
cd build cmake ..
make make install.
Than Restart your virtual System and plug and connect only the Kinect Camera Device and no other Kinect device during start of the VM. When System is up you could test your device is properly working by switching to your previously created libfreenect build directory and go to bin there you run ./freenect-camtest you should get no or only a small number of package losses if a lot of losses occur try restart your vm with the camera device pluged in and already connected to your vm. You might need to active disconnect and connect the Webcam from the VM during startup to receive images this should be done during first seconds of VM Boottime!
Works with Ubuntu 14.04 and Workstation 10 and 11 and 11.1
HOST OS Windows 7 and Kinect SDK installed and Kinectdevice for Windows
Also it seems to be quite unstable you often have to restart your virtual system if you can't receive images from your Kinect. But if you once received images don't unplug device or you won't get data until you reboot virtual system with Kinect Camera connected to it.
=> This actually solved the problem otherwise to much frames get lost and its not possible to display proper image!