-
-
Notifications
You must be signed in to change notification settings - Fork 8
Add nvidia driver menu #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
xcrsz
wants to merge
6
commits into
ghostbsd:master
from
pgsdf:claude/add-nvidia-driver-menu-01Lx2ykBwt1EKRvmKLPnziNo
Closed
Add nvidia driver menu #43
xcrsz
wants to merge
6
commits into
ghostbsd:master
from
pgsdf:claude/add-nvidia-driver-menu-01Lx2ykBwt1EKRvmKLPnziNo
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Fix SCRIPT_DIR resolution to always produce absolute path using cd/pwd instead of unreliable readlink -f fallback - Add consistent error propagation across all setup_* functions; previously only setup_amd_auto handled template failures - Make NVIDIA driver version configurable via NVIDIA_DRIVER_VERSION environment variable (default: 580) - Fix enable_rc_conf to update existing keys with incorrect values, not just check for key presence - Add backup rotation to prevent unbounded growth in /etc/X11/backup; keeps last 10 backups (configurable via BACKUP_KEEP) - Cache detect_vm_guest result to avoid repeated sysctl calls during auto-detection sequence - Add detect_hybrid_gpu function for multi-vendor GPU detection; automatically selects dual config when hybrid graphics detected - Enhance debug output with GPU vendor detection status, hybrid detection result, and backup directory listing - Document NVIDIA_DRIVER_VERSION in usage text - Add warning in offline install path about dependency requirements - Add service support for virtualbox
Correct hybrid GPU detection false positives The detect_hybrid_gpu function was counting grep matches rather than actual GPU devices, causing single-GPU systems to be misidentified as hybrid configurations. Changes: - Add count_gpu_devices() to count actual VGA/display class PCI devices instead of grep line matches - Rewrite detect_hybrid_gpu to require multiple devices AND multiple vendors (Intel+NVIDIA, Intel+AMD, etc.) - Change auto-detection to prefer discrete GPU over dual config; hybrid systems now select NVIDIA > AMD > Intel by priority - Make 'dual' command manual-only for users who need displays connected to separate GPUs - Improve debug output to show GPU device count and scoped pciconf output Previously a system with one NVIDIA GPU would match multiple grep lines and incorrectly trigger the dual monitor template.
GhostBSD pkg requires exact package names including full version (nvidia-driver-580.105.08), not just major version (nvidia-driver-580). Changes: - Query pkg search to find matching package by major version - Support both major (580) and full (580.105.08) version formats - Exclude -devel packages unless explicitly requested - Fall back to latest non-legacy driver if requested version unavailable - Add selected package name to debug output Fixes installation failure: pkg: No packages available to install matching 'nvidia-driver-580'
Key Changes: 3D Controller Class Detection - NVIDIA dGPUs in laptops and servers often register as "3D controller" rather than "VGA/display". Updated detect_nvidia_gpu(), get_nvidia_device_ids(), count_gpu_devices(), and detect_hybrid_gpu() to include this class. Explicit Device ID Table - Added ~150 specific device IDs in nvidia_device_to_driver() for known edge cases that don't fit neat prefix patterns: 304 legacy: NV4x/G7x (GeForce 6xxx/7xxx) with explicit 00xx-03xx device IDs 340 legacy: Tesla architecture (GeForce 8xxx/9xxx/2xx/3xx) 390 legacy: Fermi (GTX 4xx/5xx/6xx low-end) 470 legacy: Early Kepler (GK1xx) devices dropped from 535+ Better Architecture Coverage: Added Hopper (H100, 23xx) for data center GPUs Added Volta (1dxx) for Titan V / Quadro GV100 Fixed Blackwell range (2bxx/2cxx, not all 2xxx) Separated Pascal (1bxx/1cxx) from Volta (1dxx) Enhanced Debug Output - Shows per-device driver mapping so you can see exactly what driver each GPU will get. Deduplication - get_nvidia_device_ids() now uses sort -u to avoid duplicate entries in multi-GPU systems.
Add 'nvidia-select' command for manual driver selection via bsddialog/dialog. The menu displays detected GPU device IDs, auto-detected driver recommendations, and allows users to override automatic detection when needed. Features: - Detects bsddialog (preferred) or dialog as fallback - Shows all detected NVIDIA GPUs with PCI device IDs - Lists all supported driver versions (580, 470, 390, 340, 304) - Includes "auto" option to use auto-detected driver - Allows cancel without making changes
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds an NVIDIA driver configuration/menu flow to the xconfig script, integrating it into the existing CLI/menu structure. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Update the xconfig script, likely adjusting menu or configuration handling for graphics driver selection.