I can't enable nvidia-gpu with nvidia-prime

Things to try:

  • Switch to intel, reboot, switch back to nvidia, reboot
  • Add
Option   "PrimaryGPU" "true"

inside the outputclass of /usr/share/X11/xorg.conf.d/10-nvidia.conf

  • Try with the v390 driver
  • check if the file /lib/modprobe.d/nvidia-kms.conf exists and change
    modeset=1 to modeset=0
    then run sudo update-initramfs -u