Score:-2

Nvidia has worse performance than Intel UHD graphics

jp flag

I have installed the proprietary driver nvidia-driver-470 from "Additional drivers" and I have been switching between PRIME profiles in the Nvidia Settings app.

When selecting the Nvidia (Performance Mode) I get much lower performance (fewer FPS on renderings) than on the integrated Intel GPU. This is opposite to the same test done on Windows on the same machine (Nvidia works very fast there).

I have also tested other versions of nvidia-driver-xxx but the result was the same. I did not find any relevant error messages in system logs. I did search on the internet for a solution, but did not find anything that would help. I did multiple different tests, and the outcome is always, similar. Is there a way to troubleshoot or fix this? (Maybe some diagnostics, or some log files I am not familiar with?)

My configuration:

  • OS: Ubuntu 20.04.3 LTS x86_64
  • Host: Dell Latitude 5401
  • Kernel: 5.11.0-43-generic
  • CPU: Intel i5-9400H (8) @ 2.500GHz
  • GPU1: Intel UHD Graphics 630
  • GPU2: NVIDIA GeForce MX150

Tests:

  • Windows

    • Intel: 39FPS
    • Nvidia: 60FPS
  • Ubuntu:

    • Intel: 43FPS
    • Intel: 28FPS
  • GLmark test on Ubuntu:

    • Intel: glmark2 Score: 2796
    • Nvidia: glmark2 Score: 2051

Result of the ubuntu-drivers devices command:

WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level
== /sys/devices/pci0000:00/0000:00:01.1/0000:02:00.0 ==
modalias : pci:v000010DEd00001D10sv00001028sd00000918bc03sc02i00
vendor   : NVIDIA Corporation
model    : GP108M [GeForce MX150]
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-470 - distro non-free recommended ***THIS IS WHAT I HAVE INSTALLED***
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-495 - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-460-server - distro non-free
driver   : nvidia-driver-460 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

kern.log:

$ cat /var/log/kern.log | grep -i -e nvidia -e gpu -e screen
[    1.833342] nvidia: loading out-of-tree module taints kernel.
[    1.833353] nvidia: module license 'NVIDIA' taints kernel.
[    1.845571] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    1.855139] input: ELAN900C:00 04F3:2856 Touchscreen as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-ELAN900C:00/0018:04F3:2856.0001/input/input6
[    1.862141] nvidia-nvlink: Nvlink Core is being initialized, major device number 511
[    1.862792] nvidia 0000:02:00.0: enabling device (0006 -> 0007)
[    1.978819] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  470.86  Tue Oct 26 21:55:45 UTC 2021
[    2.030289] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  470.86  Tue Oct 26 21:46:51 UTC 2021
[    2.032155] [drm] [nvidia-drm] [GPU ID 0x00000200] Loading driver
[    2.722302] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:02:00.0 on minor 1
[    4.242816] nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
[    4.246455] nvidia-uvm: Loaded the UVM driver, major device number 509.
[    4.508402] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[    5.471867] audit: type=1400 audit(1640905957.834:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=679 comm="apparmor_parser"
[    5.471873] audit: type=1400 audit(1640905957.834:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=679 comm="apparmor_parser"
[ 4698.970516] vivaldi-bin[2541]: segfault at f9c ip 00007f9be3706fab sp 00007ffea7b46bc0 error 4 in libGLX_nvidia.so.470.86[7f9be36b9000+b2000]
[ 4699.770153] [drm] [nvidia-drm] [GPU ID 0x00000200] Unloading driver
[ 4699.806052] nvidia-uvm: Unloaded the UVM driver.
[ 4699.839170] nvidia-modeset: Unloading
[ 4699.872240] nvidia-nvlink: Unregistered the Nvlink Core, major device number 511
[    1.578533] input: ELAN900C:00 04F3:2856 Touchscreen as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-ELAN900C:00/0018:04F3:2856.0001/input/input6
[    4.109302] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[    5.065283] audit: type=1400 audit(1640946397.385:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=650 comm="apparmor_parser"
[    5.065288] audit: type=1400 audit(1640946397.385:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=650 comm="apparmor_parser"
[19199.281423] nvidia: loading out-of-tree module taints kernel.
[19199.281440] nvidia: module license 'NVIDIA' taints kernel.
[19199.292593] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[19199.305083] nvidia-nvlink: Nvlink Core is being initialized, major device number 509
[19199.305564] nvidia 0000:02:00.0: enabling device (0006 -> 0007)
[19199.421753] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  470.86  Tue Oct 26 21:55:45 UTC 2021
[19199.443171] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  470.86  Tue Oct 26 21:46:51 UTC 2021
[19199.451880] [drm] [nvidia-drm] [GPU ID 0x00000200] Loading driver
[19200.145535] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:02:00.0 on minor 1
[19200.164298] nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
[19200.166606] nvidia-uvm: Loaded the UVM driver, major device number 507.

When either Intel ("Power Saving") or "On Demand" PRIME profile is selected:

$ glxinfo | egrep "direct rendering|OpenGL renderer|vendor"
direct rendering: Yes
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CFL GT2)

When Nvidia ("Performance") PRIME profile is selected:

$ glxinfo | egrep "direct rendering|OpenGL renderer|vendor"
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce MX150/PCIe/SSE2
Someone avatar
my flag
Please [edit] to provide the output of `ubuntu-drivers devices`
Someone avatar
my flag
If you want better performance with Nvidia then you should install Pop OS instead of Ubuntu.
Someone avatar
my flag
You need to run: `sudo ubuntu-drivers autoinstall` to install the recommended drivers.
ppel avatar
jp flag
I have already did this, no new packets were installed, because apparently Additional Drivers has installed all.
Score:0
my flag

Earlier, I also used Nvidia as my primary GPU but it wasn't giving me much performance. A quick fix was to disable and purge all the drivers and reinstall them using sudo ubuntu-drivers autoinstall

You can do the above by:

sudo apt purge nvidia-* && sudo ubuntu-drivers autoinstall

However, the above fix didn't last long. A permanent fix was to install the system 76 Vulcan drivers. These drivers are really good and appreciative for better performance and graphics.

Here is a detailed article explaining how to install the correct drivers.

Adding the Apt Preferences File

If you are running Ubuntu 19.10 or later, you will need to manually add an apt preferences file to "pin" the System76 repository. This will tell apt to prefer System76 packages over standard Ubuntu packages. Installing the System76 Driver will not be possible until this step is completed.

Create the apt preferences file here:

sudo gedit /etc/apt/preferences.d/system76-apt-preferences 

Add the following six lines (seven if you count the space in the middle):

Package: *
Pin: release o=LP-PPA-system76-dev-stable
Pin-Priority: 1001 

Package: * 
Pin: release o=LP-PPA-system76-dev-pre-stable 
Pin-Priority: 1001

Save the file. Now you should be able to install the System76 Driver as described below.

Installing the Driver

To install our Driver you need to run the following commands in the Terminal:

sudo apt-add-repository -y ppa:system76-dev/stable sudo apt-get update sudo apt install system76-driver 

This installs the System76 driver and related utilities which are needed to enable full functionality for your system.

Installing the Nvidia drivers

If your system has an NVIDIA graphics card, you will want to go ahead and use this command to install the System76 Driver with NVIDIA graphics drivers built-in:

sudo apt-get install system76-driver-nvidia 

In addition to the standard packages, that will pull in the latest NVIDIA drivers as packaged by System76, and all related packages needed to take full advantage of your dedicated NVIDIA graphics card.

Tested on Ubuntu 20.04 and above.

Note:- These drivers may break themselves, as they were made for Pop!_OS system76 hardware, but now there are available for Ubuntu and other distros too. It supports almost every hardware. 

Someone avatar
my flag
Note:- These drivers may break themselves, as they were made for Pop!_OS system76 hardware, but now there are available for Ubuntu and other distros too. It supports almost every hardware.
ppel avatar
jp flag
Unfortunately, none of this solved my problem. I still get poor performance.
Someone avatar
my flag
@ppel Does this answer your question? https://askubuntu.com/q/1384376/1460940
ppel avatar
jp flag
No, it did not. For clarification, I do not use Ubuntu for gaming, but rather for running specialized software, which uses OpenGL, not compatible with Vulkan or other APIs.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.