I've been racking my head over this for more than a week now on my spare time. Made a few attempts at this point to install a few extras to enable either the GTX 1050, and the UHD 630 on the 8th Gen i7/8750H CPU. Neither of them work, still stuck with the scfb driver.

Would it be OK to try drivers/packages from the FreeBSD repos, provided it's one from a version of the system that matches what GhostBSD is currently based on? Or is that likely to break my installation, meaning I should just stick to the GhostBSD repos?

    FreeBSD packages will not change anything. It is basically the same.

    What is complicated is supporting hybrid, GPU systems. I have read that it is easier to make it work with nvidia-drm-kmod, but I am unsure how that would work.

    I am unsure how legit this is, but that is what Grok gave me.

    1. Install Drivers

      • Command: pkg install nvidia-driver nvidia-drm-kmod
      • (No direct link; standard FreeBSD package install assumed.)
    2. Enable NVIDIA DRM (NVIDIA README #1)

      • Edit /boot/loader.conf:
             nvidia_load="YES"
             nvidia-drm_load="YES"
             hw.nvidia-modeset=1
      • Reboot.
    3. Identify GPU BusIDs (Xorg Man #2)

      • Run: pciconf -lv | grep -B 3 -i vga
      • Example:
        • Intel: PCI:0:2:0
        • NVIDIA: PCI:1:0:0
    4. Configure Xorg for Hybrid (Xorg Man #2, Reddit #4)

      • Create /usr/local/etc/X11/xorg.conf.d/10-hybrid.conf:
             Section "Device"
                 Identifier  "IntelGPU"
                 Driver      "intel"        # Or "modesetting"
                 BusID       "PCI:0:2:0"    # Adjust from pciconf
             EndSection
        
             Section "Device"
                 Identifier  "NvidiaGPU"
                 Driver      "nvidia"
                 BusID       "PCI:1:0:0"    # Adjust from pciconf
                 Option      "AllowEmptyInitialConfiguration" "true"
             EndSection
        
             Section "Screen"
                 Identifier  "IntelScreen"
                 Device      "IntelGPU"
             EndSection
      • Intel displays; NVIDIA offloads.

    DHOC_TAZH
    Kindly keep your updates in a single thread rather than spreading them across multiple ones. It helps everyone follow your progress more easily. Thank you!

    Your system is running Optimus-style hybrid graphics (Intel UHD 630 + NVIDIA GTX 1050). These are notoriously tricky on BSD systems, as FreeBSD lacks full PRIME or nvidia-prime support like Linux.

    You have three main choices:
    Option 1: Use Intel Only (Simpler, More Stable)
    Option 2: Use Nvidia GPU only
    Option 3: Hybrid GPU with Offloading (Advanced)

    Eric suggested Option 3.

    Here is a script to help. It does the following:

    • GPU detection
    • Driver and config installation
    • Three GPU modes: intel, nvidia, hybrid
    • Mode persistence across reboots via /etc/gpu-mode.conf
    • Startup service via /usr/local/etc/rc.d/gpu-mode
    #!/bin/sh
    # Name: setup-gpu-modes.sh
    
    set -eu
    
    # Require root privileges
    if [ "$(id -u)" -ne 0 ]; then
      echo "This script must be run as root." >&2
      exit 1
    fi
    
    fail() {
      echo "Error: $1" >&2
      exit 1
    }
    
    echo "Detecting GPUs..."
    
    GPU_OUTPUT=$(pciconf -lv)
    INTEL_BUSID=$(echo "$GPU_OUTPUT" | awk '/VGA compatible controller: Intel/ {getline; print $2}' | cut -d@ -f2 || true)
    NVIDIA_BUSID=$(echo "$GPU_OUTPUT" | awk '/VGA compatible controller: NVIDIA/ {getline; print $2}' | cut -d@ -f2 || true)
    
    [ -n "$INTEL_BUSID" ] || fail "Intel GPU not detected."
    [ -n "$NVIDIA_BUSID" ] || fail "NVIDIA GPU not detected."
    
    echo "Intel GPU BusID: PCI:$INTEL_BUSID"
    echo "NVIDIA GPU BusID: PCI:$NVIDIA_BUSID"
    
    for pkgname in nvidia-driver nvidia-drm-kmod; do
      if ! pkg info -e "$pkgname"; then
        echo "Installing $pkgname..."
        pkg install -y "$pkgname" || fail "Failed to install $pkgname"
      else
        echo "$pkgname is already installed."
      fi
    done
    
    LOADER_CONF="/boot/loader.conf"
    
    add_sysrc_if_missing() {
      local key=$1
      local value=$2
      if ! grep -q "^$key=" "$LOADER_CONF" 2>/dev/null; then
        sysrc -f "$LOADER_CONF" "${key}=${value}" || fail "Failed to add $key to loader.conf"
      else
        echo "$key is already set in loader.conf"
      fi
    }
    
    echo "Enabling NVIDIA kernel modules..."
    add_sysrc_if_missing nvidia_load YES
    add_sysrc_if_missing nvidia-drm_load YES
    add_sysrc_if_missing hw.nvidia.modeset 1
    
    X11_DIR="/usr/local/etc/X11/xorg.conf.d"
    mkdir -p "$X11_DIR" || fail "Failed to create $X11_DIR"
    
    OFFLOAD_BIN="/usr/local/bin/nvidia-offload"
    if [ ! -f "$OFFLOAD_BIN" ]; then
      echo "Creating nvidia-offload launcher..."
      cat <<'EOF' > "$OFFLOAD_BIN"
    #!/bin/sh
    export DRI_PRIME=1
    exec "$@"
    EOF
      chmod +x "$OFFLOAD_BIN" || fail "Failed to make nvidia-offload executable"
    else
      echo "nvidia-offload already exists: $OFFLOAD_BIN"
    fi
    
    MODE_SWITCHER="/usr/local/sbin/gpu-mode"
    if [ ! -f "$MODE_SWITCHER" ]; then
      echo "Creating GPU mode switcher..."
      cat <<EOF > "$MODE_SWITCHER"
    #!/bin/sh
    MODE="\$1"
    CONF_DIR="/usr/local/etc/X11/xorg.conf.d"
    CONF_FILE="/etc/gpu-mode.conf"
    
    if [ -z "\$MODE" ]; then
      echo "Usage: gpu-mode {intel|nvidia|hybrid}"
      exit 1
    fi
    
    case "\$MODE" in
      intel)
        echo "Switching to Intel-only mode..."
        rm -f "\$CONF_DIR"/10-*.conf
        cat <<EOT > "\$CONF_DIR/10-intel-only.conf"
    Section "Device"
        Identifier "IntelOnly"
        Driver "modesetting"
        BusID "PCI:$INTEL_BUSID"
    EndSection
    EOT
        ;;
      nvidia)
        echo "Switching to NVIDIA-only mode..."
        rm -f "\$CONF_DIR"/10-*.conf
        cat <<EOT > "\$CONF_DIR/10-nvidia-only.conf"
    Section "Device"
        Identifier "NvidiaOnly"
        Driver "nvidia"
        BusID "PCI:$NVIDIA_BUSID"
        Option "AllowEmptyInitialConfiguration" "true"
    EndSection
    EOT
        ;;
      hybrid)
        echo "Switching to Hybrid mode..."
        rm -f "\$CONF_DIR"/10-*.conf
        cat <<EOT > "\$CONF_DIR/10-hybrid.conf"
    Section "Device"
        Identifier  "IntelGPU"
        Driver      "modesetting"
        BusID       "PCI:$INTEL_BUSID"
    EndSection
    
    Section "Device"
        Identifier  "NvidiaGPU"
        Driver      "nvidia"
        BusID       "PCI:$NVIDIA_BUSID"
        Option      "AllowEmptyInitialConfiguration" "true"
    EndSection
    
    Section "Screen"
        Identifier  "IntelScreen"
        Device      "IntelGPU"
    EndSection
    EOT
        ;;
      *)
        echo "Invalid mode: \$MODE"
        echo "Usage: gpu-mode {intel|nvidia|hybrid}"
        exit 1
        ;;
    esac
    
    echo "\$MODE" > "\$CONF_FILE"
    echo "Mode set to \$MODE. Please restart your display manager or reboot."
    EOF
    
      chmod +x "$MODE_SWITCHER" || fail "Failed to make gpu-mode executable"
    else
      echo "GPU mode switcher already exists: $MODE_SWITCHER"
    fi
    
    RC_SCRIPT="/usr/local/etc/rc.d/gpu-mode"
    if [ ! -f "$RC_SCRIPT" ]; then
      echo "Creating GPU mode boot-time loader..."
      mkdir -p /usr/local/etc/rc.d
      cat <<EOF > "$RC_SCRIPT"
    #!/bin/sh
    
    # PROVIDE: gpu_mode
    # REQUIRE: mountcritlocal
    # KEYWORD: shutdown
    
    . /etc/rc.subr
    
    name="gpu_mode"
    rcvar="gpu_mode_enable"
    start_cmd="gpu_mode_start"
    stop_cmd=":"
    
    gpu_mode_start() {
        if [ -f /etc/gpu-mode.conf ]; then
            MODE=\$(cat /etc/gpu-mode.conf)
            echo "Restoring GPU mode at boot: \$MODE"
            /usr/local/sbin/gpu-mode "\$MODE"
        else
            echo "No saved GPU mode found, skipping..."
        fi
    }
    
    load_rc_config \$name
    run_rc_command "\$1"
    EOF
    
      chmod +x "$RC_SCRIPT"
      sysrc gpu_mode_enable=YES
    else
      echo "Boot loader script already exists: $RC_SCRIPT"
    fi
    
    echo
    echo "Setup complete."
    echo
    echo "To switch GPU modes now, run:"
    echo "  gpu-mode intel     # Use Intel GPU only"
    echo "  gpu-mode nvidia    # Use NVIDIA GPU only"
    echo "  gpu-mode hybrid    # Hybrid mode (Intel display, NVIDIA offload)"
    echo
    echo "To launch a program on NVIDIA in hybrid mode:"
    echo "  nvidia-offload firefox"
    echo
    echo "Your selected mode will be restored automatically on next boot."

    OK, sorry about the multiple threads. I'll stick the rest of the graphical issues here.

    Ok... still can't load either GPU at boot time in any mode. Been at this for about two hours now.

    Trying to get the scfb driver back on, but I have to stop the nvidia modules from loading. I do know how to use single mode with the specific command for invoking read-write mode.

    I'm really tired now so I'll continue trying to fix this problem later.

      DHOC_TAZH
      Did you receive any errors when running the script?

      I didn't use the script, I ran the method posted by ericbsd above. Ended up reinstalling GhostBSD. Just finished reconfiguring the system, on it as I type this.

      If I run the script, do I need to run it in terminal mode, outside of the desktop? I've no clue about using a wireless connection for internet away from the desktop. If I have to I could briefly use Ethernet, but prefer to go wireless.

        DHOC_TAZH
        Yes, you will need to be at a terminal console shell prompt and have network access.

        Made a few trial runs with the script.

        It stops at "Intel GPU not detected." Not sure how that happens as the command for detecting the GPUs indicates it's present.

          DHOC_TAZH
          Try this script.

          #!/bin/sh
          # Name: setup-gpu-modes.sh
          
          set -eu
          
          # Require root privileges
          if [ "$(id -u)" -ne 0 ]; then
            echo "This script must be run as root." >&2
            exit 1
          fi
          
          fail() {
            echo "Error: $1" >&2
            exit 1
          }
          
          echo "Detecting GPUs..."
          
          INTEL_LINE=$(pciconf -lv | awk '/Intel Corporation/ && /VGA|display controller/ {print; exit}')
          NVIDIA_LINE=$(pciconf -lv | awk '/NVIDIA Corporation/ && /VGA|display controller/ {print; exit}')
          
          echo "Detected Intel GPU Line: $INTEL_LINE"
          echo "Detected NVIDIA GPU Line: $NVIDIA_LINE"
          
          INTEL_BUSID=$(echo "$INTEL_LINE" | sed -E 's/.*@pci([0-9:]+).*/\1/')
          NVIDIA_BUSID=$(echo "$NVIDIA_LINE" | sed -E 's/.*@pci([0-9:]+).*/\1/')
          
          [ -n "$INTEL_BUSID" ] || fail "Intel GPU not detected."
          [ -n "$NVIDIA_BUSID" ] || fail "NVIDIA GPU not detected."
          
          echo "Intel GPU BusID: PCI:$INTEL_BUSID"
          echo "NVIDIA GPU BusID: PCI:$NVIDIA_BUSID"
          
          for pkgname in nvidia-driver nvidia-drm-kmod; do
            if ! pkg info -e "$pkgname"; then
              echo "Installing $pkgname..."
              pkg install -y "$pkgname" || fail "Failed to install $pkgname"
            else
              echo "$pkgname is already installed."
            fi
          done
          
          LOADER_CONF="/boot/loader.conf"
          
          add_sysrc_if_missing() {
            local key=$1
            local value=$2
            if ! grep -q "^$key=" "$LOADER_CONF" 2>/dev/null; then
              sysrc -f "$LOADER_CONF" "${key}=${value}" || fail "Failed to add $key to loader.conf"
            else
              echo "$key is already set in loader.conf"
            fi
          }
          
          echo "Enabling NVIDIA kernel modules..."
          add_sysrc_if_missing nvidia_load YES
          add_sysrc_if_missing nvidia-drm_load YES
          add_sysrc_if_missing hw.nvidia.modeset 1
          
          X11_DIR="/usr/local/etc/X11/xorg.conf.d"
          mkdir -p "$X11_DIR" || fail "Failed to create $X11_DIR"
          
          OFFLOAD_BIN="/usr/local/bin/nvidia-offload"
          if [ ! -f "$OFFLOAD_BIN" ]; then
            echo "Creating nvidia-offload launcher..."
            cat <<'EOF' > "$OFFLOAD_BIN"
          #!/bin/sh
          export DRI_PRIME=1
          exec "$@"
          EOF
            chmod +x "$OFFLOAD_BIN" || fail "Failed to make nvidia-offload executable"
          else
            echo "nvidia-offload already exists: $OFFLOAD_BIN"
          fi
          
          MODE_SWITCHER="/usr/local/sbin/gpu-mode"
          if [ ! -f "$MODE_SWITCHER" ]; then
            echo "Creating GPU mode switcher..."
            cat <<EOF > "$MODE_SWITCHER"
          #!/bin/sh
          MODE="\$1"
          CONF_DIR="/usr/local/etc/X11/xorg.conf.d"
          CONF_FILE="/etc/gpu-mode.conf"
          
          INTEL_BUSID="$INTEL_BUSID"
          NVIDIA_BUSID="$NVIDIA_BUSID"
          
          if [ -z "\$MODE" ]; then
            echo "Usage: gpu-mode {intel|nvidia|hybrid}"
            exit 1
          fi
          
          case "\$MODE" in
            intel)
              echo "Switching to Intel-only mode..."
              rm -f "\$CONF_DIR"/10-*.conf
              cat <<EOT > "\$CONF_DIR/10-intel-only.conf"
          Section "Device"
              Identifier "IntelOnly"
              Driver "modesetting"
              BusID "PCI:\$INTEL_BUSID"
          EndSection
          EOT
              ;;
            nvidia)
              echo "Switching to NVIDIA-only mode..."
              rm -f "\$CONF_DIR"/10-*.conf
              cat <<EOT > "\$CONF_DIR/10-nvidia-only.conf"
          Section "Device"
              Identifier "NvidiaOnly"
              Driver "nvidia"
              BusID "PCI:\$NVIDIA_BUSID"
              Option "AllowEmptyInitialConfiguration" "true"
          EndSection
          EOT
              ;;
            hybrid)
              echo "Switching to Hybrid mode..."
              rm -f "\$CONF_DIR"/10-*.conf
              cat <<EOT > "\$CONF_DIR/10-hybrid.conf"
          Section "Device"
              Identifier  "IntelGPU"
              Driver      "modesetting"
              BusID       "PCI:\$INTEL_BUSID"
          EndSection
          
          Section "Device"
              Identifier  "NvidiaGPU"
              Driver      "nvidia"
              BusID       "PCI:\$NVIDIA_BUSID"
              Option      "AllowEmptyInitialConfiguration" "true"
          EndSection
          
          Section "Screen"
              Identifier  "IntelScreen"
              Device      "IntelGPU"
          EndSection
          EOT
              ;;
            *)
              echo "Invalid mode: \$MODE"
              echo "Usage: gpu-mode {intel|nvidia|hybrid}"
              exit 1
              ;;
          esac
          
          echo "\$MODE" > "\$CONF_FILE"
          echo "Mode set to \$MODE. Please restart your display manager or reboot."
          EOF
          
            chmod +x "$MODE_SWITCHER" || fail "Failed to make gpu-mode executable"
          else
            echo "GPU mode switcher already exists: $MODE_SWITCHER"
          fi
          
          RC_SCRIPT="/usr/local/etc/rc.d/gpu-mode"
          if [ ! -f "$RC_SCRIPT" ]; then
            echo "Creating GPU mode boot-time loader..."
            mkdir -p /usr/local/etc/rc.d
            cat <<EOF > "$RC_SCRIPT"
          #!/bin/sh
          
          # PROVIDE: gpu_mode
          # REQUIRE: mountcritlocal
          # KEYWORD: shutdown
          
          . /etc/rc.subr
          
          name="gpu_mode"
          rcvar="gpu_mode_enable"
          start_cmd="gpu_mode_start"
          stop_cmd=":"
          
          gpu_mode_start() {
              if [ -f /etc/gpu-mode.conf ]; then
                  MODE=\$(cat /etc/gpu-mode.conf)
                  echo "Restoring GPU mode at boot: \$MODE"
                  /usr/local/sbin/gpu-mode "\$MODE"
              else
                  echo "No saved GPU mode found, skipping..."
              fi
          }
          
          load_rc_config \$name
          run_rc_command "\$1"
          EOF
          
            chmod +x "$RC_SCRIPT"
            sysrc gpu_mode_enable=YES
          else
            echo "Boot loader script already exists: $RC_SCRIPT"
          fi
          
          echo
          echo "Setup complete."
          echo
          echo "To switch GPU modes now, run:"
          echo "  gpu-mode intel     # Use Intel GPU only"
          echo "  gpu-mode nvidia    # Use NVIDIA GPU only"
          echo "  gpu-mode hybrid    # Hybrid mode (Intel display, NVIDIA offload)"
          echo
          echo "To launch a program on NVIDIA in hybrid mode:"
          echo "  nvidia-offload firefox"
          echo
          echo "Your selected mode will be restored automatically on next boot."

          OK... just looked into some things. I noticed when I went to check the kernel version, it is this:

          home@home-ghostbsd ~> uname -a
          FreeBSD alvr-ghostbsd 14.2-RELEASE-p2 FreeBSD 14.2-RELEASE-p2 n230744-26127ca9fef GENERIC amd64

          Isn't that kernel newer than what the latest GhostBSD install ships with? So... I'm guessing I will need to update my ports and dev repos, yes? Then proceed with recompiling the i915kms and nvidia modules and drivers... maybe that's why I'm having issues getting either GPU to work for me.

          (Then again I have no issues with i915kms on an older PC that has GhostBSD installed...)

          Patch level 2 is packaged for GhostBSD.

          Ah, ok, thanks. So theoretically, the current Intel and Nvidia drivers compiled for GhostBSD should work with my Intel 8th Gen i7 and GTX 1050 then.

          My guess at this point is if I didn't have any other OS's on that PC, it would likely work without issues (as it does with my older 2012 PC, there's no other OS on that one...). Unfortunately for me, I still use the newer one for work (using Win11 and some Linux programs) so it would be tricky to uproot the thing to find out. Ugh. :/

            DHOC_TAZH
            Yes, it's true, having one computer is never enough.