"Thank you for your response! I am happy to share the details of my configuration to help with the automation process.
To get the hybrid system working, I had to make the following adjustments:
1. Kernel & Boot Configuration In /boot/loader.conf, I enabled modesetting for the NVIDIA DRM driver: hw.nvidiadrm.modeset=1
In /etc/rc.conf, I ensured the modules are loaded in a specific order, prioritizing the Intel KMS driver before the NVIDIA modules: kld_list="i915kms cuse coretemp linux linux64 fusefs nvidia-modeset nvidia-drm nvidia acpi_video acpi_call fusefs hgame"
2. Xorg Configuration My xorg.conf requires explicitly defining two screens and two layouts to manage the provider handoff correctly. Notably, I set AccelMethod "none" for the Intel device to stabilize the output.
my xorg.conf:
Section "Module"
Load "glx"
EndSection
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "ServerLayout"
Identifier "Layout1"
Screen 1 "Screen1"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1"
EndSection
Section "Files"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce GTX 1050"
BusID "PCI:1:0:0"
EndSection
Section "Device"
Identifier "Device1"
Driver "modesetting"
Option "AccelMethod" "none"
BusID "PCI:0:2:0"
Option "AsyncFlipSecondaries" "on"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "HDMI-0"
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "Stereo" "1"
Option "nvidiaXineramaInfoOrder" "eDP-1-1"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection