Comment 96 for bug 1705369

Hi there, I've made it work. I don't know if it matters but I am using nvidia-390.
So, first of all, we need to fix nvidia-persistenced.

  sudo cp /lib/systemd/system/nvidia-persistenced.service /etc/systemd/system
  sudo nano /etc/systemd/system/nvidia-persistenced.service

Here we have to change '/usr/bin/nvidia-persistenced' to '/usr/lib/nvidia-390/bin/nvidia-persistenced'. Instead of 'nvidia-390' use your driver version. Then

  sudo systemctl daemon-reload

Next we have to edit '/etc/gdm3/PostSession/Default'. This script is run as 'root' after logout.

  sudo nano /etc/gdm3/PostSession/Default

and make it look like this:

exit 0

This should do it.
If prime still doesn't work for you, I also have 'nouveau.modeset=0 rd.driver.blacklist=nouveau' on GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub.
Also try to reboot.