Prime-run broken after kernel update

So yeah, I just updated from 5.9 to 5.12.
pacman was giving me an error when updating about wanting to install a new version of nvidia-utils but the old one being required by the now outdated kernel, so I decided to update the kernel. The gui mhwd-kernel gave me another dependency error about the same thing with linux59-nvidia. so I removed that, updated the kernel with cli mhwd-kernel and installed linux512-nvidia which also thankfully updated its dependency nvidia-utils to the newest version. This is exactly what the gui mhwd-kernel tried to install via pacman.
Still boots, nothing appeared to have went too wrong, but then I realized prime-run is broken when running some (I think OpenGL) graphics. I always get this error:

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: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 27
Current serial number in output stream: 28

(this is from glxspheres64)
The card is a GTX1060 mobile in a laptop
Does anybody have an idea what could cause this? The driver config in normal mhwd didn’t change at all, why would it even have a reason to fail?

PS:
I just checked the xorg Nvidia configs. Both are empty if you ignore the "made by mhwd’ comments, but that was the same way when Optimus still worked (as I can see in a Timeshift backup). The Xorg log says that the permission to modesetting was denied, but I can’t imagine why that would be or how to fix it. sudo prime-run glxinfo still gives me the BadValue.
In the Xorg log there’s also

(EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

After reinstalling the prime driver through mhwd nvidia-settings stopped working although everything was successfully installed. It reports

ERROR: Unable to load info from any available system

Whats the output of nvidia-smi?

I’m having the same issue. My nvidia-smi shows:

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest driver is installed and running.

My error was similar but the cause wasn’t. I noticed I was on kernal 5.9. I updated to 5.12 but still received the same error and the same results when running nvidia-smi. When I updated the kernal, I used manjaro settings manager (for the first time). In there under hardware configuration, I noticed the video drivers being used were video-hybrid-amd-nvidia-prime. Since my errors seemed to be tied to nvidia not running, I removed that then installed video-nvidia from the manjaro settings manager. Installed nvidia-prime, ran mkinitcpio -P, now everything is working. nvidia-smi returns results, prime-run works as a launch command in steam again. I still don’t know exactly what caused the issues, only that I did updates using the manjaro package manager yesterday when it told me I had several to upgrade. Hope this helps.

@XRaTiX
Since It won’t appear in correct format, here’s an image:
https://anonfiles.com/Pf87B9xau3/manjaro-nvidia-smi_png
@SeiferFyU
I always used the hybrid prime driver, since I want to use both intel normally to save power and nvidia to run graphics heavy stuff. Isn’t the video-nvidia just for single graphics card users? I never had it installed.
Thanks for providing info about your problem, BadValue seems to be a common error because it can be caused by anything that makes some graphics computation not work.
For most people it seems to be a Xorg config error, but mine’s the same as before.

You have optimus-manager? The nvidia driver is installed correctly but sounds like the system is only using the iGPU,if you are using optimus-manager switch to hybrid mode again.

Check also if you have the file /etc/X11/xorg.conf.d/10-optimus-manager.conf,In my case this is the content of that file when its in hybrid mode (intel and nvidia laptop)

Section "Files"
	ModulePath "/usr/lib/nvidia"
	ModulePath "/usr/lib32/nvidia"
	ModulePath "/usr/lib32/nvidia/xorg/modules"
	ModulePath "/usr/lib32/xorg/modules"
	ModulePath "/usr/lib64/nvidia/xorg/modules"
	ModulePath "/usr/lib64/nvidia/xorg"
	ModulePath "/usr/lib64/xorg/modules"
EndSection

Section "ServerLayout"
	Identifier "layout"
	Screen 0 "integrated"
	Inactive "nvidia"
	Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
	Identifier "integrated"
	Driver "modesetting"
	BusID "PCI:0:2:0"
	Option "DRI" "3"
EndSection

Section "Screen"
	Identifier "integrated"
	Device "integrated"
EndSection

Section "Device"
	Identifier "nvidia"
	Driver "nvidia"
	BusID "PCI:1:0:0"
	Option "Coolbits" "28"
EndSection

Section "Screen"
	Identifier "nvidia"
	Device "nvidia"
EndSection


@dag0bertz I’m assuming I always used the hybrid drive as well but switching to the video-nvidia still allows me to use my cpu for everything unless I launch an app or game with prime-run. However, I think I’m getting some FPS loss but I haven’t been able to verify that yet. With the video-nvidia driver, my nvidia-smi does show my dGPU is off. I’d still like to see some answers on why the hybrid drivers broke after recent update.

@XRaTiX I never used Optimus manager or bumblebee or anything else since the hybrid driver worked perfectly out of the box.
@SeiferFyU Sounds good, I guess I’ll have to switch my driver.
Also I second that some investigation should be put into what caused this, sadly I have no idea.