Diagonal screen tear when using prime-run on any application

Hello,
as the title suggests, whenever using prime-run to use my dedicated GPU to run any application I get huge diagonal screen tears whenever scolling/moving. This happens for example in games like Minecraft or anything launched by steam, but also in productivity apps like VSCode. I’m unsure where to start troubleshooting so I’d appreciate some help. Let me know if there’s anything I can provide.

inxi -Faz

System:
  Kernel: 6.8.0-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.8-x86_64
    root=UUID=c0382431-3b04-4e3b-82d0-8eec3d9f6e2c rw mem_sleep_default=deep
    ibt=off quiet apparmor=1 security=apparmor udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.11 tk: Qt v: 5.15.12 info: frameworks
    v: 5.115.0 wm: kwin_wayland with: latte-dock vt: 1 dm: SDDM Distro: Manjaro
    base: Arch Linux
Machine:
  Type: Laptop System: Dell product: XPS 17 9720 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0W7GHH v: A00 serial: <superuser required> part-nu: 0AFF
    uuid: <superuser required> UEFI: Dell v: 1.18.0 date: 06/05/2023
Battery:
  ID-1: BAT0 charge: 63.9 Wh (100.0%) condition: 63.9/95.1 Wh (67.2%)
    volts: 12.5 min: 11.4 model: SMP DELL 01RR3YM type: Li-poly serial: <filter>
    status: full
  Device-1: hidpp_battery_1 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: 12th Gen Intel Core i9-12900HK bits: 64 type: MST AMCP
    arch: Alder Lake gen: core 12 level: v3 note: check built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x9A (154) stepping: 3
    microcode: 0x430
  Topology: cpus: 1x cores: 14 mt: 6 tpc: 2 st: 8 threads: 20 smt: enabled
    cache: L1: 1.2 MiB desc: d-8x32 KiB, 6x48 KiB; i-6x32 KiB, 8x64 KiB
    L2: 11.5 MiB desc: 6x1.2 MiB, 2x2 MiB L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 793 high: 1579 min/max: 400/4900:5000:3800 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1314 2: 1555 3: 443
    4: 400 5: 454 6: 400 7: 577 8: 400 9: 985 10: 400 11: 722 12: 1579 13: 792
    14: 400 15: 400 16: 400 17: 1120 18: 1294 19: 1069 20: 1164
    bogomips: 116780
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  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_rstack_overflow 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 Alder Lake-P GT2 [Iris Xe Graphics] vendor: Dell
    driver: i915 v: kernel arch: Gen-12.2 process: Intel 10nm built: 2021-22+
    ports: active: DP-2,eDP-1 empty: DP-1, DP-3, DP-4, DP-5, HDMI-A-1
    bus-ID: 00:02.0 chip-ID: 8086:46a6 class-ID: 0300
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Dell
    driver: nvidia v: 550.54.14 alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2024-02; EOL~2026-12-xx) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-2023 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:2520 class-ID: 0300
  Device-3: Logitech BRIO 4K Stream Edition driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.4.3:10
    chip-ID: 046d:086b class-ID: 0102 serial: <filter>
  Device-4: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-6:2 chip-ID: 0c45:6a15
    class-ID: 0e02
  Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.4
    compositor: kwin_wayland driver: X: loaded: modesetting,nvidia
    unloaded: nouveau alternate: fbdev,nv,vesa dri: iris gpu: i915,nvidia
    d-rect: 3665x2171 display-ID: 0
  Monitor-1: DP-2 pos: bottom-r res: 1920x1080 size: N/A modes: N/A
  Monitor-2: eDP-1 pos: primary,top-left res: 1745x1091 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
    drv: nvidia device: 2 drv: iris device: 3 drv: swrast surfaceless:
    drv: nvidia wayland: drv: iris x11: drv: iris inactive: gbm,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.0.2-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Graphics (ADL GT2)
    device-ID: 8086:46a6 memory: 30.31 GiB unified: yes display-ID: :1.0
  API: Vulkan v: 1.3.279 layers: 5 device: 0 type: discrete-gpu name: NVIDIA
    GeForce RTX 3060 Laptop GPU driver: nvidia v: 550.54.14
    device-ID: 10de:2520 surfaces: xcb,xlib,wayland device: 1
    type: integrated-gpu name: Intel Graphics (ADL GT2) driver: mesa intel
    v: 24.0.2-manjaro1.1 device-ID: 8086:46a6 surfaces: xcb,xlib,wayland
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:51c8 class-ID: 0401
  Device-2: JMTek LLC. USB Condenser Microphone
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 1-4.3:8 chip-ID: 0c76:1717 class-ID: 0300
  Device-3: Logitech BRIO 4K Stream Edition driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.4.3:10
    chip-ID: 046d:086b class-ID: 0102 serial: <filter>
  API: ALSA v: k6.8.0-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin tools: pactl,pw-cat,pw-cli
Network:
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:51f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
    rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 6-1.1:3
    chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  IF: enp164s0u1u1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: br-1c5bbddab35d state: down mac: <filter>
  IF-ID-2: br-66b1fab15b1f state: down mac: <filter>
  IF-ID-3: br-81ebd8eae1b4 state: down mac: <filter>
  IF-ID-4: br-d911c4f9c64e state: down mac: <filter>
  IF-ID-5: docker0 state: down mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Intel AX211 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-10:4 chip-ID: 8087:0033
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Drives:
  Local Storage: total: 2.3 TiB used: 499.19 GiB (21.2%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: PC801 NVMe 2TB
    size: 1.86 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 51002141 temp: 36.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37480G
    size: 447.13 GiB block-size: physical: 4096 B logical: 512 B type: USB
    rev: 2.1 spd: 480 Mb/s lanes: 1 mode: 2.0 tech: SSD serial: <filter>
    fw-rev: 0301 scheme: GPT
Partition:
  ID-1: / raw-size: 976.56 GiB size: 960.16 GiB (98.32%)
    used: 499.1 GiB (52.0%) fs: ext4 dev: /dev/nvme0n1p7 maj-min: 259:7
  ID-2: /boot/efi raw-size: 200 MiB size: 196 MiB (98.00%)
    used: 92.1 MiB (47.0%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 63.0 C mobo: 43.0 C
  Fan Speeds (rpm): cpu: 1674 fan-2: 1690
Info:
  Memory: total: 32 GiB note: est. available: 31.04 GiB
    used: 11.06 GiB (35.6%)
  Processes: 435 Power: uptime: 2h 32m states: freeze,mem,disk
    suspend: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 12.41 GiB services: org_kde_powerdevil,upowerd
    Init: systemd v: 255 default: graphical tool: systemctl
  Packages: 2091 pm: pacman pkgs: 2041 libs: 435 tools: pamac,yay
    pm: flatpak pkgs: 19 pm: snap pkgs: 31 Compilers: clang: 16.0.6 gcc: 13.2.1
    alt: 12 Shell: Zsh v: 5.9 default: Bash v: 5.2.26 running-in: konsole
    inxi: 3.3.33

mhwd -li

Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-prime            2023.03.23               false            PCI
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

Thanks in advance for the help!

I’ve seen some very recent threads likely related to this topic. It might pay to search the forum. Cheers.

I had a good look before posting this but didn’t find anything, do you have some pointers?

add the kernel parameter mentioned in this link:
https://wiki.archlinux.org/title/Dell_XPS_17_(9720)#Touchpad_sluggish/sticky

if it doesnt work, switch from wayland to xorg and test

No, sorry. I only remember seeing them, not the actual thread titles. However, including ‘prime-run’ and ‘screen tearing’ in your searches might be a good place to start.

Cheers.

Thanks for the answer:
the kernel parameter doesn’t help unfortunately. It’s worth noting that my issue is different from the one described in the post, my tearing is diagonal (top-left to bottom-right) and spans the full length of the screen.

Switching to X11 does fix this, but this isn’t really a viable solution for me. I’m working with a 4K laptop screen and a 1920x1080 external monitor and so I need Wayland for my setup.

Something I also tried following NVIDIA Optimus - ArchWiki is setting the DRM modeset parameter (NVIDIA - ArchWiki) by making a tearing.conf file in /etc/modprobe.d with options nvidia_drm "modeset=1" inside, but this resulted in my system not booting and I had to remove the file via tty.

The system boots !
nvidia wayland requires nvidia_drm.modeset=1 ! (grub-commandline)
Also works great. The problem is sddm
sddm does not manage to find a screen.
I am currently doing this as follows.
I have deactivated sddm. I log into the terminal and start wayland with

/usr/lib/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland

I see, thanks! Could you describe this in a bit more detail? For example, did you disable sddm simply with sudo systemctl stop sddm or is there anything else? Just in case, would you just re-enable it normally with sudo systemctl start sddm from tty?

Also, do you type the command manually (or run it from a script file I guess) at boot every time or is there any way to automate it?

Thanks again for the help!

deactivate sddm with

systemctl disable sddm

the next time you start the pc you will be taken directly to the terminal
log in and with

/usr/lib/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland

to start wayland.
Next time you can scroll through the command history using the up and down arrow keys.

A little more detailed
in /etc/mkinitcpio.conf add i915 to Modules and delete kms from Hooks
then execute

sudo mkinitcpio -P

Add in the file /etc/default/grub

nvidia_drm.modeset=1 nvidia_drm.fbdev=1

then

sudo update-grub

do not add the nvidia modules in the mkinitcpio.conf ! Otherwise the power saving function will not work !
You can check this with

cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status

If the card is not used it must be suspended
If everything works so far activate

systemctl enable nvidia-persistenced.service
systemctl enable nvidia-powerd.service

Under wayland it is not enough to simply add prime-run !
The card must be addressed separately with DRI_PRIME
I assume that it is set to 0000:01:00.0.
So

DRI_PRIME=pci-0000_01_00_0 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia

or

DRI_PRIME=pci-0000_01_00_0 prime-run

for steam game over nvidia

DRI_PRIME=pci-0000_01_00_0 prime-run %command%

I used Forspoken Demo to check if everything works including raytracing

Translated with DeepL.com (free version)
PRIME - ArchWiki

1 Like

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