Ubuntu: Unable to swtich to nvidia graphic card



Question:

I recently installed Nvidia graphics card on my laptop. However even after installation the machine is still using the Intel graphic chip. I tried running prime-select nvidia, the output being nvidia profile is already set but whenever I try checking which graphic card I am using, by,

lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA  

the output is still

00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 520 [8086:1916] (rev 07) (prog-if 00 [VGA controller])  

I also tried

optirun glxinfo|egrep "OpenGL vendor|OpenGL renderer"  

output

OpenGL vendor string: VMware, Inc.  OpenGL renderer string: llvmpipe (LLVM 5.0, 256 bits)  

but still no effect. I tried going to the nvidia-setting to configure the prime profile through the GUI, but the prime profile tab is not displayed. NOTE: I installed nvidia-prime through a deb file, apt install nvidia-prime didn't seem to work.

UPDATE
The output from sudo lspci -nnk | grep -i vga -A3&&sudo lshw -c display

00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 520 [8086:1916] (rev 07)      Subsystem: Hewlett-Packard Company Skylake GT2 [HD Graphics 520] [103c:820c]      Kernel driver in use: i915      Kernel modules: i915    *-display                          description: VGA compatible controller         product: HD Graphics 520         vendor: Intel Corporation         physical id: 2         bus info: pci@0000:00:02.0         version: 07         width: 64 bits         clock: 33MHz         capabilities: pciexpress msi pm vga_controller bus_master cap_list rom         configuration: driver=i915 latency=0         resources: irq:131 memory:a2000000-a2ffffff memory:b0000000-bfffffff ioport:5000(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:134 memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:4000(size=128)  


Solution:1

You can switch nvidia graphics drivers from the commandline using this command:

$ sudo apt install nvidia-###  

(Replace the ### with the number of the version you want to switch to.)

Currently the latest version from the repository is nvidia-384. The latest version # from the Official nVidia Website will depend on which specific card you specify in the download option.

You have nvidia [GeForce 940MX] which is compatible with nvidia-384 driver (currently the highest nvidia in the repository). You can install it with this command:

$ sudo apt install nvidia-384  

The following command will show you the current drivers you have installed on your computer:

$ ubuntu-drivers devices  

This command will show you all the available drivers in the repository, and will include any PPA's you have installed:

$ apt search nvidia - | egrep "^nvidia-[0-9]+\/"  

Because it appears that you have downloaded drivers from nvida, you will see a later version than the one in the default repository. You can use the command to install that driver by replacing install nvidia-384 with the number you see from the previous command install nvidia-xxx.

Note:

If you inadvertently select an unstabled version that causes the desktop not to properly load, you can change the driver to the nvidia-384 (or working version) from the console (Alt+Ctrl+F2).

After the install of a different driver, this command shows which one is currently in use:

$ lspci -nnk | grep -i vga -A3  

In your case, results from the requested command shows that you currently have the [HD Graphics 520] driver being used.


You can use this direct link to nVidia's Driver Downloads. From the Operating System drop-down, choose your version of Ubuntu.

Currently the highest nVidia driver version that I find is in the PPA provided by Webupd8, which is version nvidia-396.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »