On intel+nvidia laptop, on Linux may I shutdown intel and use just nvidia?

2

Here I have a Lenovo T480 with intel and nvidia graphics. I'm running Debian 9 and I installed nvidia driver from https://www.nvidia.com/Download/driverResults.aspx/156772/en-us

Looks like nvidia drivers are installed but i915, which is the one for intel (right?) is still there?

Is it possible to use just nvidia? I want to run an opengl based app and best performance just for that. I hope to see cpu usage on htop to go down. Does this make sense?

# lsmod | grep nvidia*
nvidia_drm             45056  0
nvidia_modeset       1110016  1 nvidia_drm
nvidia              20381696  1 nvidia_modeset
ipmi_msghandler        49152  1 nvidia
drm_kms_helper        155648  2 i915,nvidia_drm
drm                   360448  6 i915,nvidia_drm,drm_kms_helper

KcFnMi

Posted 2020-02-22T12:20:56.727

Reputation: 396

Answers

2

It's best to do the following:

  1. Add the non-free section of the Debian repository to the list of package sources to APT. See this.

    Run # apt update

    Now you have the nvidia-driver package available—it depends on a number of other packages which provide nVidia-produced "binary blob" proprietary driver.

    The upside of using it over whatever you have downloaded is that this package will be properly updated by the means of APT (and can be rolled back to a previous version in case of a problem, etc). It will also will get properly upgraded when you will decide to upgrade to Debian 10 (you probably should).

  2. Install nvidia-driver, reboot.

  3. Look into the X Server log (run less /var/log/Xorg.0.log) and see which driver got loaded for your card. It must not mention "nouveau" and also it should not be "i915" etc. It should be something with the word "nvidia" in it ;-)

  4. Try running an OpenGL-enabled app and see if the problem is fixed.

    It's probably best to install the mesa-utils package and then run

     $ glxinfo -B
    

    and look into what it prints about the "Device" and "Vendor" of the GLX device it found. (The package also includes that classic glxgears gizmo ;-))

  5. If it's not, install bumblebee and use it to switch the cards between the i915 and nVidia.

kostix

Posted 2020-02-22T12:20:56.727

Reputation: 2 435

In the mid time I actually updated to Debian 10. After installing nvidia-driver, glxinfo output says Intel is being used. – KcFnMi – 2020-02-22T17:07:44.427

1

@KcFnMi, so, some directions to explore: 1) nvidia-xconfig (won't work if you're using GNOME on Wayland which is IMO default in Debian 10); 2) Try Bumblebee as already suggested; 3) blacklist i915 and see what happens (basically the kernel should not "see" your built-in video card with this setup).

– kostix – 2020-02-24T18:13:09.637