Cannot use hybrid graphics via prime render offload (GeForce MX250)

OS: Arch Linux X86_64
Host: Acer Swift SF314-57G V1.18
Kernel: 6.1.1-arch1-1
iGPU: Intel Iris Plus Graphics G7
dGPU: NVIDIA GeForce MX250

I’ve followed the guide on the topic PRIME in the arch wiki. I can’t get the discrete graphics to work in this mode of operation.
xorg.conf.d/ and xorg.conf are empty.

Trying to talk with the graphics card via the command nvidia-smi gives this error:

Unable to determine the device handle for GPU0000:2B:00.0: Unknown Error

Running the command prime-run glxinfo | grep "OpenGL" throws the following 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:  24 (X_GLXCreateNewContext)
 Value in failed request:  0x0
 Serial number of failed request:  111
 Current serial number in output stream:  112

The program nvidia-bug-report.sh provides the following output:
nvidia-bug-report.log (395.7 KB)

[  127.574365] NVRM: GPU at PCI:0000:2b:00: GPU-fe6691d2-c548-9785-9334-8b560b781795
[  127.574375] NVRM: Xid (PCI:0000:2b:00): 79, pid='<unknown>', name=<unknown>, GPU has fallen off the bus.

It’s likely broken. Please check for a bios update.

The command dmidecode reports the bios version as 1.18. This is the latest version for my model (verified using SNID) according to Acer’s website.
Also, I want to add that the Graphics card works in windows.

Please check if the gpu doesn’t shut down with driver 470.

Same problem with nvidia-470xx-dkms.
I’ve linked the output of nvidia-bug-report.sh after switching to this driver.
nvidia-bug-report.log.gz (959.5 KB)

The gpu is always shutting down

2b:00.0 3D controller: NVIDIA Corporation GP108BM [GeForce MX250] (rev a1)
	Subsystem: Acer Incorporated [ALI] Device 1407
	!!! Unknown header type 7f
	Memory at 8b000000 (32-bit, non-prefetchable) [size=16M]
	Memory at 6020000000 (64-bit, prefetchable) [size=256M]
	Memory at 6030000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 3000 [size=128]
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

(All those ‘ff’ mean off)
Since this is not depending on driver, I guess there’s a general linux incompatibility with your hardware. Please check if downgrading the kernel using linux-lts changes anything.

Same problem with linux-lts and nvidia-lts.
Here is the bug report after switching the kernel and driver.
nvidia-bug-report.log.gz (107.5 KB)

Still shutting down 20 seconds after the driver loads. No idea why.