You are not logged in.

#1 2023-09-10 07:59:42

ahmadmhd
Member
Registered: 2023-09-10
Posts: 3

[SOLVED] Nvidia performance is exactly the same as the Intel GPU

Hello,

I have a Lenovo Y540 with Integrated Intel Graphics (UHD Graphics 630) and A Dedicated Nvidia (GeForce GTX 1660 Ti Mobile)

I'm using linux-lts and nvidia-lts in addition to xf86-video-intel (i915) as drivers for the GPUs.

It's been a while since I've used the dedicated GPU, but when I ran applications or the entire X session with Nvidia, I would get a very high FPS, for example on glxspheres64, I would get FPS in the thousands, now for some reason I get almost exactly the same performance when running apps or X using Nvidia as the Intel GPU (around 140 fps on glxspheres64), I've updated the kernel, drivers and system multiple times in the past period, so I don't remember exactly which kernel/driver version was this working as expected before.

I've used the guide in Arch wiki: NVIDIA_Optimus to configure Nvidia X11 config using the file

/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf

and it worked fine back then and I would get a much better performance (fps) when using the Nvidia as a Primary GPU, but now even when I only select the dedicated GPU from the BIOS and run the X using Nvidia driver only I still get the same performance as the Intel card.

Below are some info about my setup:

- neofetch

                   -`                    root@y540 
                  .o+`                   --------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Host: 81SX Legion Y540-15IRH 
               `+oooooo:                 Kernel: 6.1.52-1-lts 
               -+oooooo+:                Uptime: 14 hours, 14 mins 
             `/:-:++oooo+:               Packages: 1957 (pacman) 
            `/++++/+++++++:              Shell: zsh 5.9 
           `/++++++++++++++:             Resolution: 1920x1080 
          `/+++ooooooooooooo/`           DE: Xfce 4.18 
         ./ooosssso++osssssso+`          WM: Xfwm4 
        .oossssso-````/ossssss+`         Theme: Adwaita [GTK2/3] 
       -osssssso.      :ssssssso.        Icons: Adwaita [GTK2/3] 
      :osssssss/        osssso+++.       Terminal: yakuake 
     /ossssssss/        +ssssooo/-       CPU: Intel i7-9750H (12) @ 4.500GHz 
   `/ossssso+/:-        -:/+osssso+-     GPU: NVIDIA GeForce GTX 1660 Ti Mobile 
  `+sso+:-`                 `.-/+oso:    GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630] 
 `++:.                           `-/+/   Memory: 10324MiB / 31979MiB 
 .`                                 `/
                                                                 
                                                                 

- /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf  contents when running the X using Nvidia

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "PrimaryGPU" "yes"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

- uname

Linux y540 6.1.52-1-lts #1 SMP PREEMPT_DYNAMIC Thu, 07 Sep 2023 05:17:41 +0000 x86_64 GNU/Linux

- pacman -Ss |egrep "nvidia|intel"|grep -i "installed"

extra/intel-ucode 20230808-1 [installed]
extra/intel-undervolt 1.7-2 [installed]
extra/nvidia-lts 1:535.104.05-9 [installed]
extra/nvidia-prime 1.0-4 [installed]
extra/nvidia-settings 535.104.05-1 [installed]
extra/nvidia-utils 535.104.05-1 [installed]
extra/xf86-video-intel 1:2.99.917+923+gb74b67f0-1 (xorg-drivers) [installed]
multilib/lib32-nvidia-utils 535.104.05-1 [installed]
multilib/lib32-opencl-nvidia 535.104.05-1 [installed]

- lspci |egrep -i "VGA|Nvidia"

00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1)
01:00.3 Serial bus controller: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)

- lsmod | egrep -i "i915|nvidia"

nvidia_uvm           3272704  0
nvidia_drm             77824  2
nvidia_modeset       1519616  3 nvidia_drm
nvidia              61882368  93 nvidia_uvm,nvidia_modeset
i2c_nvidia_gpu         16384  0
i915                 3211264  40
drm_buddy              20480  1 i915
intel_gtt              28672  1 i915
drm_display_helper    184320  1 i915
cec                    81920  2 drm_display_helper,i915
ttm                    94208  1 i915
video                  65536  3 ideapad_laptop,i915,nvidia_modeset

- nvidia-smi

Sun Sep 10 09:54:36 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.05             Driver Version: 535.104.05   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 1660 Ti     Off | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P8               1W /  80W |      6MiB /  6144MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      3940      G   /usr/lib/Xorg                                 4MiB |
+---------------------------------------------------------------------------------------+

- Running glxspheres64 using Intel card

Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
GLX FB config ID of window: 0x31b (8/8/8/0)
Visual ID of window: 0x5ae
Context is Direct
OpenGL Renderer: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
145.538174 frames/sec - 162.420602 Mpixels/sec
143.971235 frames/sec - 160.671899 Mpixels/sec
144.022073 frames/sec - 160.728633 Mpixels/sec
144.007974 frames/sec - 160.712899 Mpixels/sec
143.977911 frames/sec - 160.679348 Mpixels/sec
144.013483 frames/sec - 160.719047 Mpixels/sec
143.979249 frames/sec - 160.680842 Mpixels/sec
144.022689 frames/sec - 160.729321 Mpixels/sec

- Running glxspheres64 using prime-run or when running X with Nvidia

Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
GLX FB config ID of window: 0x114 (8/8/8/0)
Visual ID of window: 0x575
Context is Direct
OpenGL Renderer: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2
144.305319 frames/sec - 161.044736 Mpixels/sec
144.016187 frames/sec - 160.722064 Mpixels/sec
144.015434 frames/sec - 160.721224 Mpixels/sec
143.925318 frames/sec - 160.620655 Mpixels/sec
144.055809 frames/sec - 160.766282 Mpixels/sec
143.989602 frames/sec - 160.692396 Mpixels/sec
144.120329 frames/sec - 160.838287 Mpixels/sec

- Kernel parameters

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 nvidia_drm.modeset=1"

- glxinfo |grep NVIDIA  ( with Nvidia driver )

server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 535.104.05
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 535.104.05
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 535.104.05

How can I know what caused the Nvidia driver to perform as mentioned, even though it was working fine before, either the updates changed something or maybe I did changes I don't remember and I couldn't figure it out now.

I'd appreciate your help.
Thanks

Last edited by ahmadmhd (2023-09-10 16:47:51)

Offline

#2 2023-09-10 11:02:37

seth
Member
Registered: 2012-09-03
Posts: 52,226

Re: [SOLVED] Nvidia performance is exactly the same as the Intel GPU

Do you run a 144Hz output?

export vblank_mode=0
__GL_SYNC_TO_VBLANK=0
glxspheres64 
prime-run glxspheres64 

Offline

#3 2023-09-10 16:41:48

ahmadmhd
Member
Registered: 2023-09-10
Posts: 3

Re: [SOLVED] Nvidia performance is exactly the same as the Intel GPU

seth wrote:

Do you run a 144Hz output?

export vblank_mode=0
__GL_SYNC_TO_VBLANK=0
glxspheres64 
prime-run glxspheres64 

Yes, the display is actually 144Hz, When I set __GL_SYNC_TO_VBLANK=0 or vblank_mode=0 before running benchmark tools it improves the FPS even on the Intel card.

Now I understand why.

Thanks seth

Offline

Board footer

Powered by FluxBB