NVIDIA 440.64 32-bit libraries package breaks 64-bit driver package

If anyone is interested, I looked a little bit deeper and found out that I add two sources for NVIDIA drivers, one being the graphic-drivers ppa and the other one being CUDA repos. The version in CUDA repos (440.64.00-0ubuntu1, against 440.64-0ubuntu0~0.18.04.2 in the ppa) was the main candidate for installation but no 32-bit libraries were provided. Thus the only problem was trying to install a different version of the 32-bit libraries.

What I did was purge all NVIDIA packages, disable temporarily the CUDA repo and reinstall everything. Now the updates from the CUDA repo are kept back because there is no candidate to update the 32-bit library to that version, but everything is working fine.

STEPS

  • Remove NVIDIA drivers and libraries:

    $ sudo apt-get purge nvidia-* libnvidia-*
    
  • Disable CUDA repo, either rename cuda.list in /etc/apt/sources.list.d or comment out its content:

    $ sudo nano /etc/apt/sources.list.d/cuda.list
    #deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /
    
  • Update and check candidate version:

    $ sudo apt-get update
    $ apt-cache policy nvidia-driver-[version] libnvidia-gl-[version]:i386
    

    mine with both sources enabled looks like this, if you disable the CUDA repo they should display the same version table and the same candidate version:

    nvidia-driver-440:
    Installed: 440.64-0ubuntu0~0.18.04.2
    Candidate: 440.64.00-0ubuntu1
    Version table:
        440.64.00-0ubuntu1 500
            500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  Packages
    *** 440.64-0ubuntu0~0.18.04.2 500
            500 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 Packages
            100 /var/lib/dpkg/status
        440.33.01-0ubuntu1 500
            500 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  Packages
    libnvidia-gl-440:i386:
    Installed: 440.64-0ubuntu0~0.18.04.2
    Candidate: 440.64-0ubuntu0~0.18.04.2
    Version table:
    *** 440.64-0ubuntu0~0.18.04.2 500
            500 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main i386 Packages
            100 /var/lib/dpkg/status
    
  • Reinstall driver and manually install 32-bit libraries if necessary:

    $ sudo apt-get install nvidia-driver-[version]
    $ sudo apt-get install libnvidia-gl-[version]:i386
    
  • You can enable the CUDA repo, the new updates will be kept back as long as there is no compatible new version of the 32-bit libraries.