Unable to change GPU to nVidia from Intel

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
balckh1907

Unable to change GPU to nVidia from Intel

Post by balckh1907 »

Hello,

I am fairly new to linux. I have been trying to get my GPU working for a few days now. The GPU that my laptop has is GeForce 940MX. I have trued a couple of topics from the forum but still cannot get it to work. I have successfully installed nVidia drivers and NVIDIA X Server Settings but for some reason, even though I have the nVidia GPU selected, the system details does not show that it is currently the main graphics used. I tested it and it seems that still the Intel Integrated GPU is in use.

I am running Cinnamon 18.3 64-bit. From the Drive Manager I have switched to nvidia-384 which was recommended.

Code: Select all

lshw -c video
is posting

Code: Select all

  *-display               
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:16 memory:b2000000-b2ffffff memory:c0000000-cfffffff ioport:6000(size=64) memory:c0000-dffff
  *-display
       description: 3D controller
       product: GM108M [GeForce 940MX]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:b3000000-b3ffffff memory:a0000000-afffffff memory:b0000000-b1ffffff ioport:5000(size=128)
The command

Code: Select all

lspci -k | grep -A 2 -i "VGA"
Outputs

Code: Select all

00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
	DeviceName: Intel Kabylake HD Graphics ULT GT2
	Subsystem: Hewlett-Packard Company Device 8216
It seems like my GPU is not marked as VGA controller but rather 3D controller.

Running the command

Code: Select all

lspci -k | grep -A 2 -i "3D"
Gives the following output

Code: Select all

01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
	DeviceName: NVIDIA N16S-GTR
	Subsystem: Hewlett-Packard Company GM108M [GeForce 940MX]
Also I was getting a PCIe Bus error in tty1 and I fixed it by adding pci=nomsi to the kernel boot parameters.

I have also tried the command

Code: Select all

cat /var/log/Xorg.0.log|egrep -i "glx|nvidia|nouveau"
Which outputs the following

Code: Select all

[    23.292] (**) |-->Screen "nvidia" (0)
[    23.292] (**) |   |-->Device "nvidia"
[    23.292] (**) |   |-->GPUDevice "nvidia"
[    23.292] (==) No monitor specified for screen "nvidia".
[    23.296] (II) "glx" will be loaded by default.
[    23.296] (II) LoadModule: "glx"
[    23.296] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/libglx.so
[    24.079] (II) Module glx: vendor="NVIDIA Corporation"
[    24.079] (II) NVIDIA GLX Module  384.111  Tue Dec 19 22:51:13 PST 2017
[    24.079] (II) LoadModule: "nvidia"
[    24.079] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/nvidia_drv.so
[    24.080] (II) Module nvidia: vendor="NVIDIA Corporation"
[    24.080] (II) NVIDIA dlloader X Driver  384.111  Tue Dec 19 22:25:34 PST 2017
[    24.080] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    24.094] (II) NVIDIA(0): Creating default Display subsection in Screen section
	"nvidia" for depth/fbbpp 24/32
[    24.094] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[    24.094] (==) NVIDIA(0): RGB weight 888
[    24.094] (==) NVIDIA(0): Default visual is TrueColor
[    24.094] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    24.094] (**) NVIDIA(0): Option "ConstrainCursor" "off"
[    24.094] (**) NVIDIA(0): Option "AllowEmptyInitialConfiguration" "on"
[    24.094] (**) NVIDIA(0): Option "IgnoreDisplayDevices" "CRT"
[    24.094] (**) NVIDIA(0): Enabling 2D acceleration
[    24.269] (II) NVIDIA(0): NVIDIA GPU GeForce 940MX (GM108-A) at PCI:1:0:0 (GPU-0)
[    24.269] (--) NVIDIA(0): Memory: 2097152 kBytes
[    24.269] (--) NVIDIA(0): VideoBIOS: 82.08.59.00.75
[    24.269] (II) NVIDIA(0): Detected PCI Express Link width: 4X
[    24.269] (II) NVIDIA(0): Validated MetaModes:
[    24.269] (II) NVIDIA(0):     "NULL"
[    24.269] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[    24.269] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[    24.269] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[    24.644] (II) NVIDIA: Using 6144.00 MB of virtual memory for indirect memory
[    24.644] (II) NVIDIA:     access.
[    24.663] (II) NVIDIA(0): Setting mode "NULL"
[    24.667] (==) NVIDIA(0): Disabling shared memory pixmaps
[    24.667] (==) NVIDIA(0): Backing store enabled
[    24.667] (==) NVIDIA(0): Silken mouse enabled
[    24.667] (==) NVIDIA(0): DPMS enabled
[    24.667] (II) NVIDIA(0): [DRI2] Setup complete
[    24.667] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[    24.798] (II) Initializing extension GLX
[    24.798] (II) Indirect GLX disabled.
[   106.381] (II) NVIDIA(0): Setting mode "NULL"
That is as far as I can go alone, so any help will be greatly appreciated. Thank you in advance!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Unable to change GPU to nVidia from Intel

Post by Laurent85 »

balckh1907 wrote: Mon Mar 26, 2018 1:32 am the system details does not show that it is currently the main graphics used. I tested it and it seems that still the Intel Integrated GPU is in use.
From which output are you assuming Nvidia driver not in use ?

Post inxi -b command output:

Code: Select all

inxi -b
Image
balckh1907

Re: Unable to change GPU to nVidia from Intel

Post by balckh1907 »

Laurent85 wrote: Mon Mar 26, 2018 1:36 pm
balckh1907 wrote: Mon Mar 26, 2018 1:32 am the system details does not show that it is currently the main graphics used. I tested it and it seems that still the Intel Integrated GPU is in use.
From which output are you assuming Nvidia driver not in use ?

Post inxi -b command output:

Code: Select all

inxi -b
The system details does no show the Nvidia card as the primary one and I've tried running CS:GO which was struggling very much, while I still had windows installed it was running just fine.

The output of the command:

Code: Select all

inxi -b
Posts the following

Code: Select all

System:    Host: GsusMint Kernel: 4.13.0-37-generic x86_64 (64 bit)
           Desktop: Cinnamon 3.6.7  Distro: Linux Mint 18.3 Sylvia
Machine:   System: HP (portable) product: HP Pavilion Notebook v: Type1ProductConfigId serial: 5CD71032J3
           Mobo: HP model: 8216 v: 83.14 serial: PGCHE018J682ZI
           Bios: Insyde v: F.25 date: 12/12/2016
CPU:       Dual core Intel Core i5-7200U (-HT-MCP-) speed/max: 2700/3100 MHz
Graphics:  Card-1: Intel Device 5916
           Card-2: NVIDIA GM108M [GeForce 940MX]
           Display Server: X.org 1.18.4 driver: nvidia
           tty size: 80x24 Advanced Data: N/A for root
Network:   Card-1: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
           driver: r8169
           Card-2: Realtek RTL8723BE PCIe Wireless Network Adapter
           driver: rtl8723be
Drives:    HDD Total Size: 1000.2GB (6.4% used)
Info:      Processes: 225 Uptime: 3 min Memory: 1619.8/7862.9MB
           Client: Shell (bash) inxi: 2.2.35 
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Unable to change GPU to nVidia from Intel

Post by Laurent85 »

balckh1907 wrote: Mon Mar 26, 2018 2:32 pm

Code: Select all

Graphics:  Card-1: Intel Device 5916
           Card-2: NVIDIA GM108M [GeForce 940MX]
           Display Server: X.org 1.18.4 driver: nvidia
           tty size: 80x24 Advanced Data: N/A for root
inxi reports nvidia graphics in use. Post inxi -b command output as non root user because some details are missing when command executed as root:

Code: Select all

inxi -b
Image
balckh1907

Re: Unable to change GPU to nVidia from Intel

Post by balckh1907 »

Code: Select all

System:    Host: GsusMint Kernel: 4.13.0-37-generic x86_64 (64 bit)
           Desktop: Cinnamon 3.6.7  Distro: Linux Mint 18.3 Sylvia
Machine:   System: HP (portable) product: HP Pavilion Notebook v: Type1ProductConfigId
           Mobo: HP model: 8216 v: 83.14 Bios: Insyde v: F.25 date: 12/12/2016
CPU:       Dual core Intel Core i5-7200U (-HT-MCP-) speed/max: 2700/3100 MHz
Graphics:  Card-1: Intel Device 5916
           Card-2: NVIDIA GM108M [GeForce 940MX]
           Display Server: X.Org 1.18.4 driver: nvidia
           Resolution: 1920x1080@60.10hz
           GLX Renderer: GeForce 940MX/PCIe/SSE2
           GLX Version: 4.5.0 NVIDIA 384.111
Network:   Card-1: Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
           driver: r8169
           Card-2: Realtek RTL8723BE PCIe Wireless Network Adapter
           driver: rtl8723be
Drives:    HDD Total Size: 1000.2GB (6.4% used)
Info:      Processes: 213 Uptime: 20 min Memory: 1799.2/7862.9MB
           Client: Shell (bash) inxi: 2.2.35 
If the card is in use do i need to force the OS to use nvidia card as card1?
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Unable to change GPU to nVidia from Intel

Post by Laurent85 »

balckh1907 wrote: Mon Mar 26, 2018 2:47 pm If the card is in use do i need to force the OS to use nvidia card as card1?
Under LM the OS can only use either card1 either card2 during the same session, not both like Windows. Current settings use card2 nvidia graphics. Card order does not matter. Everything is normal from inxi output.
Image
Locked

Return to “Graphics Cards & Monitors”