Now that you've provided the needed information in the comment under your question, things are clear - NVIDIA Optimus (PRIME) works right as intended.
sudo lspci -k | grep -EA3 '3D|Display|VGA'
gives us the following result :
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
Kernel driver in use: i915
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
Kernel driver in use: nvidia
This means that everything is set up and works as expected - you already are using the NVIDIA GPU exclusively (as default) for rendering and the intel GPU only presents the rendered stuff to the screen.
Excerpts from NVIDIA GPU Unix Graphics Linux Forums - PRIME and PRIME Synchronization :
The X server presents two methods for sharing rendering results between drivers: "output," and "offload." If you use the proprietary NVIDIA driver with PRIME, you're probably most familiar with "output."
"Output" allows you to use the discrete GPU as the sole source of rendering, just as it would be in a traditional desktop configuration. A screen-sized buffer is shared from the dGPU to the iGPU, and the iGPU does nothing but present it to the screen.
Is this a laptop with integrated graphics (Intel + nvidia), or is it a desktop with a separate Nvidia graphics card?
integrated graphics
You can't use it like a regular Nvidia card, because the Intel card and Nvidia card are sharing the same graphics output. You need to use Prime or Bumblebee to be able to use the Nvidia card. I've been using Bumblebee for a couple of years (for better, but mostly worse), but I don't have experience of Prime, which is supposedly in better shape now. Now, these systems with Optimus grahpics, I would avoid like plague (if I only knew when I bought it). My next laptop will be Intel only (or AMD if possible).
Please provide the output from
sudo lspci -k | grep -EA3 '3D|Display|VGA'
. Thank you ! :)Certain laptop models allow disabling the integated gpu via BIOS. Doing so it will drain the battery very fast though, you better go with PRIME or bumblebee.