Nvidia Integrated GPU not detected

Hi everyone,

I’ve been having issues with the nvidia gpu in my laptop and I was wondering if anyone had some idea how to get it working again:

I have an HP spectre x360 15 laptop with integrated MX150 gpu. I used to run Antergos + Windows 10 dual boot and everything worked great.

I’ve switched to Manjaro + Windows 10 and I’ve been having issues with the integrated gpu since. In Manjaro, I have the video-hybrid-intel-nvidia-455xx-prime installed.

After an initial boot, running inxi -G gives me the following:

~ >>> inxi -G                                                                  
Graphics:
  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
  Device-2: Cheng Uei Precision Industry (Foxlink) HP Wide Vision FHD Camera 
  type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.10 driver: modesetting unloaded: intel 
  resolution: 3840x2160~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.3 

The gpu is not detected. If I put the laptop to sleep and resume, and then try the command again I get:

~ >>> inxi -G                                                                  
Graphics:
  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
  Device-2: NVIDIA GP108M [GeForce MX150] driver: N/A 
  Device-3: Cheng Uei Precision Industry (Foxlink) HP Wide Vision FHD Camera 
  type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.10 driver: modesetting unloaded: intel 
  resolution: 3840x2160~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.3 

Now the gpu is detected but the drivers are not available. When I try mhwd -l -d, I see that the drivers are installed though:

~ >>> mhwd -l -d                                                            [1]
--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0 (0302:10de:1d10)
  Display controller nVidia Corporation GP108M [GeForce MX150]
--------------------------------------------------------------------------------
  > INSTALLED:

   NAME:	video-hybrid-intel-nvidia-455xx-prime
   ATTACHED:	PCI
   VERSION:	2020.10.04
   INFO:	Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:	18
   FREEDRIVER:	false
   DEPENDS:	video-modesetting 
   CONFLICTS:	video*nvidia-* 
   CLASSIDS:	0300 0302 0300 
   VENDORIDS:	10de 8086 

   NAME:	video-linux
   ATTACHED:	PCI
   VERSION:	2018.05.04
   INFO:	Standard open source drivers.
   PRIORITY:	2
   FREEDRIVER:	true
   DEPENDS:	-
   CONFLICTS:	-
   CLASSIDS:	0300 0380 0302 
   VENDORIDS:	1002 8086 10de 

Now if I try to use nvidia-smi, I get the following:

~ >>> sudo nvidia-smi       
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Similarly, primus-run does not run:

~ >>>  prime-run glxspheres64                                                  
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
GLX FB config ID of window: 0x1f3 (8/8/8/0)
Visual ID of window: 0x5b2
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

Windows 10, crashes at startup because the gpu is not detected there either and gives me either code 45 (device is not connected) or code 28 (drivers not installed). However, if I re-install the bios and do a hard reset, windows will eventually start fine, detect the gpu and install the drivers.

The gpu works fine in windows after rebooting and shutting down + starting again unless I boot-up Manjaro… When I boot Manjaro, the gpu is not detected again, neither in Manjaro nor windows, and I have the issues I described above.
There is no discrete gpu option in the bios menus so I could not locate an issue there.

Thanks!

Hi,
… I cant tell if you are reporting that PRIME does not work or not.
So just in case, please run this:

prime-run glxinfo | grep 'renderer string'

Here’s the output:

prime-run glxinfo | grep 'renderer string'
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

I am having the exact same problem. Will try to experiment with different drivers

After removing video-hybrid-intel-nvidia-455xx-prime and installing video-hybrid-intel-nvidia-450xx-prime and running inxi -G I can see some driver on the MX150 line, but after rebooting I get this

inxi -G

Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
           Device-2: NVIDIA GP108M [GeForce MX150] driver: N/A 
           Device-3: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo 
           Display: x11 server: X.Org 1.20.10 driver: modesetting resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.3

And running mhwd -li yields

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-450xx-prime            2020.10.04               false            PCI


Warning: No installed USB configs!

I solved it by installing optimus-manager and running

optimus-manager --switch nvidia

I love it when I see people managing something they’ve been working at, or struggling with…

Well done @ceph!!! :partying_face:

Thank you! I still have some problems with the hybrid mode, and I think that performance is taking a hit. But hey, it works

At least there’s that, yes.
I have absolutely zero (0) knowledge/experience with hybrid setups. I have my dektop, and I’m more than happy with it. So can’t help you there.
But still, well done!

Thanks for the help. I managed to make it work once, the gpu was recognized at startup and the drivers loaded; it was wonderful. Then I rebooted into windows to make sure everything worked, and it did. Then windows updated and now I am back to square one. The gpu is not detected at startup, but shows up after returning from sleep. I get a code 28 in windows but fail to install drivers (already installed).

For the short while it worked, I would use prime-offload, followed by optimus-manager --switch nvidia, logging me out and logging back in with the nvidia gpu running everything. There were performance issues, but changing the screen resolution helped a bit.

I have the 5.10 and 5.4 kernels installed. After returning from sleep I get:

~ >>> inxi -G                                                                  
Graphics:
  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
  Device-2: NVIDIA GP108M [GeForce MX150] driver: N/A 
  Device-3: Cheng Uei Precision Industry (Foxlink) HP Wide Vision FHD Camera 
  type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.10 driver: modesetting 
  resolution: 3840x2160~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.1 

There is only Device 1 if I run this just after booting.

I wonder if it is a driver issue. I went into manjaro settings and re-installed the video-hybrid-intel-nvidia-prime drivers without success, the drivers are not loading (the settings menu does recognize the precise gpu as GP108M, Geforce MX150). I also have video-linux and video-modesetting installed. video-hybrid-intel-nvidia-prime requires modesetting and uninstalling video-linux does not resolve the issue.

In case it can be helpful, here is the output from prime-run glxgears:

~ >>> prime-run glxgears                                                       
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

And some more output which might be useful:

~ >>> grep -r nvidia /etc/modprobe.d/* /lib/modprobe.d/*                       
/etc/modprobe.d/mhwd-gpu.conf:options nvidia "NVreg_DynamicPowerManagement=0x02"
/lib/modprobe.d/optimus-manager.conf:blacklist nvidia_drm
/lib/modprobe.d/optimus-manager.conf:blacklist nvidia_uvm
/lib/modprobe.d/optimus-manager.conf:blacklist nvidia_modeset
/lib/modprobe.d/optimus-manager.conf:blacklist nvidia

~ >>> systemctl status optimus-manager
    ● optimus-manager.service - Optimus Manager Commands Daemon
         Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
         Active: active (running) since Wed 2021-01-06 14:00:37 EST; 29s ago
        Process: 376 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_daemon_start (code=exited, status=0/SUCCESS)
        Process: 488 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_xorg_start (code=exited, status=0/SUCCESS)
       Main PID: 754 (python3)
          Tasks: 1 (limit: 19037)
         Memory: 37.9M
         CGroup: /system.slice/optimus-manager.service
                 └─754 /usr/bin/python3 -u -m optimus_manager.daemon

    Jan 06 14:00:36 jj-spectre python3[488]: [411] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
    Jan 06 14:00:36 jj-spectre python3[488]: [427] INFO: Loaded extra Intel Xorg options (0 lines)
    Jan 06 14:00:36 jj-spectre python3[488]: [427] INFO: Loaded extra Intel Xorg options (0 lines)
    Jan 06 14:00:36 jj-spectre python3[488]: [428] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
    Jan 06 14:00:36 jj-spectre python3[488]: [428] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20210106T140036', 'requested_mode': 'intel'}
    Jan 06 14:00:37 jj-spectre python3[488]: [428] INFO: Xorg pre-start hook completed successfully.
    Jan 06 14:00:37 jj-spectre systemd[1]: Started Optimus Manager Commands Daemon.
    Jan 06 14:00:37 jj-spectre python3[754]: [1] INFO: # Commands daemon
    Jan 06 14:00:37 jj-spectre python3[754]: [1] INFO: Opening UNIX socket
    Jan 06 14:00:37 jj-spectre python3[754]: [1] INFO: Awaiting commands

Thanks for the help!