Problem solved.
As I said, I observed that I could modprobe -r nouveau, so I thought I'd try
# modprobe nvidia modprobe: ERROR: could not insert 'nvidia': Operation not permitted
So I googled that and found this article, which said disable secure boot: https://forums.fedoraforum.org/showthread.php?320115-modprobe-operation-not
I rebooted, disabled secure boot in the UEFI bios and lo and behold, nouveau is gone and nvidia is loaded (on boot):
[root@thinkpad ~]# lsmod | grep nvidia nvidia_drm 57344 5 nvidia_modeset 1118208 3 nvidia_drm nvidia_uvm 970752 0 nvidia 19103744 237 nvidia_uvm,nvidia_modeset ipmi_msghandler 73728 2 ipmi_devintf,nvidia drm_kms_helper 225280 2 nvidia_drm,i915 drm 495616 8 drm_kms_helper,nvidia_drm,i915
and
glxinfo | grep -i opengl OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: Quadro P500/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 430.40 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.6.0 NVIDIA 430.40 OpenGL shading language version string: 4.60 NVIDIA OpenGL context flags: (none) OpenGL profile mask: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 430.40 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 OpenGL ES profile extensions:
Now, how do I make it use the onboard intel card for display and nvidia for cuda?