Laptop (Nvidia+Intel Graphics) gets super laggy with external displays

Heyo,

directly to off-topic:

GREAAAAT DISTRO :smiley:

Back to topic:

I having issues with my laptop. It is a Lenovo P51.
I have two external monitors connected via a Thunderbolt dock.
The internal monitor is always off if the dock is connected.
GPU driver is nvidia-intel-hybrid.
Nvidia-smi says that Xorg runs via GPU:

nvidia-smi
Thu Oct 13 10:44:47 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.76       Driver Version: 515.76       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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  Quadro M2200        Off  | 00000000:01:00.0  On |                  N/A |
| N/A   56C    P0    N/A /  N/A |    223MiB /  4096MiB |     21%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       932      G   /usr/lib/Xorg                     221MiB |
+-----------------------------------------------------------------------------+

Even though Xorg uses about 20-30% of the CPU according to top

# top | grep -i xorg
932 root      20   0 8254472 261860 195992 S  **26,7**   0,8  17:03.27 Xorg
932 root      20   0 8243492 261860 195992 S  **23,2**   0,8  17:03.97 Xorg
932 root      20   0 8243444 261868 196000 S  **24,6**   0,8  17:04.71 Xorg

The issues do not seem to be related to KDE only.
In KDE the animations and effects are sluggish or laggy, however you might call it.
But everything else is also running “a little behind”. Text is not typed immediately, but appears about half a second later, Window behavior is a little delayed and so on.
I can provide a screen capture, if that helps :person_shrugging:

The really weird thing is, that these problems are 100% resolved when I unplug my Thunderbolt Dock or on another Arch distro any external monitor connected via HDMI.
Everything is smooth, animations are working, text and everything else is instant.
Maybe this is not a Garuda Problem, but a KDE or even Arch problem?

I know Nvidia is always a minefield and laptops with Optimus are, too.
But since I could not find a solution to this in the WIki or the forum search, apart from using prime-run, which with another laptop was also affected by the worst frame timings ever on external monitors in a game, I thought I ask away :slight_smile:

Garuda-inxi

System:
  Kernel: 5.19.13-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=ccdd6485-2326-4b0e-a016-810aab378edd rw rootflags=subvol=@
    quiet
    cryptdevice=UUID=8bbf76ae-7d61-4f11-baf6-975ba4e35aaa:luks-8bbf76ae-7d61-4f11-baf6-975ba4e35aaa
    root=/dev/mapper/luks-8bbf76ae-7d61-4f11-baf6-975ba4e35aaa quiet splash
    rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
  Desktop: KDE Plasma v: 5.25.5 tk: Qt v: 5.15.6 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20HJS1ER00 v: ThinkPad P51
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20HJS1ER00 serial: <superuser required> UEFI: LENOVO
    v: N1UET82W (1.56 ) date: 08/12/2021
Battery:
  ID-1: BAT0 charge: 73.6 Wh (95.5%) condition: 77.1/90.0 Wh (85.7%)
    volts: 12.5 min: 11.2 model: SMP 00NY493 type: Li-poly serial: <filter>
    status: not charging cycles: 313
CPU:
  Info: model: Intel Xeon E3-1505M v6 bits: 64 type: MT MCP arch: Kaby Lake
    level: v3 built: 2018 process: Intel 14nm family: 6 model-id: 0x9E (158)
    stepping: 9 microcode: 0xF0
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 3624 high: 3742 min/max: 800/4000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 3637 2: 3573 3: 3623
    4: 3687 5: 3742 6: 3402 7: 3589 8: 3739 bogomips: 48000
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: Intel HD Graphics P630 vendor: Lenovo driver: i915 v: kernel
    arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: none
    off: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:591d class-ID: 0300
  Device-2: NVIDIA GM206GLM [Quadro M2200 Mobile] vendor: Lenovo
    driver: nvidia v: 515.76 alternate: nouveau,nvidia_drm non-free: 515.xx+
    status: current (as of 2022-08) arch: Maxwell code: GMxxx
    process: TSMC 28nm built: 2014-19 pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.0 chip-ID: 10de:1436 class-ID: 0302
  Device-3: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 1-8:2
    chip-ID: 5986:111c class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
    unloaded: nouveau alternate: fbdev,intel,nv,vesa gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 4000x2560 s-dpi: 96 s-size: 1055x675mm (41.54x26.57")
    s-diag: 1252mm (49.31")
  Monitor-1: DP-1-2.2 pos: top-right res: 1440x2560 hz: 60 dpi: 109
    size: 336x597mm (13.23x23.5") diag: 685mm (26.97") modes: N/A
  Monitor-2: DP-1-2.3 pos: primary,bottom-l res: 2560x1440 dpi: 109
    size: 597x336mm (23.5x13.23") diag: 685mm (26.97") modes: N/A
  Monitor-3: eDP-1 size-res: N/A modes: N/A
  OpenGL: renderer: Mesa Intel HD Graphics P630 (KBL GT2) v: 4.6 Mesa
    22.1.7 direct render: Yes
Audio:
  Device-1: Intel CM238 HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel bus-ID: 1-6:6 chip-ID: 1532:0504 bus-ID: 00:1f.3
    chip-ID: 8086:a171 class-ID: 0300 class-ID: 0403
  Device-2: NVIDIA GM206 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:0fba class-ID: 0403
  Device-3: Razer USA Kraken 7.1 Chroma type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Device-4: Lenovo ThinkPad Thunderbolt 3 Dock USB Audio type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-2.1.1.2:9
    chip-ID: 17ef:30cf class-ID: 0300 serial: <filter>
  Sound Server-1: ALSA v: k5.19.13-zen1-1-zen running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.58 running: yes
Network:
  Device-1: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15e3 class-ID: 0200
  IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:24fd
    class-ID: 0280
  IF: wlp4s0 state: down mac: <filter>
  Device-3: Lenovo ThinkPad TBT 3 Dock type: USB driver: r8152
    bus-ID: 4-2.1.2:6 chip-ID: 17ef:3082 class-ID: 0000 serial: <filter>
  IF: enp10s0u2u1u2 state: down mac: <filter>
  Device-4: ASIX AX88179 Gigabit Ethernet type: USB driver: ax88179_178a
    bus-ID: 4-2.2.1:5 chip-ID: 0b95:1790 class-ID: ff00 serial: <filter>
  IF: enp10s0u2u2u1 state: down mac: <filter>
  IF-ID-1: vboxnet0 state: down mac: <filter>
  IF-ID-2: vpn0 state: up speed: 10 Mbps duplex: full mac: N/A
Drives:
  Local Storage: total: 704.24 GiB used: 52.39 GiB (7.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Lenovo
    model: LENSE20256GMSP34MEAT2TA size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2.8.8341 temp: 38.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST500LM021-1KJ152
    size: 465.76 GiB block-size: physical: 4096 B logical: 512 B
    speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: LIM1
    scheme: GPT
Partition:
  ID-1: / raw-size: 237.26 GiB size: 237.26 GiB (100.00%) used: 52.37 GiB
    (22.1%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-8bbf76ae-7d61-4f11-baf6-975ba4e35aaa
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%) used: 21.3 MiB
    (4.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 237.26 GiB size: 237.26 GiB (100.00%) used: 52.37
    GiB (22.1%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-8bbf76ae-7d61-4f11-baf6-975ba4e35aaa
  ID-4: /var/log raw-size: 237.26 GiB size: 237.26 GiB (100.00%) used: 52.37
    GiB (22.1%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-8bbf76ae-7d61-4f11-baf6-975ba4e35aaa
  ID-5: /var/tmp raw-size: 237.26 GiB size: 237.26 GiB (100.00%) used: 52.37
    GiB (22.1%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-8bbf76ae-7d61-4f11-baf6-975ba4e35aaa
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 31.07 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 71.0 C pch: 64.0 C mobo: N/A
  Fan Speeds (RPM): fan-1: 3395 fan-2: 3389
Info:
  Processes: 307 Uptime: 1h 1m wakeups: 1 Memory: 31.07 GiB used: 10.02 GiB
  (32.3%) Init: systemd v: 251 default: graphical tool: systemctl
  Compilers: gcc: 12.2.0 Packages: 1409 pm: pacman pkgs: 1404 libs: 334
  tools: pamac,paru pm: flatpak pkgs: 5 Shell: fish v: 3.5.1
  running-in: yakuake inxi: 3.3.21
e[1;34mGaruda (2.6.8-1):e[0m
e[1;34m  System install date:e[0m     2022-09-04
e[1;34m  Last full system update:e[0m 2022-10-07
e[1;34m  Is partially upgraded:  e[0m No
e[1;34m  Relevant software:      e[0m NetworkManager
e[1;34m  Windows dual boot:      e[0m No/Undetected
e[1;34m  Snapshots:              e[0m Snapper
e[1;34m  Failed units:           e[0m 
1 Like

The clue about the Thunderbolt dock would make me think it is a kernel problem.

Try some other kernels and see if the issue persists. To install the “vanilla” Linux kernel, bring your system fully up to date:

garuda-update

Install the kernels and headers:

sudo pacman -S linux linux-headers

On the grub screen, choose advanced boot options and select your new kernel.

The LTS kernel is a good one to test as well, or for especially new hardware the mainline kernel.

Welcome to the community! :slightly_smiling_face:

3 Likes

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