Problem with PRIME offloading

Hi,
I’m running arch linux 5.10, on a laptop with a dedicated GTX 1050 graphics card. I followed the nvidia prime archwiki page.

I am facing the following problem:
When running glxinfo with nvidia gpu:
prime-run glxinfo

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

It seems that the nvidia driver loads according to “lspci -nnk”.
I have searched for simliar cases and I found the following topic:

I followed the solution given to him but it made no change.

nvidia bug report is attached.

Thanks in advance,
Itai.
nvidia-bug-report.log.gz (264.3 KB)

The driver loads too late. Please try embedding it into the initrd.

1 Like

You are correct, thank you!!

I did the following changes to fix the problem:
Added nvidia-drm.modeset=1 kernel parameter.
Added modules nvidia nvidia_modeset nvidia_uvm nvidia_drm to /etc/mkinitcpio.conf and ran mkinitcpio -p linux.
Here is my xorg.conf (after following the linked topic:

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

Section "Screen"
    Identifier             "iGPU"
    Device                 "iGPU"
EndSection

Section "Device"
    Identifier             "iGPU"
    Driver                 "intel"
    BusID                  "PCI:0:2:0"
EndSection

Section "Device"
    Identifier             "dGPU"
    Driver                 "nvidia"
    BusID                  "PCI:2:0:0"
EndSection

Here is my nvidia-bug-report after the fix:
nvidia-bug-report-after-fix.log.gz (247.1 KB)

Now, prime-run glxinfo | grep "L r" returns:

OpenGL renderer string: GeForce GTX 1050 
with Max-Q Design/PCIe/SSE2

Again, thank you!

edit: fix formatting