Can't open nvidia-settings or offload rendering on Optimus sytem

I’m in a fresh install of MX 23 on a Lenovo ThinkPad T440p. I used the distro’s custom nvidia driver installer, which installed v470.199.02 for my GeForce GT 730M. It all seemed to go smoothly, except that I can’t open nvidia-settings.

$ nvidia-settings -V
$ nvidia-run-mx nvidia-settings -V
$ sudo nvidia-settings -V
$ sudo nvidia-run-mx nvidia-settings -V

all produce the same output:

WARNING: NV-CONTROL extension not found on this Display.
ERROR: Unable to load info from any available system

I can’t find any errors in any logs. But comparing the output of inxi -G:

$ inxi -G
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915
    v: kernel
  Device-2: NVIDIA GK208M [GeForce GT 730M] driver: nvidia v: 470.199.02
  Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: intel
    dri: crocus gpu: i915 resolution: 1600x900~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 4600 (HSW
    GT2)
$ nvidia-run-mx inxi -G
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915
    v: kernel
  Device-2: NVIDIA GK208M [GeForce GT 730M] driver: nvidia v: 470.199.02
  Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 1.21.1.7 driver: X: loaded: intel dri: i965
    gpu: i915 resolution: 1600x900~60Hz
  API: OpenGL v: 4.6.0 NVIDIA 470.199.02 renderer: NVIDIA GeForce GT
    730M/PCIe/SSE2

in both cases, the Display line shows loaded: intel.

If I run $ nvidia-run-mx glxgears or $ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears, the process doesn’t show up in nvidia-smi, though it does detect the graphics card.

And in case it’s useful,

$ lsmod | grep -i nvidia
nvidia_drm             77824  0
nvidia_modeset       1511424  1 nvidia_drm
nvidia              40681472  1 nvidia_modeset
drm_kms_helper        253952  3 drm_display_helper,nvidia_drm,i915
drm                   720896  13 drm_kms_helper,drm_display_helper,nvidia,drm_buddy,thinkpad_acpi,nvidia_drm,i915,ttm
video                  69632  3 thinkpad_acpi,i915,nvidia_modeset

I’ve been struggling with this for way too long, so any pointer in the right direction would be greatly appreciated. Thanks.

nvidia-bug-report.log.gz (183.1 KB)