Screen-tearing and stuttering issues in OpenGL and Vulkan games, as of Gnome 44 (and possibly kernel 6.3.1) on Nvidia Optimus laptop running vanilla Arch Linux

I’ve been struggling with and troubleshooting this issue for more than a week now, with no success whatsoever.

Apologies for the lengthy post, but I do want to offer as much information as possible. Let me start with a bit of a background.

While I’m no expert, actually quite the opposite - I’m a bit of a noob - I am pretty good at searching the web and pasting the right commands into the terminal, so I’ve managed to run Linx for the past few years, having had zero training in the matter. My specific needs as a photographer, gamer and video editor, coupled with the fact that I’ve been using Optimus laptops since 2018, which can be finnicky to set up, have always made me rather aware of and specific about what and how I install on my machine. That is to say I’ve been running a vanilla Arch installation with zero issues since the fall of 2022.

All of the sudden, about a week and a half ago, after Arch updated to Gnome 44, I started having screen tearing and stuttering in Albion Online, a native Linux, OpenGL game. I run the game via Steam and I use prime-run as a launch option. I also tried Crusader Kings III, yet another Linux native game, this time running on Vulkan and, yep… the issue remains.

I thought that was really odd, since I hadn’t had any tearing issues on my Optimus laptops running Linux since 2020.

While proving unnecessary prior to this issue, I tried adding nvidia_drm.modeset=1 as a kernel parameter in grub, but that didn’t help. I then tried installing xf86-video-intel as a hail mary, because I read somewhere that it had helped someone else facing a similar issue. Sure enough, that did nothing, so I uninstalled it.

Then I thought I’d add the modules nvidia, nvidia_modeset, nvidia_uvm and nvidia_drm to the initramfs to make them load early, but nothing helped.

That’s about all I could find and all I could think of trying.

Now I thought I’d try to at least find out what causes this and I think I narrowed it down to the culprit being either or both Gnome 44/Kernel 6.3.1. But my money’s on Gnome 44.

Let me explain how I came to this conclusion. I installed the latest Manjaro Gnome image which ships with Gnome 43, kernel 6.1, and nvidia-530. I tested Albion and it ran just fine. I then updated the kernel to 6.3.0 and yet again, the game ran just fine. I then updated to the testing branch which installed Gnome 44 and kernel 6.3.1 and sure enought it’s now that the issues started manifesting.

FWIW, I should also mention that I gave Nobaro Project a try which uses Gnome 43 and kernel 6.2 and sure enough, the issue is not present.

Here’s my system:

System:
  Kernel: 6.3.2-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/vmlinuz-linux
    root=UUID=8faf7ad9-ac09-4191-ac2b-7b8ae2a65e50 rw rootfstype=ext4
    nvidia_drm.modeset=1 loglevel=3
  Desktop: GNOME v: 44.1 tk: GTK v: 3.24.37 wm: gnome-shell dm: GDM v: 44.1
    Distro: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82JM v: Legion 5 17ITH6H
    serial: <superuser required> Chassis: type: 10 v: Legion 5 17ITH6H
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>
    UEFI: LENOVO v: H1CN52WW date: 11/15/2022
Battery:
  ID-1: BAT0 charge: 80.1 Wh (96.0%) condition: 83.4/80.0 Wh (104.3%)
    volts: 17.1 min: 15.4 model: Celxpert L20C4PC2 type: Li-poly
    serial: <filter> status: full cycles: 8
CPU:
  Info: model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8D (141) stepping: 1
    microcode: 0x44
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 640 KiB desc: d-8x48 KiB; i-8x32 KiB L2: 10 MiB desc: 8x1.2 MiB
    L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 2111 high: 2300 min/max: 800/4600 scaling:
    driver: intel_pstate governor: performance cores: 1: 2300 2: 2300 3: 1972
    4: 1459 5: 2300 6: 2300 7: 1180 8: 2300 9: 2300 10: 2300 11: 2300 12: 1569
    13: 2300 14: 2300 15: 2300 16: 2300 bogomips: 73744
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  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: Enhanced / Automatic IBRS, IBPB:
    conditional, RSB filling, PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Lenovo driver: i915
    v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports:
    active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4, DP-5, HDMI-A-1
    bus-ID: 00:02.0 chip-ID: 8086:9a60 class-ID: 0300
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 530.41.03 alternate: nouveau,nvidia_drm non-free: 530.xx+
    status: current (as of 2023-05) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s
    lanes: 16 ports: active: none empty: DP-6, DP-7, HDMI-A-2, eDP-2
    bus-ID: 01:00.0 chip-ID: 10de:2560 class-ID: 0300
  Device-3: Syntek Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-6:3 chip-ID: 174f:2459
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.1
    compositor: gnome-shell 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-size: <missing: xdpyinfo>
  Monitor-1: eDP-1 model: AU Optronics 0x449d built: 2018 res: 1920x1080
    hz: 144 dpi: 128 gamma: 1.2 size: 382x215mm (15.04x8.46")
    diag: 438mm (17.3") ratio: 16:9 modes: 1920x1080
  API: OpenGL Message: Unable to show GL data. Required tool glxinfo
    missing.
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:43c8 class-ID: 0403
  Device-2: NVIDIA GA106 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:228e class-ID: 0403
  API: ALSA v: k6.3.2-arch1-1 status: kernel-api tools: N/A
  Server-1: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:43f0 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 58:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp88s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-14:6 chip-ID: 8087:0026
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: down bt-service: disabled
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 2.98 TiB used: 1.51 TiB (50.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO Plus 250GB size: 232.89 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 2B2QEXM7 temp: 41.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:3 vendor: SK Hynix model: HFS001TDE9X084N
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 41010C22 temp: 41.9 C
    scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD10SPZX-60Z10T0 size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B type: USB rev: 3.0 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1
    tech: HDD rpm: 5400 serial: <filter> fw-rev: 9128 scheme: MBR
  ID-4: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST1000DM010-2EP102
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B type: USB
    rev: 3.0 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: HDD rpm: 7200
    serial: <filter> fw-rev: 9128 scheme: MBR
Partition:
  ID-1: / raw-size: 232.38 GiB size: 227.68 GiB (97.97%)
    used: 19.92 GiB (8.7%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot raw-size: 511 MiB size: 510 MiB (99.80%) used: 95 MiB (18.6%)
    fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 4 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 341 Uptime: 6m wakeups: 1 Memory: available: 31.14 GiB
  used: 5.44 GiB (17.5%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 13.1.1 Packages: pm: pacman pkgs: 930
  libs: 300 tools: gnome-software,pamac,yay pm: flatpak pkgs: 0 Shell: Bash
  v: 5.1.16 running-in: kgx inxi: 3.3.27

I would be very grateful for any tips, because I’m at a complete loss.

Thanks in advance

1 Like

As per this reddit comment there seems to have been a regression when Gnome moved to 44. However, the merge request linked as a temporary solution left me baffled. I have no idea if and how I can fix this.

Any help?

https://gitlab.gnome.org/GNOME/mutter/-/issues/2794

If the issue is with current mutter version you could try

https://aur.archlinux.org/packages/mutter-dynamic-buffering

https://aur.archlinux.org/packages/mutter-git

from AUR … could be they have fix for this issue already in the sources…

mutter-dynamic-buffering could be better for gaming anyway…

I am getting - removing mutter breaks dependency 'libmutter-12.so=0-64' required by gnome-shell

Reinstalling gnome-shell then should give you a choice of the mutter-pkg. you wish to keep, and which to remove during installation prompts. :wink:

Do you mean Extensions (gnome-shell) ?

No. The package:

sudo pacman -Syu gnome-shell

:wink:

But it doesn’t:

sudo pacman -Syu gnome-shell
[sudo] password for radu: 
:: Synchronising package databases...
 core                                     154.3 KiB   787 KiB/s 00:00 [######################################] 100%
 extra                                   1767.5 KiB  6.49 MiB/s 00:00 [######################################] 100%
 community                                  7.4 MiB  18.1 MiB/s 00:00 [######################################] 100%
 multilib                                 161.5 KiB  1035 KiB/s 00:00 [######################################] 100%
warning: gnome-shell-1:44.1-3 is up to date -- reinstalling
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (2) tzdata-2023c-2  gnome-shell-1:44.1-3

Total Download Size:    0.38 MiB
Total Installed Size:  13.57 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 

Did you type “Y” for Yes?

Yes, it didn’t give me any options. It just

:: Retrieving packages...
 tzdata-2023c-2-x86_64                    385.7 KiB  2.22 MiB/s 00:00 [######################################] 100%
(2/2) checking keys in keyring                                        [######################################] 100%
(2/2) checking package integrity                                      [######################################] 100%
(2/2) loading package files                                           [######################################] 100%
(2/2) checking for file conflicts                                     [######################################] 100%
(2/2) checking available disk space                                   [######################################] 100%
:: Processing package changes...
(1/2) upgrading tzdata                                                [######################################] 100%
(2/2) reinstalling gnome-shell                                        [######################################] 100%
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Compiling GSettings XML schema files...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...

Sorry, had the same issue today with budgie-desktop, and reinstalling budgie-desktop fixed it. Seems to be a reverse situation in your case then?

Did you try downgrading mutter?

sudo downgrade mutter
[sudo] password for radu: 
:: Retrieving packages...
 mutter-43.5-1-x86_64                       2.6 MiB  2.09 MiB/s 00:01 [######################################] 100%
loading packages...
warning: downgrading package mutter (44.1+r2+g82bd40dcbc-1 => 43.5-1)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing mutter (43.5-1) breaks dependency 'libmutter-12.so=0-64' required by gnome-shell

So downgrading gnome-shell could eventually do the trick for as long as this bug persists?

Perhaps, but I haven’t been able to downgrade gnome-shell.

And you have tried this already?

See the comments-section on that page from AUR.

I did try mutter-dynamic-buffering but it didn’t do anything for me.

Well, well… of course, you could downgrade Gnome as a whole and see what it does for you, but that would make running Arch (EnOS) kind of obsolete, I guess?

Are you sure it’s nothing else, like graphics driver, etc.?

You could install Xfce parallel to Gnome, just to see what that does.

Yeah…

Pretty sure.

I think I’ll just wait it out…