Ubuntu 24.04 refuses to use 2070 Max Q

Driver: 555.52.04
Laptop: Zephyrus M15
Windowing: Wayland
Kernel: Linux 6.8.0-44-generic

Using prime select to select nVidia graphics and setting through Server settings seems to be completely ignored by Ubuntu. Also tried adding

__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia “@”

to /etc/environment.

Even running the command __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia firefox

does not cause firefox to show up in nvidia-smi. The only process that will run on the nvidia card is /usr/bin/gnome-shell.

intel_gpu_top shows all of the processes running on the integrated GPU instead

glxinfo | grep OpenGL shows the intel graphics, while prepending it with __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia causes it to correctly show the nvidia card.

If it matters, I’m running on an external monitor.