Created attachment 218141 [details]
Patch for x11/nvidia-driver
Update x11/nvidia-driver and x11/linux-nvidia-libs to latest 450.66.
Minimal changes, possibly incomplete. No new files are checked.
Applicable on /usr/ports after r549424.
(Conflicts with glesv1 libs installed by graphics/mesa-libs before it.)
Note: libnvidia-fatbinaryloader.so is removed from linux-nvidia-libs at 450.57.
See  below for detail.
Created attachment 218142 [details]
Patch for x11/linux-nvidia-libs
Patch for x11/linux-nvidia-libs.
Applicable on /usr/ports.
Created attachment 218162 [details]
Patch for x11/linux-nvidia-libs (rev2)
Created previous patch against accidentally edited Makefile.
This revision should apply OK on /usr/ports.
(In reply to Tomoaki AOKI from comment #2)
I'll leave this as a reference: https://github.com/shkhln/revird-aidivn/commit/c862309d3b5e6f0e95af2053d3d38fda5f4f2ecf.
nvidia-driver is the main part here, reassign.
Created attachment 220379 [details]
Update to 450.80.02
The latest LTS version is 450.80.02 AFAICT. I've updated the patches to it.
Created attachment 220380 [details]
Update to 450.80.02 (Rev. 2)
Sorry, I screwed up distinfo. Corrected.
Created attachment 221657 [details]
Update to 460.32.03
Now latest Production Branch of nvidia-driver is at 460.32.03, so follow it.
Beware! This patch is...
*Based on Jung-uk Kim's latest patch.
*Minimal update for successful build.
*Some patches on files/ are no longer applicable to 460.32.03
and this updated patch no longer mentions 450.x driver.
So with this patch, building 450.x driver should fail.
*All ports included in this patch are built successfull for me,
but only nvidia-driver, linux-nvidia-libs and nvidia-settings are
installed / tested on my daily use.
Encountered no NEW regression, but some known-to-me regressions are left.
*Newly introduced files are not-at-all checked, so something should be missed.
(In reply to Tomoaki AOKI from comment #7)
> but some known-to-me regressions are left
(In reply to Alex S from comment #8)
Menus of gtk2 apps like mail/sylpheed SOMETIMES rendered as black panel.
(Partially shown on redraw under mouse cursor or other window, though.)
Possibly not of nvidia-driver, but not tested on other drivers.
Maybe racy, as it's USUALLY OK.
SOMETIMES nvidia-driver initialization fails and X does not start.
Almost always OK after reboot.
Not encountered yet after I've switched to 460.32.03, but no warranty.
Possibly xorg problem, but unclear.
nvidia-settings does not properly fetch screen geometory.
Resolution is OK, but recognized as huge physical screen with 96 DPI.
Actually, 15.6 inch 4K panel on ThinkPad P52.
Some (not all) buttons with CJK characters are not properly rendered.
Button text are rendered too large and overflow.
Possibly something I've forgotton...
Created attachment 221933 [details]
Update to 460.32.03 (rev.2)
Update patch to allow building/installing on 14-current (git main) following stable/13 branch.
Just loosing OS version check. Only 2 bytes changed.
No other investigations done.
A commit references this bug:
Date: Fri Feb 5 07:27:58 UTC 2021
New revision: 564088
Update nVidia main driver, Linux libraries, and tools to version 460.36.
PR: 249505, 250277
The driver and ancillary ports have been updated to the latest stable version 460.39 as of ports r564088.
Reopen. nvidia-driver.ko cannot be kldloaded at least a configuration
as reported at .
Ad-hoc patch would be uploaded shortly.
_FILE_COMPLETE_OPTIONS_LIST=ACPI_PM DOCS LINUX WBINVD
Created attachment 222183 [details]
Ad-hoc patch for 460.39, applicable over port r564088
Ad-hoc patch for port r564088 to allow kldloading nvidia.ko.
Would fix following error reported (or I was going to report, if not) by Christoph Moench-Tegeder. 
kernel: link_elf_obj: symbol nvidia_driver_name undefined
kernel: KLD file nvidia.ko - could not finalize loading
kernel: KLD file nvidia-modeset.ko - cannot find dependency "nvidia"