Nvidia prime-run does not work

Initial post where I somehow had it working

When I run prime-run glxinfo | grep renderer I get:

name of display: :0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  39
  Current serial number in output stream:  40

Installed nvidia packages are:

local/lib32-libvdpau 1.4-1
    Nvidia VDPAU library
local/lib32-nvidia-utils 460.39-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.4-1
    Nvidia VDPAU library
local/nvidia 460.39-2
    NVIDIA drivers for linux
local/nvidia-lts 1:460.39-4
    NVIDIA drivers for linux-lts
local/nvidia-prime 1.0-4
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-utils 460.39-1
    NVIDIA drivers utilities

I tried both nvidia-installer-dkms and nvidia-installer. This might be an issue with libgl as seen here.

and is libglvnd installed?


yay -Qs libglvnd
local/lib32-libglvnd 1.3.2-1
    The GL Vendor-Neutral Dispatch library
local/libglvnd 1.3.2-1
    The GL Vendor-Neutral Dispatch library