<SOLVED> NVIDIA card not being used as main card

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Dephen

<SOLVED> NVIDIA card not being used as main card

Post by Dephen »

Hi!

I have a system with both an Intel UHD Graphics Card and a NVIDIA GPU. However, I believe my system is not using (for videogames for example) the NVIDIA GPU, a much better one, for processing.

Apart from my system info, I'm sending you the output of the nvidia-settings command:

System Info:

Code: Select all

inxi -Fxz
System:    Host: replicant Kernel: 4.15.0-39-generic x86_64 bits: 64 gcc: 7.3.0
           Desktop: Cinnamon 3.8.9 (Gtk 3.22.30-1ubuntu1) Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: ASUSTeK product: VivoBook 15_ASUS Laptop X560UD v: 1.0 serial: N/A
           Mobo: ASUSTeK model: X560UD v: 1.0 serial: N/A
           UEFI: American Megatrends v: X560UD.201 date: 03/30/2018
Battery    BAT0: charge: 35.7 Wh 100.1% condition: 35.7/36.0 Wh (99%) model: ASUSTeK ASUS status: Discharging
CPU:       Quad core Intel Core i7-8550U (-MT-MCP-) arch: Kaby Lake rev.10 cache: 8192 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 15936
           clock speeds: max: 4000 MHz 1: 2000 MHz 2: 2000 MHz 3: 2000 MHz 4: 2000 MHz 5: 2000 MHz 6: 2000 MHz
           7: 2000 MHz 8: 2000 MHz
Graphics:  Card-1: Intel UHD Graphics 620 bus-ID: 00:02.0
           Card-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.01hz
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2)
           version: 4.5 Mesa 18.2.2 Direct Render: Yes
Audio:     Card Intel Sunrise Point-LP HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.15.0-39-generic
Network:   Card: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter driver: ath10k_pci bus-ID: 02:00.0
           IF: wlp2s0 state: up mac: <filter>
Drives:    HDD Total Size: 1000.2GB (64.3% used)
           ID-1: /dev/sda model: ST1000LX015 size: 1000.2GB
Partition: ID-1: / size: 137G used: 16G (13%) fs: ext4 dev: /dev/sda2
           ID-2: /home size: 775G used: 580G (79%) fs: ext4 dev: /dev/sda4
           ID-3: swap-1 size: 4.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 36.5C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 266 Uptime: 7:11 Memory: 3482.6/7855.2MB Init: systemd runlevel: 5 Gcc sys: 7.3.0
           Client: Shell (bash 4.4.191) inxi: 2.3.56 

Nvidia Settings:

Code: Select all

nvidia-settings

ERROR: NVIDIA driver is not loaded

ERROR: Unable to load info from any available system
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
hcentaur13

Re: NVIDIA card not being used as main card

Post by hcentaur13 »

Linux uses the open source driver in default. Open the driver manager and it lists the commerial nvidia driver to install.
Dephen

Re: NVIDIA card not being used as main card

Post by Dephen »

hcentaur13 wrote: Fri Nov 30, 2018 12:23 pm Linux uses the open source driver in default. Open the driver manager and it lists the commerial nvidia driver to install.
I understand but there are multiple drivers displayed (check image below). However in video games, for example, I really don't think it's using the NVIDIA card. And if this NVIDIA driver is active in driver manager shouldn't nvidia-settings prompt differently?

Image

Thanks in advance
User avatar
battlenut
Level 3
Level 3
Posts: 156
Joined: Sat Oct 13, 2018 9:13 pm
Location: Currently Yokosuka JAPAN

Re: NVIDIA card not being used as main card

Post by battlenut »

Is the monitor connected to the graphics card or in the back of the Computers IO panel? if its on the graphics card it cannot be using the Intel graphics. it can in fact be using a software graphics rendering mode.
Dephen

Re: NVIDIA card not being used as main card

Post by Dephen »

battlenut wrote: Fri Nov 30, 2018 8:37 pm Is the monitor connected to the graphics card or in the back of the Computers IO panel? if its on the graphics card it cannot be using the Intel graphics. it can in fact be using a software graphics rendering mode.
The system's a laptop.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA card not being used as main card

Post by roblm »

Did you install nvidia-prime?: apt install nvidia-prime

If you did, then use these commands in the Terminal and post the output:

Code: Select all

lspci -nnk | egrep -A3 -i "3D|VGA"	          
ls /lib/modules/`uname -r`/kernel/drivers/char/drm/		
ls /etc/modprobe.d				
dpkg -l | grep -i nvidia		
mokutil --sb-state	
The forum reply window's “C” button (In-line code display) should be used for short lines or short sections in a line. It will cut off long lines, so use the </> button (code display window) instead. Some of your inxi output was cut off, but nothing of significance.
Dephen

Re: NVIDIA card not being used as main card

Post by Dephen »

roblm wrote: Sat Dec 01, 2018 3:23 pm Did you install nvidia-prime?: apt install nvidia-prime
I did now!
roblm wrote: Sat Dec 01, 2018 3:23 pm If you did, then use these commands in the Terminal and post the output:

Code: Select all

lspci -nnk | egrep -A3 -i "3D|VGA"	          
ls /lib/modules/`uname -r`/kernel/drivers/char/drm/		
ls /etc/modprobe.d				
dpkg -l | grep -i nvidia		
mokutil --sb-state	
Here's the output:

Code: Select all

lspci -nnk | egrep -A3 -i "3D|VGA"          
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07)
	Subsystem: ASUSTeK Computer Inc. UHD Graphics 620 [1043:11e1]
	Kernel driver in use: i915
	Kernel modules: i915
--
01:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] [10de:1c8d] (rev a1)
	Subsystem: ASUSTeK Computer Inc. GP107M [GeForce GTX 1050 Mobile] [1043:11e1]
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
02:00.0 Network controller [0280]: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter [168c:0042] (rev 31)

Code: Select all

ls /lib/modules/`uname -r`/kernel/drivers/char/drm/
nvidia-drm.ko  nvidia.ko  nvidia-modeset.ko  nvidia-uvm.ko

Code: Select all

ls /etc/modprobe.d/
alsa-base.conf                         blacklist-ath_pci.conf                 blacklist-framebuffer.conf             blacklist-oss.conf                     intel-microcode-blacklist.conf         nvidia-installer-disable-nouveau.conf
amd64-microcode-blacklist.conf         blacklist.conf                         blacklist-modem.conf                   blacklist-rare-network.conf            iwlwifi.conf                           
ath9k.conf                             blacklist-firewire.conf                blacklist-nouveau.conf                 dkms.conf                              nvidia-graphics-drivers.conf           

Code: Select all

 ls /etc/modprobe.d/
alsa-base.conf                         blacklist-ath_pci.conf                 blacklist-framebuffer.conf             blacklist-oss.conf                     intel-microcode-blacklist.conf         nvidia-installer-disable-nouveau.conf
amd64-microcode-blacklist.conf         blacklist.conf                         blacklist-modem.conf                   blacklist-rare-network.conf            iwlwifi.conf                           
ath9k.conf                             blacklist-firewire.conf                blacklist-nouveau.conf                 dkms.conf                              nvidia-graphics-drivers.conf    

Code: Select all

ls /etc/modprobe.d/
alsa-base.conf                  ath9k.conf              blacklist.conf           blacklist-framebuffer.conf  blacklist-nouveau.conf  blacklist-rare-network.conf  intel-microcode-blacklist.conf  nvidia-graphics-drivers.conf
amd64-microcode-blacklist.conf  blacklist-ath_pci.conf  blacklist-firewire.conf  blacklist-modem.conf        blacklist-oss.conf      dkms.conf                    iwlwifi.conf                    nvidia-installer-disable-nouveau.conf

Code: Select all

dpkg -l | grep -i nvidia
rc  cuda-nsight-compute-10-0                        10.0.130-1                                  amd64        NVIDIA Nsight Compute
rc  cuda-nvtx-10-0                                  10.0.130-1                                  amd64        NVIDIA Tools Extension
ii  libaccinj64-9.1:amd64                           9.1.85-3ubuntu1                             amd64        NVIDIA ACCINJ Library (64-bit)
ii  libcublas9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA cuBLAS Library
ii  libcudart9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA CUDA Runtime Library
ii  libcufft9.1:amd64                               9.1.85-3ubuntu1                             amd64        NVIDIA cuFFT Library
ii  libcufftw9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA cuFFTW Library
ii  libcuinj64-9.1:amd64                            9.1.85-3ubuntu1                             amd64        NVIDIA CUINJ Library (64-bit)
ii  libcurand9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA cuRAND Library
ii  libcusolver9.1:amd64                            9.1.85-3ubuntu1                             amd64        NVIDIA cuSOLVER Library
ii  libcusparse9.1:amd64                            9.1.85-3ubuntu1                             amd64        NVIDIA cuSPARSE Library
ii  libnppc9.1:amd64                                9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives core runtime library
ii  libnppial9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Arithmetic and Logic
ii  libnppicc9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Color Conversion
ii  libnppicom9.1:amd64                             9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Compression
ii  libnppidei9.1:amd64                             9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Data Exchange and Initialization
ii  libnppif9.1:amd64                               9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Filters
ii  libnppig9.1:amd64                               9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Geometry transforms
ii  libnppim9.1:amd64                               9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Morphological operations
ii  libnppist9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Statistics
ii  libnppisu9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Support
ii  libnppitc9.1:amd64                              9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives lib for Image Threshold and Compare
ii  libnpps9.1:amd64                                9.1.85-3ubuntu1                             amd64        NVIDIA Performance Primitives for signal processing runtime library
ii  libnvgraph9.1:amd64                             9.1.85-3ubuntu1                             amd64        NVIDIA Graph Analytics library (nvGRAPH)
ii  libnvidia-cfg1-410:amd64                        410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-410                            410.78-0ubuntu1~gpu18.04.1                  all          Shared files used by the NVIDIA libraries
rc  libnvidia-compute-396:amd64                     396.54-0ubuntu0~gpu18.04.1                  amd64        NVIDIA libcompute package
ii  libnvidia-compute-410:amd64                     410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA libcompute package
ii  libnvidia-decode-410:amd64                      410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-410:amd64                      410.78-0ubuntu1~gpu18.04.1                  amd64        NVENC Video Encoding runtime library
ii  libnvidia-fbc1-410:amd64                        410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-410:amd64                          410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-410:amd64                        410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvrtc9.1:amd64                               9.1.85-3ubuntu1                             amd64        CUDA Runtime Compilation (NVIDIA NVRTC Library)
ii  libnvtoolsext1:amd64                            9.1.85-3ubuntu1                             amd64        NVIDIA Tools Extension Library
ii  libnvvm3:amd64                                  9.1.85-3ubuntu1                             amd64        NVIDIA NVVM Library
rc  nvidia-compute-utils-396                        396.54-0ubuntu0~gpu18.04.1                  amd64        NVIDIA compute utilities
ii  nvidia-compute-utils-410                        410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA compute utilities
ii  nvidia-cuda-dev                                 9.1.85-3ubuntu1                             amd64        NVIDIA CUDA development files
ii  nvidia-cuda-toolkit                             9.1.85-3ubuntu1                             amd64        NVIDIA CUDA development toolkit
rc  nvidia-dkms-396                                 396.54-0ubuntu0~gpu18.04.1                  amd64        NVIDIA DKMS package
ii  nvidia-dkms-410                                 410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA DKMS package
ii  nvidia-driver-410                               410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA driver metapackage
rc  nvidia-kernel-common-396                        396.54-0ubuntu0~gpu18.04.1                  amd64        Shared files used with the kernel module
ii  nvidia-kernel-common-410                        410.78-0ubuntu1~gpu18.04.1                  amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-410                        410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA kernel source package
ii  nvidia-opencl-dev:amd64                         9.1.85-3ubuntu1                             amd64        NVIDIA OpenCL development files
ii  nvidia-prime                                    0.8.8.2                                     all          Tools to enable NVIDIA's Prime
ii  nvidia-prime-applet                             1.0.7                                       all          An applet for NVIDIA Prime
ii  nvidia-profiler                                 9.1.85-3ubuntu1                             amd64        NVIDIA Profiler for CUDA and OpenCL
ii  nvidia-settings                                 415.18-0ubuntu0~gpu18.04.1                  amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-410                                410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA driver support binaries
ii  xserver-xorg-video-nvidia-410                   410.78-0ubuntu1~gpu18.04.1                  amd64        NVIDIA binary Xorg driver

Code: Select all

mokutil --sb-state 
SecureBoot enabled
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA card not being used as main card

Post by roblm »

For Optimus systems, which you have, the Nvidia driver should not be downloaded from Nvidia’s website because the nvidia-installer will overwrite the OpenGL libraries used by the Intel GPU, resulting in software rendering when the Intel GPU is selected.
The info you posted shows you did that. Did you remove it?

Secure Boot is enabled, which will prevent the Nvidia driver from loading. You should temporarily disable it in the BIOS. Once the Nvidia driver has been shown to load correctly, then I will give you info on how to re-enable Secure Boot.

You should then select the Nvidia GPU by using the nvidia-prime applet. After rebooting, use this command and post the output:
inxi -Gx
Dephen

Re: NVIDIA card not being used as main card

Post by Dephen »

roblm wrote: Sun Dec 02, 2018 7:56 pm For Optimus systems, which you have, the Nvidia driver should not be downloaded from Nvidia’s website because the nvidia-installer will overwrite the OpenGL libraries used by the Intel GPU, resulting in software rendering when the Intel GPU is selected.
The info you posted shows you did that. Did you remove it?
So I should remove the Nvidia driver? I did not understand this part.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA card not being used as main card

Post by roblm »

You previously installed a Nvidia driver which you downloaded from Nvidia’s website. Remove only that driver, if it has not already been removed, by adding --uninstall to the .run file. For example:

Code: Select all

NVIDIA-Linux-x86_64-384.130.run --uninstall
Also, use this command to remove this config file that goes with that driver:
sudo rm /etc/modprobe.d/nvidia-installer-disable-nouveau.conf

Then use this command to update the initial ramdisk and reboot: sudo update-initramfs -u; reboot

Then do the other steps.
Dephen

Re: NVIDIA card not being used as main card

Post by Dephen »

roblm wrote: Mon Dec 03, 2018 2:39 pm You previously installed a Nvidia driver which you downloaded from Nvidia’s website. Remove only that driver, if it has not already been removed, by adding --uninstall to the .run file. For example:

Code: Select all

NVIDIA-Linux-x86_64-384.130.run --uninstall
Also, use this command to remove this config file that goes with that driver:
sudo rm /etc/modprobe.d/nvidia-installer-disable-nouveau.conf

Then use this command to update the initial ramdisk and reboot: sudo update-initramfs -u; reboot

Then do the other steps.
Thanks for the explanation!

Here is the output of inxi -Gx after the other steps:

Code: Select all

inxi -Gx
Graphics:  Card-1: Intel UHD Graphics 620 bus-ID: 00:02.0
           Card-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] bus-ID: 01:00.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.01hz
           OpenGL: renderer: GeForce GTX 1050/PCIe/SSE2 version: 4.6.0 NVIDIA 410.78 Direct Render: Yes
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: NVIDIA card not being used as main card

Post by roblm »

The inxi output shows the Nvidia driver is now loading correctly.

If you want to re-enable Secure Boot for an added layer of security, then the Nvidia kernel modules that were built during the Nvidia driver installation will need to be signed.

Many distributions require modules to be signed with a trusted key when loaded into kernels running on UEFI systems with Secure Boot enabled.

Go down to my second post on page 2 in this topic, under the section:
How to install the Nvidia driver with Secure Boot enabled; for drivers installed using Driver Manager, apt or Synaptic:

viewtopic.php?f=59&t=154932
Dephen

Re: NVIDIA card not being used as main card

Post by Dephen »

roblm wrote: Tue Dec 04, 2018 8:06 am The inxi output shows the Nvidia driver is now loading correctly.

If you want to re-enable Secure Boot for an added layer of security, then the Nvidia kernel modules that were built during the Nvidia driver installation will need to be signed.

Many distributions require modules to be signed with a trusted key when loaded into kernels running on UEFI systems with Secure Boot enabled.

Go down to my second post on page 2 in this topic, under the section:
How to install the Nvidia driver with Secure Boot enabled; for drivers installed using Driver Manager, apt or Synaptic:

viewtopic.php?f=59&t=154932
Thanks a lot! Tagging the topic as solved.
Locked

Return to “Hardware Support”