AMD and NVIDIA GPUs together on Ubuntu 20.04

It's not really the answer, but if it helps.

I have both AMD and Nvidia on a laptop I force Nvidia with instruction from https://forums.developer.nvidia.com/t/i-cant-enable-nvidia-gpu-with-nvidia-prime/69899/4

In this file /usr/share/X11/xorg.conf.d/10-nvidia.conf I put:

Option "PrimaryGPU" "true"

And reboot


Steps to install Ubuntu 20 with Nvidia + AMD

  1. Install Ubuntu 20.04.2.0 LTS (Focal Fossa) server
  2. Once started
    apt-get update && time apt-get dist-upgrade
    
  3. Reboot and then install AMD drivers
    wget --referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-45 https://drivers.amd.com/drivers/ linux / amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
    tar xJf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz </code>
    cd amdgpu-pro-20.45-1188099-ubuntu-20.04
    sudo ./amdgpu-pro-install --opencl=legacy,pal --headless --no-dkms 
    
  4. Restart and install Nvidia drivers
    ubuntu-drivers autoinstall
    # Note: check with nvidia-smi
    # If it has not been installed correctly then execute:
    sudo apt install nvidia-driver-455
    
  5. Reboot and install clinfo
    apt install clinfo
    
    run clinfo to check that both cards have been detected