I now found this page: SDB:NVIDIA the hard way - openSUSE Wiki. It says:
The proprietary driver installer will blacklist Nouveau; therefore, you can usually skip this section, but it doesn’t hurt to double check it.
I did not have nvidia.conf in /etc/modprobe.d/, so it appears it wasn’t created by the driver installer. I deleted the blacklist-nouveau.conf I created earlier.
I created nvidia.conf and added the blacklist nouveau line to it. options nouveau.modeset=0 gives me:
libkmod: kmod_config_parse: /etc/modprobe.d/nvidia.conf line 2: ignoring bad line starting with 'options' when running sudo dracut -f, so I had to remove that line.
Restarted. Still I get ERROR: NVIDIA driver is not loaded when running nvidia-settings.
I tried adding:
nouveau.modeset=0 modprobe.blacklist=nouveau rd.driver.blacklist=nouveau nvidia-drm.modeset=1
to:
GRUB_CMDLINE_LINUX_DEFAULT= in /etc/default/grub
It now reads:
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent quiet security=apparmor mitigations=auto nosimplefb=1 nouveau.modeset=0 modprobe.blacklist=nouveau rd.driver.blacklist=nouveau nvidia-drm.modeset=1"
I rebooted. Still I get ERROR: NVIDIA driver is not loaded when running nvidia-settings.