Hybrid graphics Intel / NVIDIA GeForce 740M in 2022

Hi! I have been using this laptop with manjaro for many years now. Since I don’t game much, I don’t use the dedicated GPU much, so unfortunately I don’t know which update broke my setup. At some point bumblebee (I don’t remember what version) used to work.

However, now I get errors very similar to: _forum.manjaro.org/t/solved-primus-fatal-bumblebee-daemon-reported-error-xorg-ee-no-devices-detected/32436 . However, I cannot follow the solution proposed there, since mhwd does not seem to offer prime drivers for my card. According to the NVIDIA page for searching drivers, the latest version for my card is 418, which might not work with prime at all. I am currently using kernel 5.14, but I am willing to use an older LTS kernel, if it helps.

The goal of my post is to get ANY method of hybrid graphics working (bumblebee, prime, optimus-manager, …).

$ mhwd -l
> 0000:02:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:04:00.0 (0302:10de:1292) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-390xx-bumblebee            2021.12.18               false            PCI
    video-nvidia-390xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:00:02.0 (0300:8086:0a16) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-390xx-bumblebee            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


$ inxi -G
Graphics:
  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel
  Device-2: NVIDIA GK208M [GeForce GT 740M] driver: N/A
  Device-3: Chicony USB2.0 HD UVC WebCam type: USB driver: uvcvideo
  Display: x11 server: X.Org 1.21.1.3 driver: loaded: modesetting
    resolution: 1: 1366x768~60Hz 2: 1920x1080~60Hz
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2)
    v: 4.5 Mesa 21.3.4
``

What is the issue? does it give any graphics windows at all? Does it load to the login manager, does it go blank screen? Looks like you have two monitors, what happens when you disconnect the external monitor? A little more info is needed…

Sorry if it wasn’t clear, I have exactly the same problem as in the linked post. The same errors in bumblebeed, the same error when I try to primusrun anything. The only difference is I have a slightly older card, for which the newest driver is 418.