Bug 487403

Summary: Allow Tearing not working on Hybrid Laptop (Intel/Nvidia)
Product: [Plasma] kwin Reporter: Syntist <syed.talha.khalid>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: nate, syed.talha.khalid, xaver.hugl, zhengliw23
Priority: NOR    
Version First Reported In: 6.0.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Syntist 2024-05-23 02:00:22 UTC
SUMMARY
I am trying to get tearing working on kde6 but I can't get it working, I thought it might the driver issue. but with the release of nvidia 555 they implemented tearing protocol support for vulkan. I still can't get it working.
```
❯ cat /etc/environment
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
KWIN_DRM_NO_AMS=1

❯ modinfo nvidia | grep ^version
version:        555.42.02


STEPS TO REPRODUCE
1.  Set KWIN_DRM_NO_AMS=1
2.  Enable Screen Tearing in Full Screen windows
3.  Run game on nvidia using offloading (prime-run or nvidia offloading)
4.  Make sure game is running in vulkan IMMEDIATE mode (vsync disabled in game)

OBSERVED RESULT
Upon moving the screen really fast, you should be able to see some tearing here and there or running the game on low fps will cause the most tearing. (Tested on windows/xorg)

EXPECTED RESULT
Screen tearing with higher/lower fps, instead of forcing vsync and letency

SOFTWARE/OS VERSIONS
❯ fastfetch
           .-------------------------:                    syntist@syntist-pc
          .+=========================.                    ------------------
         :++===++==================-       :++-           OS: CachyOS Linux x86_64
        :*++====+++++=============-        .==:           Host: Precision 5570
       -*+++=====+***++==========:                        Kernel: Linux 6.9.1-2-cachyos-lto
      =*++++========------------:                         Uptime: 2 hours, 24 mins
     =*+++++=====-                     ...                Packages: 1136 (pacman), 39 (flatpak-system), 1 (flatpak-user)
   .+*+++++=-===:                    .=+++=:              Shell: zsh 5.9
  :++++=====-==:                     -*****+              Display (SHP1515): 1920x1200 @ 66Hz (as 960x600) [Built-in]
 :++========-=.                      .=+**+.              DE: KDE Plasma 6.0.4
.+==========-.                          .                 WM: KWin (Wayland)
 :+++++++====-                                .--==-.     WM Theme: Breeze
  :++==========.                             :+++++++:    Theme: Breeze (Dark) [QT], Breeze-Dark [GTK2], Breeze [GTK3/4]
   .-===========.                            =*****+*+    Icons: breeze-dark [QT], breeze-dark [GTK2/3/4]
    .-===========:                           .+*****+:    Font: Noto Sans (10pt) [QT], Noto Sans (10pt) [GTK2/3/4]
      -=======++++:::::::::::::::::::::::::-:  .---:      Cursor: Breeze_Light (24px)
       :======++++====+++******************=.             Terminal: konsole 24.2.2
        :=====+++==========++++++++++++++*-               Terminal Font: MesloLGS NF (10pt)
         .====++==============++++++++++*-                CPU: 12th Gen Intel(R) Core(TM) i7-12800H (20) @ 4.80 GHz
          .===+==================+++++++:                 GPU 1: NVIDIA RTX A1000 Laptop GPU
           .-=======================+++:                  GPU 2: Intel Iris Xe Graphics @ 1.40 GHz [Integrated]
             ..........................                   Memory: 6.58 GiB / 15.30 GiB (43%)
                                                          Swap: 2.32 GiB / 31.55 GiB (7%)
                                                          Disk (/): 174.82 GiB / 237.41 GiB (74%) - xfs
                                                          Local IP (wlan0): 192.168.1.168/24 *
                                                          Battery: 100% [AC Connected]
                                                          Locale: en_US.UTF-8

ADDITIONAL INFORMATION
People using nvidia only card did say tearing is working, even before the new driver update but for me. It never worked maybe it's cause of hybrid nature of laptop. I only have 66hz screen and having screen tearing enabled on windows/xorg make experience much nice latency wise. On windows I have the smoothes experience even though am having lower fps sometimes, mainly cause of tearing.
Comment 1 Syntist 2024-05-23 02:07:25 UTC
https://imgur.com/a/MCMomAk

video shot in slow motion, as you can see no tearing only ghosting.
Comment 2 Zamundaaa 2024-05-31 14:11:36 UTC
Tearing support seems to only be implemented for native Wayland Vulkan apps in the proprietary NVidia driver. It'll work once the driver implements the X11 API for tearing on Xwayland too
Comment 3 CrunchyCrunch 2024-06-26 17:54:57 UTC
(In reply to Zamundaaa from comment #2)
> Tearing support seems to only be implemented for native Wayland Vulkan apps
> in the proprietary NVidia driver. It'll work once the driver implements the
> X11 API for tearing on Xwayland too

hey there, is there any estimation when this will happen? maybe with the stable release of 555? or is it implemented in 555 beta already as well?
Comment 4 CrunchyCrunch 2024-06-26 17:56:17 UTC
(In reply to Zamundaaa from comment #2)
> Tearing support seems to only be implemented for native Wayland Vulkan apps
> in the proprietary NVidia driver. It'll work once the driver implements the
> X11 API for tearing on Xwayland too

hey there, is there any estimation when this will happen? maybe with the stable release of 555? or is it implemented in 555 beta already as well?
Comment 5 Zamundaaa 2024-07-10 17:26:39 UTC
It's not implemented in 555, and we don't have a timeline for it. As it's just setting a different flag for Xwayland, it shouldn't take too long though