I did that, but can’t use a second screen via HDMI or DP then.
I tried going back to use my second display with
sudo systemctl enable gpu-manager.service
but the display doesn’t work despite the 11-nvidia-prime.conf being created.
/var/log/gpu-manager.log looks normal, except that it doesn’t find the output for card1 driven by “nvidia-drm”, which should show HDMI and DP. Only card0 driven by “i915” shows output 0: card0-eDP-1.
nvidia-smi gives Disp.A Off
and processes Xorg, gnome-shell are running on it
xrandr also only shows eDP and no HDMI or DP
when doing that, there can be problems with gmd3 afterwards. Solution is to install
sudo apt install ubuntu-unity-desktop
and switch to lightdm via
sudo dpkg-reconfigure lightdm
then everything works fine again