Categories
User Help

GLX failed request with Nvidia/Optimus on Fedora 32+Gnome+Wayland

I’ve been trying for at least a year to get optimus working on my Fedora laptop with optimus and a Geforce MX150 GPU using gnome shell and wayland. In earlier versions I have tried bumblebee, but have had trouble (although there was a point in time I had it working I think a long while ago, but not in F31 at least). Now I upgraded to F32, and I read that bumblebee is no longer needed for optimus/nvidia gpu’s and I can just use the __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia environment variables. So I thought to give it a go.
I checked out https://rpmfusion.org/Howto/NVIDIA#Optimus and still no luck. In windows (dual boot), it works fine, so it’s not a hardware issue.

If I run glxinfo, I get the following error:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  150 (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

The card seems to be there though, and the drivers are loaded:

nvidia-smi
Wed May 20 10:25:44 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce MX150       Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   44C    P8    N/A /  N/A |      0MiB /  2002MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
uname -a
Linux matebook-x-pro 5.6.12-300.fc32.x86_64 #1 SMP Mon May 11 16:47:13 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
lsmod|grep -e"nvidia\|nouveau"
nvidia_drm             57344  1
nvidia_modeset       1118208  1 nvidia_drm
nvidia_uvm           1093632  0
nvidia              20512768  17 nvidia_uvm,nvidia_modeset
ipmi_msghandler       118784  2 ipmi_devintf,nvidia
drm_kms_helper        241664  2 nvidia_drm,i915
drm                   598016  16 drm_kms_helper,nvidia_drm,i915

This is what’s installed and the configuration files:

dnf list "*nvidia*" --installed
Installed Packages
akmod-nvidia.x86_64                                                       3:440.82-1.fc32                                 @rpmfusion-nonfree
kmod-nvidia-5.6.11-200.fc31.x86_64.x86_64                                 3:440.82-1.fc31                                 @@commandline
kmod-nvidia-5.6.12-300.fc32.x86_64.x86_64                                 3:440.82-1.fc32                                 @@commandline
kmod-nvidia-5.6.8-200.fc31.x86_64.x86_64                                  3:440.82-1.fc31                                 @@commandline
nvidia-persistenced.x86_64                                                3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                                                    3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
nvidia-texture-tools.x86_64                                               2.0.8-22.fc32                                   @fedora
nvidia-xconfig.x86_64                                                     3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                                                3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64                                           3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686                                        3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                                      3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                                        3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686                                             3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                                           3:440.82-1.fc32                                 @rpmfusion-nonfree-nvidia-driver

Kernel parameters:

rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
cat /etc/X11/xorg.conf.d/nvidia.conf
Section "Module"
        Load "modesetting"
EndSection

Section "OutputClass"
        Identifier "nvidia"
        MatchDriver "nvidia-drm"
        Driver "nvidia"
        Option "AllowEmptyInitialConfiguration"
        Option "SLI" "Auto"
        Option "BaseMosaic" "on"
        Option "PrimaryGPU" "yes"
EndSection

Section "ServerLayout"
        Identifier "layout"
        Option "AllowNVIDIAGPUScreens"
EndSection

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

Section "Device"
        Identifier "nvidia"
        Driver "nvidia"
        BusID "PCI:1:0:0"
EndSection
lspci|grep -i "vga\|nvidia"
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
01:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX150] (rev a1)
cat /etc/modprobe.d/nvidia.conf
options NVreg_DynamicPowerManagement=0x02
cat /usr/lib/udev/rules.d/61-gdm.rules
# disable Wayland on Hi1710 chipsets
#ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/usr/libexec/gdm-disable-wayland"
# disable Wayland when using the proprietary nvidia driver
#DRIVER=="nvidia", RUN+="/usr/libexec/gdm-disable-wayland"
# disable Wayland if modesetting is disabled
#IMPORT{cmdline}="nomodeset", RUN+="/usr/libexec/gdm-disable-wayland"

Leave a Reply

Your email address will not be published. Required fields are marked *