Bash scripts to automate installation of NVIDIA proprietary driver

You can try. But you may need to patch the source code to follow CL’s conventions.

As I said in previous thread, I don’t have a device for testing. So I won’t give you any support.

I tried to disable intel gpu and now I get a completely black screen and no white screen.

try: press Ctrl + Shift + F2/F3/… to go the the tty

Yeah did but not able to load graphical interface.nvidia driver loads fine .but display manager has issue.it boots to a black screen with _ on the top but doesn’t go to the login screen. I hope anybody with optimus makes a guide on how to install driver properly.

As I said, NVIDIA officially says this is not a supported use case.

Some other distros support it and you should consider use one of these distros.

CL is not intended for desktop usage.

I would like to get some extra performance with cl and nv.but this happens.

Did someone successfully install drivers on optimus previously.?

yes. but he’s able to disable integrated GPU in bios. and this is the exact exception that you can install the driver on Optimus laptop, mentioned by NVIDIA

How do I fix unable to determine default library path error after running install.bash

my script doesn’t print that error

It did give me a warning when run install.bash

paste the exact output here

./install.bash
:hourglass_flowing_sand: Locating NVIDIA-Linux-x86_64-.run …
:hourglass_flowing_sand: Configuring dynamic linker configuration …
Password:
Updating dynamic linker run-time bindings and library cache …
:hourglass_flowing_sand: Configuring Xorg to search for additional module …
:hourglass_flowing_sand: Installing NVIDIA proprietary Driver now …
If the installation is successful, GUI may automatically start.
Please run the post_install.bash to validate that the nvidia kernel modules are loaded.
The version of the driver is 390.138
Press any key to continue …
Verifying archive integrity… OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 390.138…

WARNING: Unable to determine the default library path. The path /opt/nvidia/lib
will be used, but this path was not detected in the ldconfig(8) cache,
and no directory exists at this path, so it is likely that libraries
installed there will not be found by the loader.

WARNING: Unable to determine the default X library path. The path
/opt/nvidia/lib will be used, but this path was not detected in the
ldconfig(8) cache, and no directory exists at this path, so it is
likely that libraries installed there will not be found by the
loader.

glxinfo
name of display: :0
Error: couldn’t find RGB GLX visual or fbconfig

08:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
Subsystem: Dell GeForce 820M
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

  • they’re warnings and not error
  • they come from the installer
  • if you didn’t change anything and had run the pre_install script then it’s totally fine

I won’t reply to any of your questions. Because I have repeatedly told you

  • This repo is not intended for your use case
  • Your setup is not officially supported by NVIDIA
  • I cannot test any workarounds because I don’t have a Optimus laptop

Ok.thanks anyways.i will try myself.

Got it working with @specter instructions

How to add different boot entries with different kernel parameters to boot intel on one entry and with nvidia on other entry

Hi I have an issue, I used this scripts (pre_install, install and post_install) to install nvidia latest drivers but it is only recognizing my first gpu rtx 2060 and not my second one gt 710, anything I have try in /etc/X11/xorg.conf results in gnome not loading even using the file that /opt/nvidia/bin/nvidia-xconfig generates without changes same if I try to make any config in /etc/X11/xorg.conf.d/nvidia.conf, if I have no xorg.conf everything works except for my second gpu, also if I unplug rtx2060 now gt710 works, any idea of what can I try to make it work?

Can you post you xorg.conf?
Both of my 1080 Ti could be found correctly. But SLI is not working. ( Same as many other distro )

This is what’s generated with /opt/nvidia/bin/nvidia-xconfig:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 450.57

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/mouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I have also try with something like this(which is working in pop os):

 Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung C27JG5x"
    HorizSync       30.0 - 225.0
    VertRefresh     50.0 - 144.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: unknown, VertRefresh source: unknown
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Lenovo Group Limited LEN T24i-10"
    HorizSync       0.0 - 0.0
    VertRefresh     0.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce RTX 2060"
    BusID          "PCI:45:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 710"
    BusID          "PCI:41:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-3"
    Option         "metamodes" "nvidia-auto-select +0+0"
    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" "0"
    Option         "metamodes" "nvidia-auto-select +0+0 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Both files results in black screen and I have to use ctrl+alt+F2 to delete xorg.conf in order to being able to use gnome.