nvidia-update - Simple way to install nVidia web drivers

Discussion in 'Graphics' started by benjamin.dobell, Feb 4, 2018.

  1. benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    Feb 4, 2018 at 2:14 PM #1
    benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    Given the recent issues with official nVidia web driver releases (namely 387.10.10.10.25.156 and 387.10.10.10.25.157), I decided to put together a dead simple one-stop solution for updating to the latest reliable nVidia web drivers.

    It's called nvidia-update and hopefully makes life easier for you guys.

    https://github.com/Benjamin-Dobell/nvidia-update

    The script is open-source (MIT licensed) and pull requests are welcome.

    It does the following:

    • Checks for official driver updates for your version of macOS.
    • Cross-references against a list of blacklisted drivers, that it'll avoid installing (by default).
    • Properly uninstalls old drivers.
    • Downloads and installs the latest non-blacklisted drivers.
    • On-the-fly patches driver packages so they can be installed on your version of macOS (if necessary).
    • Patches drivers that you've already installed, if they no longer match your macOS version i.e. post macOS update.

    The script has a fair few smarts to it, but is implemented more robustly/carefully than some of the alternatives out there. For example, instead of manually copying files to hard-coded paths, all installation and uninstallation takes place by running nVidia's package (.pkg) files; which install to the correct location and properly clean-up after themselves.

    Execution

    Simply paste the following line in a terminal:

    bash <(curl -s https://raw.githubusercontent.com/Benjamin-Dobell/nvidia-update/master/nvidia-update.sh)

    You can of course download/save the script to your computer if you prefer to, doing so gives you access to a couple of advanced options, but for normal use they're not required.

    Clover / Boot Configuration

    The script doesn't mess with any boot behaviour on your system, and Clover setup is left up to you. You'll likely want the following kernel extensions installed in your EFI Clover kext directory:

     
  2. Romano2K

    Romano2K

    Joined:
    Feb 3, 2011
    Messages:
    12
    Motherboard:
    GA-Z170N-WiFi
    CPU:
    i7-6700
    Graphics:
    GTX 1080
    Mobile Phone:
    Android, iOS
    Feb 5, 2018 at 11:11 PM #2
    Romano2K

    Romano2K

    Joined:
    Feb 3, 2011
    Messages:
    12
    Motherboard:
    GA-Z170N-WiFi
    CPU:
    i7-6700
    Graphics:
    GTX 1080
    Mobile Phone:
    Android, iOS
    Works great! Solved the performance problems with Nvidia 387.10.10.10.25.156 on macOS 10.3.3. Thank you!
     
    benjamin.dobell likes this.
  3. ChandlerVer5

    ChandlerVer5

    Joined:
    Dec 12, 2017
    Messages:
    10
    Motherboard:
    T57-S5
    CPU:
    I7 6700HQ
    Graphics:
    NVIDIA GTX 965M
    Feb 6, 2018 at 3:40 AM #3
    ChandlerVer5

    ChandlerVer5

    Joined:
    Dec 12, 2017
    Messages:
    10
    Motherboard:
    T57-S5
    CPU:
    I7 6700HQ
    Graphics:
    NVIDIA GTX 965M
    Thanks ,you solve my problem. Can I reprint this article to the Chinese Forum? will maintain the article source.
     
  4. benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    Feb 6, 2018 at 3:41 AM #4
    benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    Sure :)
     
  5. ChandlerVer5

    ChandlerVer5

    Joined:
    Dec 12, 2017
    Messages:
    10
    Motherboard:
    T57-S5
    CPU:
    I7 6700HQ
    Graphics:
    NVIDIA GTX 965M
    Feb 6, 2018 at 3:53 AM #5
    ChandlerVer5

    ChandlerVer5

    Joined:
    Dec 12, 2017
    Messages:
    10
    Motherboard:
    T57-S5
    CPU:
    I7 6700HQ
    Graphics:
    NVIDIA GTX 965M
    done.
     
    benjamin.dobell likes this.
  6. michelb76

    michelb76

    Joined:
    May 19, 2017
    Messages:
    16
    Motherboard:
    Gigabyte Gaming 7 Z170
    CPU:
    I7-6700k
    Graphics:
    EVGA GTX-1080 FTW
    Mac:
    MacBook Pro, Mac mini
    Feb 6, 2018 at 7:49 AM #6
    michelb76

    michelb76

    Joined:
    May 19, 2017
    Messages:
    16
    Motherboard:
    Gigabyte Gaming 7 Z170
    CPU:
    I7-6700k
    Graphics:
    EVGA GTX-1080 FTW
    Mac:
    MacBook Pro, Mac mini
    So do you know which version got installed? .104 I guess?
     
  7. benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    Feb 6, 2018 at 8:33 AM #7
    benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    It'll install the most recent non-blacklisted driver, which at the moment is 378.10.10.10.25.106.

    Presently only 387.10.10.10.25.156 and 387.10.10.10.25.157 are blacklisted - https://github.com/Benjamin-Dobell/nvidia-update/blob/master/BLACKLIST.

    EDIT: By the way, it does output which driver it's installed.

    You can also run it as often as you like and it'll only download drivers and make changes if necessary (unless you download the script and specifically run it with --force).

    For example, at the moment, anyone already running 378.10.10.10.25.106 who runs the script will just see the following:

    ~ bash <(curl -s https://raw.githubusercontent.com/Benjamin-Dobell/nvidia-update/master/nvidia-update.sh)
    Downloading driver blacklist...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 40 100 40 0 0 101 0 --:--:-- --:--:-- --:--:-- 102

    Downloading driver list...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 54650 100 54650 0 0 41229 0 0:00:01 0:00:01 --:--:-- 41214

    The latest driver revision is 378.10.10.10.25.106

    378.10.10.10.25.106 is already installed.​
     
    Last edited: Feb 6, 2018
  8. bogdanw

    bogdanw

    Joined:
    Mar 29, 2011
    Messages:
    230
    Motherboard:
    GA-Z170X-UD3 (F23g)
    CPU:
    Intel Core i5-7400
    Graphics:
    Asus Radeon RX 560 4GB
    Feb 7, 2018 at 3:25 PM #8
    bogdanw

    bogdanw

    Joined:
    Mar 29, 2011
    Messages:
    230
    Motherboard:
    GA-Z170X-UD3 (F23g)
    CPU:
    Intel Core i5-7400
    Graphics:
    Asus Radeon RX 560 4GB
    Hello, thank you for a great script. Just one question: is it really necessary to modify NVDAStartupWeb.kext? Couldn't we just install NVDAResmanWeb, NVDAGP100HalWeb.kext, GeForceWeb.kext, run kextload for each and let Clover do what it’s already doing, forcing the use of webdriver as soon as it detects the NVIDIA card. I’m asking because at one point in testing NVDAStartupWeb appeared as not loaded and not loadable, but the rest were loaded and graphics seemed ok.
     
  9. benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    Feb 7, 2018 at 3:38 PM #9
    benjamin.dobell

    benjamin.dobell

    Joined:
    Feb 4, 2018
    Messages:
    47
    Motherboard:
    GA-B150N Phoenix-WIFI
    CPU:
    i7 6700
    Graphics:
    EVGA GTX 1070 SC
    Mac:
    MacBook Pro
    Mobile Phone:
    Android
    The only thing modified is NVDAStartupWeb's Info.plist, specifically one text field which indicates which macOS version the drivers are for, the binaries are in no way modified.

    I believe this is a (near) optimal solution as we're not having to mess around manually loading kexts, which seems far too fragile i.e. the required kexts will be different for different hardware (GPUs) and kexts may change filenames/structure between updates etc. For the most part we're simply using the official drivers exactly as nVidia intended, with the exception of macOS version. Additionally, because the patching happens on installation time if something does go wrong (e.g. nVidia rename "NVDAStartupWeb" to something else), the installation will fail up-front in a very obvious way. This behaviour is deterministic, which is a good thing :)

    The only solution that I'd think would be more seamless for users would be if we just automatically patched the drivers from Clover. I've thought about it but aren't too bothered looking into it at the moment, ideally nVidia will stop releasing broken drivers ;)

    Regardless, even if we patch the startup kext in Clover, we still need to patch the packages (.pkg) to install them in the first place; so it's not a big deal patching the Info.plist whilst we're at it.
     
  10. ashman70

    ashman70

    Joined:
    Jan 4, 2011
    Messages:
    817
    Motherboard:
    Asus F555L
    CPU:
    Intel i3-5010U 2.1GHz
    Graphics:
    Intel Graphics 5500
    Mac:
    MacBook Pro
    Mobile Phone:
    iOS
    Feb 8, 2018 at 12:05 AM #10
    ashman70

    ashman70

    Joined:
    Jan 4, 2011
    Messages:
    817
    Motherboard:
    Asus F555L
    CPU:
    Intel i3-5010U 2.1GHz
    Graphics:
    Intel Graphics 5500
    Mac:
    MacBook Pro
    Mobile Phone:
    iOS
    So there is no danger implementing this even if you don't put the suggested kexts in your EFI Clover kext directory? I'm not going to wind up with a black screen if implement this script without the kexts?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice