Low performance for browser with nvidia gpu

Brave is laggy and stuttering a lot when put on an external monitor connected to an nvidia GPU. Connecting the HDMI cable (through type c hub) to the AMD iGPU seems fine.
Example: https://imgur.com/a/7sEHsfZ

Specs: HP Victus 16 with 5600H and 3050Ti
DE: Gnome 42.4 x11, fresh install of Endeavour OS (my first time using Endeavour or any arch based distro too)
$ uname -a
Linux Windstation 5.19.9-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 15 Sep 2022 16:08:24 +0000 x86_64 GNU/Linux
$ inxi -Ga
Graphics:
  Device-1: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile]
    vendor: Hewlett-Packard driver: nvidia v: 515.65.01
    alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current (as of
    2022-08) arch: Ampere code: GAxxx process: TSMC n7 (7nm) built: 2020-22
    pcie: gen: 2 speed: 5 GT/s lanes: 8 link-max: gen: 4 speed: 16 GT/s
    lanes: 16 ports: active: none off: HDMI-A-1 empty: none bus-ID: 01:00.0
    chip-ID: 10de:25a0 class-ID: 0300
  Device-2: AMD Cezanne vendor: Hewlett-Packard driver: amdgpu v: kernel
    arch: GCN-5.1 code: Vega-2 process: TSMC n7 (7nm) built: 2018-21 pcie:
    gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s ports:
    active: eDP-1 empty: DP-1 bus-ID: 06:00.0 chip-ID: 1002:1638
    class-ID: 0300
  Device-3: Luxvisions Innotech HP Wide Vision HD Camera type: USB
    driver: uvcvideo bus-ID: 1-3:2 chip-ID: 30c9:000e class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: gnome-shell v: 42.5 driver: X: loaded: amdgpu,nvidia
    unloaded: modesetting,radeon alternate: fbdev,nouveau,nv,vesa
    gpu: amdgpu,nvidia,nvidia-nvswitch display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1920x2160 s-dpi: 96 s-size: 508x572mm (20.00x22.52")
    s-diag: 765mm (30.12")
  Monitor-1: HDMI-A-1 mapped: HDMI-1-0 note: disabled pos: primary,top
    model: Samsung C24F390 serial: HTQH500467 built: 2015 res: 1920x1080 hz: 60
    dpi: 94 gamma: 1.2 size: 521x293mm (20.51x11.54") diag: 598mm (23.5")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  Monitor-2: eDP-1 mapped: eDP pos: bottom model: BOE Display 0x0aad
    built: 2021 res: 1920x1080 hz: 144 dpi: 137 gamma: 1.2
    size: 355x200mm (13.98x7.87") diag: 407mm (16") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  OpenGL: renderer: AMD RENOIR (LLVM 14.0.6 DRM 3.47 5.19.9-zen1-1-zen)
    v: 4.6 Mesa 22.1.7 direct render: Yes

What I have tried:

$ inxi -Ga
Graphics:
  Device-1: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile]
    vendor: Hewlett-Packard driver: nvidia v: 515.65.01
    alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current (as of
    2022-08) arch: Ampere code: GAxxx process: TSMC n7 (7nm) built: 2020-22
    pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: gen: 4 speed: 16 GT/s
    lanes: 16 ports: active: none off: HDMI-A-1 empty: none bus-ID: 01:00.0
    chip-ID: 10de:25a0 class-ID: 0300
  Device-2: AMD Cezanne vendor: Hewlett-Packard driver: amdgpu v: kernel
    arch: GCN-5.1 code: Vega-2 process: TSMC n7 (7nm) built: 2018-21 pcie:
    gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s ports:
    active: eDP-1 empty: DP-1 bus-ID: 06:00.0 chip-ID: 1002:1638
    class-ID: 0300
  Device-3: Luxvisions Innotech HP Wide Vision HD Camera type: USB
    driver: uvcvideo bus-ID: 1-3:2 chip-ID: 30c9:000e class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: gnome-shell v: 42.5 driver: X: loaded: amdgpu,nvidia
    unloaded: modesetting,radeon alternate: fbdev,nouveau,nv,vesa
    gpu: amdgpu,nvidia,nvidia-nvswitch display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1920x2160 s-dpi: 96 s-size: 508x572mm (20.00x22.52")
    s-diag: 765mm (30.12")
  Monitor-1: HDMI-A-1 mapped: HDMI-1-0 note: disabled pos: primary,top
    model: Samsung C24F390 serial: HTQH500467 built: 2015 res: 1920x1080 hz: 60
    dpi: 94 gamma: 1.2 size: 521x293mm (20.51x11.54") diag: 598mm (23.5")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  Monitor-2: eDP-1 mapped: eDP pos: bottom model: BOE Display 0x0aad
    built: 2021 res: 1920x1080 hz: 144 dpi: 137 gamma: 1.2
    size: 355x200mm (13.98x7.87") diag: 407mm (16") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  OpenGL: renderer: AMD RENOIR (LLVM 14.0.6 DRM 3.47 5.19.9-zen1-1-zen)
    v: 4.6 Mesa 22.1.7 direct render: Yes
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
OpenGL: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Video Decode: Software only. Hardware acceleration disabled
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Disabled

Also, I notice that the prime profile tab in nvidia settings is not there too if it makes any difference.

If anyone has any idea how to solve this or needs any additional information, please do say. Thanks! In the meantime, I will try downloading some native games off steam to see if it’s just an OpenGL thing.

Oh well, installing nvidia-prime then running prime-run as root seems to have solved the issue

It is not supposed to run as root. You may have created problems to your configuration. Check permissions in your home folder.

I thought it was a setting meant to run as root so I just went ahead and sudo it. Just tried running it as a normal user, and it went fine, thanks for the info!

1 Like

Absolutely my bad. I just noticed I’m still plugged in the type c hub which is connected to the AMD iGPU. Turns out running prime-run was not the solution. If anyone has an idea of how to fix this, please do suggest me!

…bump?

Well, posting this as the last update. The problem I have currently is as described, but now I found out it only happens (in Gnome(42.4)) when:

  1. The only display enable is the display connected to the nvidia card. In this case, everything lags, except the mouse cursor.

  2. When 2 displays are set to extend, with the monitor connected to the nvidia gpu being the main display, having gnome top bar in the top monitor. In this case, the browser lags, but gnome settings and such seems to be (more) responsive, but still some stutters though.

What I don’t understand, is that when the laptop display is set to be the main display (eg having the top bar in the middle of both screens) things seem to be normal (minus the occasional mouse cursor lag).

While plugging in a type c hub for HDMI so that I can use the igpu for display means that I need to have a fragile dongle connected to my laptop, if it is the only way I can get my laptop to work properly then I guess so be it.

I don’t do any gpu intensive work nor do I play games on my linux install so I guess Endeavour will have to do for now. In the near future, I might just try pure arch, since the transition from ubuntu to arch-based has been smooth so far, quite love pacman and yay, thought it was supposed to be a headache according to internet memes.