Laptop is lagging & I have no idea why

I bought a new laptop, which has 32gb RAM, intel i9-13005H CPU, integrated GPU and a dedicated Nvidia RTX 4060 GPU. Last time I had similar problems with a weaker Lenovo system, which had dual GPUs too. I am using Nvidia drivers and Gnome with Xorg.

Here is what I tried so far:

  • Created 16GB swap partition
  • tried LTS kernels
  • Installed optimus manager
  • reinstalled the OS

It is really wierd, as the laptop was working fine for 30 minutes and then suddenly started lagging. After a fresh reinstalation the lag was still present. I am using systemd-boot for dual booting Linux and Windows.

UPDATE: After I booted into Windows then back to EndeavourOS the lag was no longer present, I clearly do not know what is happening :frowning:

Hi @nandor23
This is really strange.
As you mentioned you are using NVIDIA, maybe you can try changing the NVIDIA drivers to the open source drivers. (what I have read)
May be you try an update the system after that and see.
Please let us know how it goes.

1 Like

Hi @nandor23!

I think I may be having a similar issue with my computer. Occasionally, when I boot into EnOs, I notice that all my devices experience a brief lag for a few milliseconds simultaneously. For instance, my monitor (GPU), mouse, keyboard, and so on, all lag repeatedly at the same time for a brief period.

Unfortunately, I haven’t discovered a solution for this problem yet, except for rebooting. Usually, the lag disappears after one reboot, although sometimes I have to reboot twice in a row.

Therefore, if you’re encountering the same type of lag, I recommend trying a reboot as it should resolve the issue.


1 Like

A bit late, but needed some testing. Fortunately the issue never occurred. Probably needed a system update.

Good news!
Generally as I have read here, it is preferable to use the open source drivers.
Another thing that just came to my mind it is preferable to install and use the LTS Kernel as it is more stable and more tested.

If I am in your place I would do these 2 things.

I have the LTS kernel installed for safety purposes. I saw no performance difference between the Nouveau and Nvidia drivers on this machine.

Please show the output of command

inxi -Gza
  Device-1: Intel Raptor Lake-P [Iris Xe Graphics] vendor: Lenovo driver: i915
    v: kernel arch: Gen-13 process: Intel 7 (10nm) built: 2022+ ports:
    active: DP-1 off: eDP-2 empty: DP-2,DP-3,DP-4 bus-ID: 00:02.0
    chip-ID: 8086:a7a0 class-ID: 0300
  Device-2: NVIDIA AD107M [GeForce RTX 4060 Max-Q / Mobile]
    vendor: Lenovo GN21-X4 driver: nvidia v: 535.54.03
    alternate: nouveau,nvidia_drm non-free: 530.xx+
    status: current (as of 2023-05) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022-23+ pcie: gen: 4 speed: 16 GT/s
    lanes: 8 ports: active: none empty: HDMI-A-1,eDP-1 bus-ID: 01:00.0
    chip-ID: 10de:28e0 class-ID: 0300
  Device-3: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-8:2 chip-ID: 04f2:b7b4
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
    compositor: gnome-shell v: 44.2 driver: X: loaded: modesetting,nvidia
    alternate: fbdev,intel,nouveau,nv,vesa dri: iris gpu: i915 display-ID: :1
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.00x11.26")
    s-diag: 583mm (22.95")
  Monitor-1: DP-1 pos: primary model: Asus MS246 serial: <filter>
    built: 2010 res: 1920x1080 hz: 60 dpi: 102 gamma: 1.2
    size: 477x268mm (18.78x10.55") diag: 595mm (23.4") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Monitor-2: eDP-2 note: disabled model: Lenovo 0x8aaf built: 2022
    res: 1920x1080 dpi: 250 gamma: 1.2 size: 312x195mm (12.28x7.68")
    diag: 368mm (14.5") ratio: 16:10 modes: 3072x1920
  API: OpenGL v: 4.6 Mesa 23.1.3 renderer: Mesa Intel Graphics (RPL-P)
    direct-render: Yes

Looks like the Nvidia driver is not used.
To verify that, can you show the output of

lspci -vnn | grep -PA11 'VGA|Display|3D'
❯ lspci -vnn | grep -PA11 'VGA|Display|3D'

00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Raptor Lake-P [Iris Xe Graphics] [17aa:3e51]
	Flags: bus master, fast devsel, latency 0, IRQ 190, IOMMU group 0
	Memory at 6202000000 (64-bit, non-prefetchable) [size=16M]
	Memory at 4000000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 4000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

00:04.0 Signal processing controller [1180]: Intel Corporation Device [8086:a71d]

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28e0] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Lenovo GN21-X4 [17aa:3e51]
	Physical Slot: 1
	Flags: bus master, fast devsel, latency 0, IRQ 150, IOMMU group 17
	Memory at 5f000000 (32-bit, non-prefetchable) [size=16M]
	Memory at 6000000000 (64-bit, prefetchable) [size=8G]
	Memory at 6200000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 3000 [size=128]
	Expansion ROM at 60000000 [virtual] [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia


Your system is rendering on Intel graphics. You do have nouveau open source drivers installed but the laptop is hybrid and has to have a way to switch graphics. I do beleive that the nouveau drivers could be the cause of the lagging. You have an RTX 4060 Nvidia. It doesn’t make sense to use nouveau open source having this new of a card. I would install the latest nvidia drivers and at least try it with them installed still running on the Intel graphics. See if it makes any difference. Then you would also need optimus-manager or envy-control or use prime render to switch graphics to nvidia.

 API: OpenGL v: 4.6 Mesa 23.1.3 renderer: Mesa Intel Graphics (RPL-P)
    direct-render: Yes

Edit: Also you could try running modesetting by removing the Intel driver.


So should I use the nvidia-inst -b command to install the Nvidia driver and after that the Optimus manager?


Edit: Don’t use bumblebee. It’s for older hardware. You should first try optimus-manager

1 Like

Thanks! Do you know what is the difference between Hybrid and Auto mode and if they work well? On Windows it switches between the cards for performance and battery saving purposes.

I think with hybrid mode you can switch between intel and nvidia. Nvidia will be dedicated so always running on Nvidia which will use more battery. Auto I’m not entirely sure? So you have to see if optimus-manager works, optimus-switch or you could try envy-control or you could use prime. What ever works best for you.


1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.