<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.edegan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Addressing_Ubuntu_NVIDIA_Issues</id>
	<title>Addressing Ubuntu NVIDIA Issues - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.edegan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Addressing_Ubuntu_NVIDIA_Issues"/>
	<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Addressing_Ubuntu_NVIDIA_Issues&amp;action=history"/>
	<updated>2026-05-12T21:26:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Addressing_Ubuntu_NVIDIA_Issues&amp;diff=25918&amp;oldid=prev</id>
		<title>Ed: Created page with &quot;This page provides information on how to address NVIDIA driver issues under Ubuntu 18.04. However, the objective is not to provide a step-by-step set of instructions to addres...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Addressing_Ubuntu_NVIDIA_Issues&amp;diff=25918&amp;oldid=prev"/>
		<updated>2019-07-17T16:35:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This page provides information on how to address NVIDIA driver issues under Ubuntu 18.04. However, the objective is not to provide a step-by-step set of instructions to addres...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page provides information on how to address NVIDIA driver issues under Ubuntu 18.04. However, the objective is not to provide a step-by-step set of instructions to address one particular issue. Instead, it lays out the general process and commonly-used command line tools to debug video (and other) driver issues.&lt;br /&gt;
&lt;br /&gt;
==The Boot Process==&lt;br /&gt;
&lt;br /&gt;
The following things happen at boot: &lt;br /&gt;
*BIOS enumerates/checks hardware -- make sure Secure Boot is disabled!&lt;br /&gt;
*The MBR (if you have one) contains GRUB, which is called. We shouldn't be using UEFI if we want unsigned NVIDIA drivers to work.&lt;br /&gt;
**Edit /etc/default/grub and run update-grub to alter /boot/grub/grub.cfg (note that there is also /etc/grub.d)&lt;br /&gt;
*Then it's the Kernel's turn! Kernel images are in /boot. &lt;br /&gt;
**Find which one is being used by running uname -r or doing cat /proc/version or dmesg | grep ubuntu. &lt;br /&gt;
*The Kernel loads initramfs first (a mini OS), which is also stored in /boot. It can be updated with update-initramfs. &lt;br /&gt;
**initramfs decides which kernel modules are going to be loaded. Use modprobe to alter the list then update-initramfs.&lt;br /&gt;
**/etc/modules-load.d/modules.conf can provide a list of modules or can be blank&lt;br /&gt;
**lsmod lists loaded modules, depmod -n lists module dependencies, modinfo provides info. Loaded modules are in cat /proc/modules.&lt;br /&gt;
*Kernel messages are in /var/log/kern.log (as well as in /var/log/syslog). &lt;br /&gt;
**View them with dmesg, cat /var/log/kern.log, and journalctl -b (messages since last boot). Note that cat /proc/kmsg shows nothing and var/log/syslog is a log for rsyslog. &lt;br /&gt;
*Init, or rather systemd, then takes over and the machine goes from runlevel to runlevel, eventually bringing up your Xwindowing system, if you have one.&lt;br /&gt;
**/etc/rc.local is called last. For later versions of NVIDIA drivers you'll need /usr/bin/nvidia-persistenced --verbose here.&lt;br /&gt;
&lt;br /&gt;
The boot process matters because video drivers are loaded in the kernel phase. If you change which modules are loaded manually (dpkg, apt-get and most scripts will do it for you), you'll need to update-initramfs.&lt;br /&gt;
&lt;br /&gt;
==Useful Commands==&lt;br /&gt;
&lt;br /&gt;
Here's a list of useful commands to diagnose your issues:&lt;br /&gt;
 vi /etc/default/grub&lt;br /&gt;
 update-grub&lt;br /&gt;
 uname -r&lt;br /&gt;
 cat /proc/version &lt;br /&gt;
 update-initramfs&lt;br /&gt;
 cat /var/log/kern.log&lt;br /&gt;
 dmesg&lt;br /&gt;
 cat /proc/kmsg&lt;br /&gt;
 less var/log/syslog&lt;br /&gt;
 journalctl -b &lt;br /&gt;
 lsmod | grep video&lt;br /&gt;
 modinfo asus_wmi&lt;br /&gt;
 find /lib/modules/$(uname -r) -type f -name '*.ko'shui&lt;br /&gt;
 modprobe nvidiafb&lt;br /&gt;
 &lt;br /&gt;
==Finding hardware==&lt;br /&gt;
&lt;br /&gt;
If your videa card is installed in PCI slot and visible to OS it will show up in:&lt;br /&gt;
&lt;br /&gt;
 lspci -vk&lt;br /&gt;
&lt;br /&gt;
and in&lt;br /&gt;
 lshw -c video&lt;br /&gt;
&lt;br /&gt;
===Example Hardware Check===&lt;br /&gt;
&lt;br /&gt;
Checking that the hardware is being seen on the first build of the [[DIGITS DevBox]]:&lt;br /&gt;
 lspci -vk&lt;br /&gt;
 &lt;br /&gt;
 05:00.0 VGA compatible controller: NVIDIA Corporation GP102 [TITAN Xp] (rev a1)              (prog-if 00 [VGA controller])&lt;br /&gt;
        Subsystem: NVIDIA Corporation GP102 [TITAN Xp]&lt;br /&gt;
        Flags: bus master, fast devsel, latency 0, IRQ 78, NUMA node 0&lt;br /&gt;
        Memory at fa000000 (32-bit, non-prefetchable) [size=16M]&lt;br /&gt;
        Memory at c0000000 (64-bit, prefetchable) [size=256M]&lt;br /&gt;
        Memory at d0000000 (64-bit, prefetchable) [size=32M]&lt;br /&gt;
        I/O ports at d000 [size=128]&lt;br /&gt;
        Expansion ROM at 000c0000 [disabled] [size=128K]&lt;br /&gt;
        Capabilities: [60] Power Management version 3&lt;br /&gt;
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+&lt;br /&gt;
        Capabilities: [78] Express Legacy Endpoint, MSI 00&lt;br /&gt;
        Capabilities: [100] Virtual Channel&lt;br /&gt;
        Capabilities: [250] Latency Tolerance Reporting&lt;br /&gt;
        Capabilities: [128] Power Budgeting &amp;lt;?&amp;gt;&lt;br /&gt;
        Capabilities: [420] Advanced Error Reporting&lt;br /&gt;
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024&lt;br /&gt;
        Capabilities: [900] #19&lt;br /&gt;
        Kernel driver in use: nouveau&lt;br /&gt;
        Kernel modules: nvidiafb, nouveau&lt;br /&gt;
  &lt;br /&gt;
 06:00.0 VGA compatible controller: NVIDIA Corporation Device 1e02 (rev a1) (prog             -if 00 [VGA controller])&lt;br /&gt;
        Subsystem: NVIDIA Corporation Device 12a3&lt;br /&gt;
        Flags: fast devsel, IRQ 24, NUMA node 0&lt;br /&gt;
        Memory at f8000000 (32-bit, non-prefetchable) [size=16M]&lt;br /&gt;
        Memory at a0000000 (64-bit, prefetchable) [size=256M]&lt;br /&gt;
        Memory at b0000000 (64-bit, prefetchable) [size=32M]&lt;br /&gt;
        I/O ports at c000 [size=128]&lt;br /&gt;
        Expansion ROM at f9000000 [disabled] [size=512K]&lt;br /&gt;
        Capabilities: [60] Power Management version 3&lt;br /&gt;
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+&lt;br /&gt;
        Capabilities: [78] Express Legacy Endpoint, MSI 00&lt;br /&gt;
        Capabilities: [100] Virtual Channel&lt;br /&gt;
        Capabilities: [250] Latency Tolerance Reporting&lt;br /&gt;
        Capabilities: [258] L1 PM Substates&lt;br /&gt;
        Capabilities: [128] Power Budgeting &amp;lt;?&amp;gt;&lt;br /&gt;
        Capabilities: [420] Advanced Error Reporting&lt;br /&gt;
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024&lt;br /&gt;
        Capabilities: [900] #19&lt;br /&gt;
        Capabilities: [bb0] #15&lt;br /&gt;
        Kernel modules: nvidiafb, nouveau&lt;br /&gt;
&lt;br /&gt;
This looks good. The second card is the Titan RTX (see https://devicehunt.com/view/type/pci/vendor/10DE/device/1E02).&lt;br /&gt;
&lt;br /&gt;
==Altering GRUB==&lt;br /&gt;
&lt;br /&gt;
If you didn't use the HWE version of Ubuntu, you might get the dreaded screen freeze or black screen on boot when the video drivers are loaded. Fix that by booting to a terminal and doing:&lt;br /&gt;
 vi /etc/default/grub&lt;br /&gt;
  GRUB_DEFAULT=0&lt;br /&gt;
  GRUB_TIMEOUT_STYLE=hidden&lt;br /&gt;
  GRUB_TIMEOUT=2&lt;br /&gt;
  GRUB_DISTRIBUTOR=`lsb_release -i -s 2&amp;gt; /dev/null || echo Debian`&lt;br /&gt;
  GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;nvidia-drm.modeset=1&amp;quot;&lt;br /&gt;
  GRUB_CMDLINE_LINUX=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 update-grub&lt;br /&gt;
  Sourcing file `/etc/default/grub'&lt;br /&gt;
  Generating grub configuration file ...&lt;br /&gt;
  Found linux image: /boot/vmlinuz-4.18.0-25-generic&lt;br /&gt;
  Found initrd image: /boot/initrd.img-4.18.0-25-generic&lt;br /&gt;
  Found linux image: /boot/vmlinuz-4.18.0-20-generic&lt;br /&gt;
  Found initrd image: /boot/initrd.img-4.18.0-20-generic&lt;br /&gt;
  Found linux image: /boot/vmlinuz-4.18.0-18-generic&lt;br /&gt;
  Found initrd image: /boot/initrd.img-4.18.0-18-generic&lt;br /&gt;
  Found linux image: /boot/vmlinuz-4.15.0-54-generic&lt;br /&gt;
  Found initrd image: /boot/initrd.img-4.15.0-54-generic&lt;br /&gt;
  Found memtest86+ image: /boot/memtest86+.elf&lt;br /&gt;
  Found memtest86+ image: /boot/memtest86+.bin&lt;br /&gt;
  device-mapper: reload ioctl on osprober-linux-nvme0n1p1  failed: Device or resource busy&lt;br /&gt;
   Command failed&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
See https://askubuntu.com/questions/1048274/ubuntu-18-04-stopped-working-with-nvidia-drivers&lt;br /&gt;
&lt;br /&gt;
==Secure Boot==&lt;br /&gt;
&lt;br /&gt;
Don't use UEFI and don't use Secure Boot, unless you can use only signed production level drivers (which isn't going to happen). To check that aren't using secure boot, in /boot:&lt;br /&gt;
&lt;br /&gt;
 grep CONFIG_MODULE_SIG_ALL config-4.18.0-25-generic&lt;br /&gt;
  CONFIG_MODULE_SIG_ALL=y&lt;br /&gt;
 grep CONFIG_MODULE_SIG_FORCE config-4.18.0-25-generic&lt;br /&gt;
  # CONFIG_MODULE_SIG_FORCE is not set&lt;br /&gt;
&lt;br /&gt;
Check the Kernel log to see if an unsigned module is tainting the kernel and if that's an issue&lt;br /&gt;
vi  /var/log/kern.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Drivers==&lt;br /&gt;
&lt;br /&gt;
Remember that Tensorflow uses CUDA, which in turn uses the video driver, so you should fix things in order!&lt;br /&gt;
&lt;br /&gt;
If you want to install the latest driver from the ppm, you might need to update your repo list. Current repos are in &lt;br /&gt;
 /etc/apt/sources.list.d/&lt;br /&gt;
&lt;br /&gt;
If Launchpad ppm was already added as a repo then you can:&lt;br /&gt;
 cat /etc/apt/sources.list.d/graphics-drivers-ubuntu-ppa-bionic.list&lt;br /&gt;
&lt;br /&gt;
See drivers from all of your repos with:&lt;br /&gt;
 ubuntu-drivers devices&lt;br /&gt;
&lt;br /&gt;
===Module Diagnostics===&lt;br /&gt;
&lt;br /&gt;
This section contains some notes from the depth of my problems:&lt;br /&gt;
&lt;br /&gt;
lspci -vk shows Kernel modules: nvidiafb, nouveau and no Kernel driver in use.&lt;br /&gt;
&lt;br /&gt;
It looks like nouveau is still blacklisted in /etc/modprobe.d/blacklist-nouveau.conf and /usr/bin/nvidia-persistenced --verbose is still being called in /etc/rc.local. ubuntu-drivers devices returns exactly what it did before we installed CUDA 10.1 too...&lt;br /&gt;
&lt;br /&gt;
There is no /proc/driver/nvidia folder, and therefore no /proc/driver/nvidia/version file found. We get the following:&lt;br /&gt;
 /usr/bin/nvidia-persistenced --verbose&lt;br /&gt;
 nvidia-persistenced failed to initialize. Check syslog for more details.&lt;br /&gt;
 tail /var/log/syslog&lt;br /&gt;
 ...Jul  9 13:35:56 bastard kernel: [ 5314.526960] pcieport 0000:00:02.0:    [12] Replay Timer Timeout&lt;br /&gt;
 ...Jul  9 13:35:56 bastard nvidia-persistenced: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 0 has read and write permissions for those files.&lt;br /&gt;
 ls /dev/ &lt;br /&gt;
 ...reveals no nvidia devices&lt;br /&gt;
 &lt;br /&gt;
 nvidia-smi&lt;br /&gt;
 ...NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.&lt;br /&gt;
&lt;br /&gt;
 grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*&lt;br /&gt;
 .../etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb&lt;br /&gt;
 .../etc/modprobe.d/nvidia-installer-disable-nouveau.conf:# generated by nvidia-installer&lt;br /&gt;
&lt;br /&gt;
modprobe --resolve-alias nvidiafb&lt;br /&gt;
modinfo $(modprobe --resolve-alias nvidiafb)&lt;br /&gt;
&lt;br /&gt;
 lsof +D /usr/lib/xorg/modules/drivers/&lt;br /&gt;
 COMMAND  PID USER  FD   TYPE DEVICE SIZE/OFF     NODE NAME&lt;br /&gt;
 Xorg    2488 root mem    REG   8,49    23624 26346422 /usr/lib/xorg/modules/drivers/fbdev_drv.so&lt;br /&gt;
 Xorg    2488 root mem    REG   8,49    90360 26347089 &lt;br /&gt;
 /usr/lib/xorg/modules/drivers/modesetting_drv.so&lt;br /&gt;
 Xorg    2488 root mem    REG   8,49   217104 26346424 /usr/lib/xorg/modules/drivers/nouveau_drv.so&lt;br /&gt;
 Xorg    2488 root mem    REG   8,49  7813904 26346043 /usr/lib/xorg/modules/drivers/nvidia_drv.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Determine and Set Driver===&lt;br /&gt;
&lt;br /&gt;
You can use the application NVIDIA prime:&lt;br /&gt;
 apt-get install nvidia-prime&lt;br /&gt;
 prime-select nvidia&lt;br /&gt;
  Info: the nvidia profile is already set&lt;br /&gt;
&lt;br /&gt;
==Paths==&lt;br /&gt;
&lt;br /&gt;
You can also use ldconfig to add the LD Library Path:&lt;br /&gt;
 vi /etc/ld.so.conf.d/cuda.conf&lt;br /&gt;
  /usr/local/cuda-10.0/lib64 &lt;br /&gt;
 ldconfig &lt;br /&gt;
&lt;br /&gt;
Export paths by setting the global environment&lt;br /&gt;
 vi /etc/environment&lt;br /&gt;
  PATH=&amp;quot;/home/researcher/anaconda3/bin:/home/researcher/anaconda3/condabin:/usr/local/cuda-10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games&amp;quot;&lt;br /&gt;
  LD_LIBRARY_PATH=&amp;quot;/usr/local/cuda-10.0/lib64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now there is no need to activate a custom environment! Alternatively:&lt;br /&gt;
 export PATH=/usr/local/cuda-10.0/bin:/usr/local/cuda-10.0${PATH:+:${PATH}}&lt;br /&gt;
 export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}&lt;br /&gt;
 export PYTHONPATH=/your/tensorflow/path:$PYTHONPATH&lt;br /&gt;
&lt;br /&gt;
==Persistenced==&lt;br /&gt;
&lt;br /&gt;
For CUDA 10.1, we need nvidia-persistenced to be run at boot, so:&lt;br /&gt;
 vi /etc/rc.local&lt;br /&gt;
  #!/bin/sh -e&lt;br /&gt;
  /usr/bin/nvidia-persistenced --verbose&lt;br /&gt;
  exit 0&lt;br /&gt;
 chmod +x /etc/rc.local&lt;br /&gt;
&lt;br /&gt;
For CUDA 10.0, it runs as a service and is set up and launched by the script.&lt;br /&gt;
 /usr/bin/nvidia-persistenced --verbose&lt;br /&gt;
  nvidia-persistenced failed to initialize. Check syslog for more details.&lt;br /&gt;
&lt;br /&gt;
	Jul 11 21:08:20 bastard sshd[3708]: Did not receive identification string from 94.190.53.14 port 3135&lt;br /&gt;
	Jul 11 21:10:25 bastard nvidia-persistenced[3714]: Verbose syslog connection opened&lt;br /&gt;
	Jul 11 21:10:25 bastard nvidia-persistenced[3714]: Directory /var/run/nvidia-persistenced will not be removed on exit&lt;br /&gt;
	Jul 11 21:10:25 bastard nvidia-persistenced[3714]: Failed to lock PID file: Resource temporarily unavailable&lt;br /&gt;
	Jul 11 21:10:25 bastard nvidia-persistenced[3714]: Shutdown (3714)&lt;br /&gt;
&lt;br /&gt;
To check it is already running:&lt;br /&gt;
 ps aux | grep persistenced&lt;br /&gt;
  nvidia-+  2183  0.0  0.0  17324  1552 ?        Ss   10:09   0:00 /usr/bin/nvidia-persistenced --user nvidia-persistenced --no-persistence-mode --verbose&lt;br /&gt;
  root      3539  0.0  0.0  14428  1000 pts/0    S+   10:10   0:00 grep --color=auto persistenced&lt;br /&gt;
&lt;br /&gt;
And to see it is a service:&lt;br /&gt;
 systemctl list-units --type service --all | grep nvidia&lt;br /&gt;
  nvidia-persistenced.service           loaded    active   running NVIDIA Persistence Daemon&lt;br /&gt;
&lt;br /&gt;
==XWindows==&lt;br /&gt;
&lt;br /&gt;
To diagnose XWindow issues:&lt;br /&gt;
 cat /var/log/Xorg.0.log&lt;br /&gt;
  ] (II) LoadModule: &amp;quot;nvidia&amp;quot;&lt;br /&gt;
  [    29.047] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so&lt;br /&gt;
  [    29.047] (II) Module nvidia: vendor=&amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
  [    29.047]    compiled for 4.0.2, module version = 1.0.0&lt;br /&gt;
  [    29.047]    Module class: X.Org Video Driver&lt;br /&gt;
  [    29.047] (II) NVIDIA dlloader X Driver  410.48  Thu Sep  6 06:27:34 CDT 2018&lt;br /&gt;
  [    29.047] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs&lt;br /&gt;
  [    29.047] (II) Loading sub module &amp;quot;fb&amp;quot;&lt;br /&gt;
  [    29.047] (II) LoadModule: &amp;quot;fb&amp;quot;&lt;br /&gt;
  [    29.047] (II) Loading /usr/lib/xorg/modules/libfb.so&lt;br /&gt;
  [    29.047] (II) Module fb: vendor=&amp;quot;X.Org Foundation&amp;quot;&lt;br /&gt;
  [    29.047]    compiled for 1.19.6, module version = 1.0.0&lt;br /&gt;
  [    29.047]    ABI class: X.Org ANSI C Emulation, version 0.4&lt;br /&gt;
  [    29.047] (II) Loading sub module &amp;quot;wfb&amp;quot;&lt;br /&gt;
  [    29.047] (II) LoadModule: &amp;quot;wfb&amp;quot;&lt;br /&gt;
  [    29.047] (II) Loading /usr/lib/xorg/modules/libwfb.so&lt;br /&gt;
  [    29.048] (II) Module wfb: vendor=&amp;quot;X.Org Foundation&amp;quot;&lt;br /&gt;
  [    29.048]    compiled for 1.19.6, module version = 1.0.0&lt;br /&gt;
  [    29.048]    ABI class: X.Org ANSI C Emulation, version 0.4&lt;br /&gt;
  [    29.048] (II) Loading sub module &amp;quot;ramdac&amp;quot;&lt;br /&gt;
  [    29.048] (II) LoadModule: &amp;quot;ramdac&amp;quot;&lt;br /&gt;
  [    29.048] (II) Module &amp;quot;ramdac&amp;quot; already built-in&lt;br /&gt;
  [    29.095] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the&lt;br /&gt;
  [    29.095] (EE) NVIDIA:     system's kernel log for additional error messages and&lt;br /&gt;
  [    29.095] (EE) NVIDIA:     consult the NVIDIA README for details.&lt;br /&gt;
  [    29.095] (EE) No devices detected.&lt;br /&gt;
&lt;br /&gt;
To use nvidia settings, you have to be on the box. Doing it over SSH will get you:&lt;br /&gt;
 nvidia-settings --query FlatpanelNativeResolution&lt;br /&gt;
  Unable to init server: Could not connect: Connection refused&lt;br /&gt;
&lt;br /&gt;
==Tensorflow in Conda==&lt;br /&gt;
&lt;br /&gt;
It turns out that tensorflow 1.13.1 doesn't work with CUDA 10.1! But there is a work around, which is to install cuda10 in conda only (see https://github.com/tensorflow/tensorflow/issues/26182). We are also going to leave the installation of CUDA 10.1 because tensorflow will catch up at some point.&lt;br /&gt;
&lt;br /&gt;
Still as your user account (and in the venv):&lt;br /&gt;
 conda install cudatoolkit&lt;br /&gt;
 conda install cudnn&lt;br /&gt;
 conda install tensorflow-gpu&lt;br /&gt;
 export LD_LIBRARY_PATH=/home/researcher/anaconda3/lib/${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}&lt;br /&gt;
 python -c &amp;quot;import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Remove Everything==&lt;br /&gt;
&lt;br /&gt;
Sometimes the best options is to completely remove everything and start again.&lt;br /&gt;
&lt;br /&gt;
To see what is currently installed (your output may look different):&lt;br /&gt;
 dpkg -l|grep nvidia&lt;br /&gt;
  ii  libnvidia-container-tools                  1.0.2-1                                      amd64        NVIDIA container runtime library &lt;br /&gt;
  (command-line tools)&lt;br /&gt;
  ii  libnvidia-container1:amd64                 1.0.2-1                                      amd64        NVIDIA container runtime library&lt;br /&gt;
  ii  nvidia-container-runtime                   2.0.0+docker18.09.7-3                        amd64        NVIDIA container runtime&lt;br /&gt;
  ii  nvidia-container-runtime-hook              1.4.0-1                                      amd64        NVIDIA container runtime hook&lt;br /&gt;
  ii  nvidia-docker2                             2.0.3+docker18.09.7-3                        all          nvidia-docker CLI wrapper&lt;br /&gt;
  ii  nvidia-prime                               0.8.8.2                                      all          Tools to enable NVIDIA's Prime&lt;br /&gt;
  ii  nvidia-settings                            418.56-0ubuntu0~gpu18.04.1                   amd64        Tool for configuring the NVIDIA &lt;br /&gt;
  graphics driver&lt;br /&gt;
&lt;br /&gt;
To completely remove all things nvidia (sub the correct version number and don't run the bits after the hash marks):&lt;br /&gt;
 cd /usr/local/cuda-10.0/bin&lt;br /&gt;
 ./uninstall_cuda_10.0.pl&lt;br /&gt;
 cd /usr/local&lt;br /&gt;
 rm -r cuda-10.1/&lt;br /&gt;
 nvidia-uninstall&lt;br /&gt;
 apt-get purge nvidia* #Removed nvidia-prime, nvidia-settings, nvidia-container-runtime, nvidia-container-runtime-hook, nvidia-docker2&lt;br /&gt;
 apt-get purge *nvidia* #Removed libnvidia-container-tools (1.0.2-1), Removing libnvidia-container1:amd64&lt;br /&gt;
 apt autoremove #Removed libllvm7 libvdpau1 libxnvctrl0 linux-headers-4.18.0-18 linux-headers-4.18.0-18-generic linux-image-4.18.0-18-generic linux-modules-4.18.0-18-generic linux-modules-extra-4.18.0-18-generic mesa-vdpau-drivers pkg-config screen-resolution-extra vdpau-driver-all&lt;br /&gt;
 cd /home/ed&lt;br /&gt;
 rm -r NVIDIA_CUDA-10.1_Samples/&lt;br /&gt;
 rm -r NVIDIA_CUDA-10.0_Samples/&lt;br /&gt;
 dpkg --remove libcudnn7&lt;br /&gt;
 dpkg --remove libcudnn7-dev&lt;br /&gt;
 dpkg --remove libcudnn7-doc&lt;br /&gt;
&lt;br /&gt;
COMMENT OUT LINES IN rc.local&lt;br /&gt;
 vi /etc/rc.local&lt;br /&gt;
&lt;br /&gt;
 shutdown -r now&lt;/div&gt;</summary>
		<author><name>Ed</name></author>
		
	</entry>
</feed>