FreeBSD on legacy nvidia hybrid laptop

Hi I'm a newbie to FreeBSD and I have an old laptop with intel 4600hd and nvidia gtx 765M (should work with nvidia 470 driver)

I tried to do some research but most methods uses nvidia-drm-kmod (which doesn't seem to be available for legacy drivers) or using nvidia-hybrid-graphics which is deprecated

also I don't have any option in the laptop's bios to disable hybrid mode

my question is

is there any way to configure my hybrid setup or at least disable intel gpu from xorg config ?

my device is msi GE60 2OE from around 2013
 
So no wayland with that card?
Maybe it would depend on what compositor is used.
Starting with 470 series of drivers, graphics/egl-wayland should be functional.

So if you're lucky enough and the compositor used supports EGLStream-based Wayland external platform, it may possibly work without graphics/nvidia-drm-*-kmod on Wayland. But such a compositor would be limited. Not sure what compositor actually support EGLStream.
 
Logs appears to indicate that it's working on the Intel driver. Are you not getting a picture on the screen?
Xorg is indeed working but when doing
xrandr --listproviders
It only show intel but not nvidia

Also nvidia-smi works

When trying to use vkcube it tries to run on nvidia gpu then vkcube crashes with segmentation fault
 
I asked claude ai about the situation and it recommended me to connect a monitor to the hdmi connector to make nvidia gpu work

Conversation here
 
I asked claude ai about the situation and it recommended me to connect a monitor to the hdmi connector to make nvidia gpu work

Conversation here
It mutually depends on how the notebook is "physically" designed whether the suggestion works or not.

As far as I've found before (cannot give you a link, I've lost track with it as it was 5+ years ago), at least some notebooks had "external" HDMI and/or DP port directly attached to NVIDIA dGPU, but not to internal display panel.

ThinkPad P52 (at the moment) alone had configuration to disable iGPU via UEFI firmware and let NVIDIA dGPU to drive internal display panel directly.
(To be honest, it seems that internal display panel TP P52 has multiple DP ports and attaching one for iGPU and another one for dGPU with auto selection of active port.)

Some manufacturers / models clearly stated that NVIDIA dGPU can be used via Optimus only.

And all others shows no clear information about the above.
And maybe some og them work indirect rendering without PRIME offloading (let dGPU as if some monitor is connected regardless actually do so or not, and tranfer the results of dGPU rendered image into VRAM area of iGPU, managed and transferred by softwares like x11/virtualgl).
 
It mutually depends on how the notebook is "physically" designed whether the suggestion works or not.

As far as I've found before (cannot give you a link, I've lost track with it as it was 5+ years ago), at least some notebooks had "external" HDMI and/or DP port directly attached to NVIDIA dGPU, but not to internal display panel.

ThinkPad P52 (at the moment) alone had configuration to disable iGPU via UEFI firmware and let NVIDIA dGPU to drive internal display panel directly.
(To be honest, it seems that internal display panel TP P52 has multiple DP ports and attaching one for iGPU and another one for dGPU with auto selection of active port.)

Some manufacturers / models clearly stated that NVIDIA dGPU can be used via Optimus only.

And all others shows no clear information about the above.
And maybe some og them work indirect rendering without PRIME offloading (let dGPU as if some monitor is connected regardless actually do so or not, and tranfer the results of dGPU rendered image into VRAM area of iGPU, managed and transferred by softwares like x11/virtualgl).
when I tried to connect the laptop using hdmi to a tv to see if I can use only nvidia , it seemed that the hdmi port is connected to the intel Igpu rather than nvidia dgpu sadly
 
when I tried to connect the laptop using hdmi to a tv to see if I can use only nvidia , it seemed that the hdmi port is connected to the intel Igpu rather than nvidia dgpu sadly
If your notebook has multiple outputs (i.e., HDMI, mini HDMI, DP, mini DP in any combination), possibly one of the ports alone is connected to dGPU, if you're lucky enough.
 
This lspci looks like it's muxless (Intel on main VGA/NVIDIA on 3D)

I had this years ago for a 1060 laptop and Linux (nothing special iirc but forces specific DDX instead of modesetting):

Code:
Section "OutputClass"
    Identifier  "Intel Graphics"
    MatchDriver "i915"
    Driver    "intel"
    Option    "DRI"       "3"
    Option    "TearFree"  "0"
EndSection

Section "OutputClass"
    Identifier  "NVIDIA Graphics"
    MatchDriver "nouveau"
    Driver    "nouveau"
    Option    "DRI"       "3"
EndSection

I can't find anything about a GE60 having a hardware mux, but I'd check around unlocked BIOS settings (there's likely a toggle for Mux mode but worst-case it doesn't work if there really isn't a hardware mux; with Intel iGPU there's likely Switchable Graphics/SG options that allow disabling external graphics detection and/or disabling NVIDIA's PCI bus).

I used UMAF, but there's a newer tool called zedk (UEFI boot to unlocked BIOS menus). Enabling CSM can also reveal more GPU options (I can set eDP or HDMI VBIOS with Intel with CSM whereas that setting doesn't exist pure-UEFI). If either tool works, it can expose a lot of settings to mess with!
 
This lspci looks like it's muxless (Intel on main VGA/NVIDIA on 3D)

I had this years ago for a 1060 laptop and Linux (nothing special iirc but forces specific DDX instead of modesetting):

Code:
Section "OutputClass"
    Identifier  "Intel Graphics"
    MatchDriver "i915"
    Driver    "intel"
    Option    "DRI"       "3"
    Option    "TearFree"  "0"
EndSection

Section "OutputClass"
    Identifier  "NVIDIA Graphics"
    MatchDriver "nouveau"
    Driver    "nouveau"
    Option    "DRI"       "3"
EndSection

I can't find anything about a GE60 having a hardware mux, but I'd check around unlocked BIOS settings (there's likely a toggle for Mux mode but worst-case it doesn't work if there really isn't a hardware mux; with Intel iGPU there's likely Switchable Graphics/SG options that allow disabling external graphics detection and/or disabling NVIDIA's PCI bus).

I used UMAF, but there's a newer tool called zedk (UEFI boot to unlocked BIOS menus). Enabling CSM can also reveal more GPU options (I can set eDP or HDMI VBIOS with Intel with CSM whereas that setting doesn't exist pure-UEFI). If either tool works, it can expose a lot of settings to mess with!
FreeBSD does NOT have nouveau driver ported. (If I recall correctly, someone once tried and created ports, but never worked well and removed.)

So if you try this way, in the mentioned config for NVIDIA dGPU, Driver line should be "nvidia" instead of "nouveau", would need to add BusID line like BusID "PCI:1:0:0" (here, the argument should edited to match with your PCI configuration if it differs). But would need x11/virtualgl installed and configured (sorry, I've never tried) to transfer anything rendered in VRAM of dGPU to video meory area in main memory that are allocated for iGPU.
 
I unclocked the bios before (by paying to someone in the msi community to unlock it for me)

and I found a setting that only has hybrid mode as the only option

(I relocked my bios several monthes ago and I don't have access to the modified bios files)
 
Given that an AI has already been consulted and cited on this thread, I guess it's fine that I post the result of feeding all the above (attached log's content and Claude's chat included) to my special blend of ChatGPT 5.2 Plus, which follows. It's verbose and detailed. Is it accurate and/or useful? That, I don't know, but I hope it helps.


Diagnosis

  • The Xorg log shows the Intel HD 4600 as the active scanout device: Screen "intel"(0) is created, NVIDIA is configured as an Inactive device, and the NVIDIA Xorg driver is unloaded during startup. This matches a muxless/hybrid laptop where the internal panel (and often the external ports) are physically wired to the iGPU.
  • xrandr --listproviders showing only Intel is consistent with the above: only the GPU that Xorg actually wires up as a provider/sink in the running server will appear.
  • PRIME-style offloading on FreeBSD is described in the FreeBSD Handbook (X11/Graphics). When supported, it is typically exercised via DRI_PRIME=1. See also Xorg(1)() for X server configuration mechanisms.
  • The DRM kernel module ports (for example graphics/nvidia-drm-66-kmod) are tied to the current production NVIDIA branch and depend on x11/nvidia-kmod (current), not the legacy 470 kmod flavor. As a result, legacy 470 does not pair with these DRM-kmod ports.
  • x11/nvidia-hybrid-graphics is deleted (expired as obsolete), so it cannot be used as an automation layer.

Net effect: “Disable Intel in xorg.conf and run NVIDIA-only” only works if at least one display output is physically wired to NVIDIA. If all outputs are iGPU-wired, forcing NVIDIA as the sole Xorg GPU usually produces “no screens” or a black display.

Corrective actions

1) Stop fighting autoconfiguration: remove the monolithic xorg.conf

HAZARD: This change can prevent the GUI from starting. Scope: Xorg display startup only. Keep a console login available.

The Handbook recommends avoiding a full /etc/xorg.conf unless automatic configuration fails, and using /usr/local/etc/X11/xorg.conf.d/ for targeted overrides. Xorg also supports configuration via xorg.conf.d directories; see Xorg(1)().

Code:
# cp -a /etc/xorg.conf /etc/xorg.conf.bak
# mv /etc/xorg.conf /etc/xorg.conf.disabled

Verification:

Code:
$ startx
$ xrandr

2) Fix Vulkan selection/crashes first (common cause: wrong ICD or out-of-sync stack)

A segfault in vkcube does not prove offload is working; it often indicates a loader/ICD mismatch or a driver bug. Use graphics/vulkan-tools to see what Vulkan discovers and to control ICD selection.

Install tools and inspect devices:

Code:
# pkg install graphics/vulkan-tools
$ vulkaninfo --summary

List installed ICD manifests:

Code:
$ ls -1 /usr/local/share/vulkan/icd.d

Force one ICD for a test run (replace with the actual filename found above):

Code:
$ env VK_ICD_FILENAMES=/usr/local/share/vulkan/icd.d/<icd>.json vkcube

Keep these tests unprivileged (avoid running under doas/sudo) so environment variables are not filtered by “secure execution” behavior.

Optional loader debugging:

Code:
$ env VK_LOADER_DEBUG=all vkcube 2>&1 | sed -n '1,120p'

3) Use NVIDIA for OpenGL rendering without NVIDIA scanout (VirtualGL + a second X server)

HAZARD: Starting a second X server can disrupt input/VT handling on some setups. Scope: X session/virtual terminals on the host. Prefer testing from a local console and keep a recovery path.

This is the standard FreeBSD workaround when Intel is the only scanout path: keep the Intel X server for display, start a second (headless) X server bound to NVIDIA, and redirect OpenGL to it.

Install VirtualGL:

Code:
# pkg install x11/virtualgl

Find the NVIDIA BusID:

Code:
# pciconf -lv | grep -B3 -A6 -i nvidia

Create /usr/local/etc/X11/xorg.conf.nv (adjust BusID to match pciconf):

Code:
Section "ServerLayout"
    Identifier "nvidia-headless"
    Screen 0 "Screen0"
EndSection

Section "Device"
    Identifier "NVIDIAGPU"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "AllowEmptyInitialConfiguration" "True"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "NVIDIAGPU"
EndSection

Start a second X server on display :8 (see Xorg(1)() for options like -sharevts):

Code:
$ X :8 -config /usr/local/etc/X11/xorg.conf.nv -sharevts -noreset -nolisten tcp &

Run OpenGL apps on NVIDIA and display them on the Intel desktop:

Code:
$ vglrun -d :8 glxinfo -B
$ vglrun -d :8 glxgears

Verification (expect NVIDIA as the OpenGL renderer inside the vglrun output):

Code:
$ vglrun -d :8 glxinfo -B | egrep 'OpenGL vendor|OpenGL renderer'

Limitations:
  • This targets OpenGL/GLX offload. It does not provide general Vulkan PRIME presentation to the Intel scanout.

4) NVIDIA-only Xorg (works only if a port is NVIDIA-wired)

HAZARD: This can produce a black screen or “no screens found.” Scope: display output availability. Test on an alternate display number; do not overwrite the working configuration.

Test without replacing the working Intel configuration:

Code:
$ X :1 -config /usr/local/etc/X11/xorg.conf.nvidia-only -retro -nolisten tcp

If no physical output is NVIDIA-wired, this will fail or start without any visible display.

Notes on nvidia-drm-kmod and legacy 470

  • The graphics/nvidia-drm-kmod family is built around the current NVIDIA DRM module packaging and expects the current kmod stack (for example graphics/nvidia-drm-66-kmod for 580.x). These do not pair with the legacy 470 kmod flavor.
  • Because of that mismatch, common “Optimus/PRIME” guidance that relies on NVIDIA DRM/KMS will not apply to a legacy 470 installation on FreeBSD 15.
 
Back
Top