Diagonal tearing on X11

Yesterday I posted an issue, but it turns out this is not exclusive to looking glass. While in X11 session, I experience diagonal tearing. This can be noticed while using an AUR version of Google Chrome, for instance. Switching to Wayland solves the issue. This started after update 2022-11-02.

Please provide:
inxi -Faz
mhwd -li
and
cat /etc/X11/xorg.conf.d/90-mhwd.conf

You can also check what chrome://flags you are using on that browser. See also this:

inxi -Faz

System:
  Kernel: 6.0.6-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.0-x86_64
    root=UUID=221c0161-b4a0-4566-993c-ad491eb83650 rw
    cryptdevice=UUID=8746ff33-9cf3-4a6a-80cd-0bce17cf9410:system
    root=/dev/mapper/system apparmor=1 security=apparmor udev.log_priority=3
    intel_iommu=on rd.driver.pre=vfio-pci kvm.ignore_msrs=1 ibt=off
    video=simplefb:off video=vesafb:off video=efifb:off,vesafb:off
  Desktop: KDE Plasma v: 5.26.2 tk: Qt v: 5.15.6 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82JD v: Legion 5 Pro 16ITH6H
    serial: <superuser required> Chassis: type: 10 v: Legion 5 Pro 16ITH6H
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>
    UEFI: LENOVO v: H1CN47WW date: 03/07/2022
Battery:
  ID-1: BAT0 charge: 46.9 Wh (59.0%) condition: 79.5/80.0 Wh (99.4%)
    volts: 15.8 min: 15.4 model: Sunwoda L20D4PC1 type: Li-poly serial: <filter>
    status: not charging cycles: 45
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: 0x40
  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: 1897 high: 2300 min/max: 800/4600 scaling:
    driver: intel_pstate governor: powersave cores: 1: 2300 2: 2300 3: 2300
    4: 2300 5: 2300 6: 2300 7: 2300 8: 888 9: 948 10: 2300 11: 1053 12: 2300
    13: 1096 14: 2300 15: 1072 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 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: vfio-pci v: N/A alternate: nouveau,nvidia_drm,nvidia
    non-free: 520.xx+ status: current (as of 2022-10) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s
    lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:2560 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.4
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1600 s-dpi: 96 s-size: 677x423mm (26.65x16.65")
    s-diag: 798mm (31.43")
  Monitor-1: eDP-1 model-id: CSO 0x1606 built: 2020 res: 2560x1600 hz: 165
    dpi: 188 gamma: 1.2 size: 345x215mm (13.58x8.46") diag: 407mm (16")
    ratio: 16:10 modes: 2560x1600
  API: OpenGL v: 4.6 Mesa 22.2.1 renderer: Mesa Intel UHD Graphics (TGL GT1)
    direct render: Yes
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: vfio-pci
    alternate: snd_hda_intel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:228e class-ID: 0403
  Sound API: ALSA v: k6.0.6-1-MANJARO running: yes
  Sound Interface: sndio v: N/A running: no
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.59 running: yes
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: wlp0s20f3 state: up 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: down mac: <filter>
  IF-ID-1: br-17ca9ec015c9 state: down mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
  IF-ID-3: virbr0 state: down mac: <filter>
  IF-ID-4: virbr1 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-14:4 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
Drives:
  Local Storage: total: 1.4 TiB used: 363.54 GiB (25.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: MZALQ512HBLU-00BL2 size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 5L2QFXM7 temp: 28.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:1 vendor: Samsung model: SSD 980 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 2B4QFXO7 temp: 33.9 C
  ID-3: /dev/sda maj-min: 8:0 type: USB vendor: Kingston
    model: DataTraveler 3.0 size: 28.9 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: PMAP scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 476.64 GiB size: 468.09 GiB (98.21%)
    used: 176.56 GiB (37.7%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0
    mapped: system
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 16.5 MiB (5.5%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:2
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 512 MiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 42.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 444 Uptime: 2h 26m wakeups: 1 Memory: 15.41 GiB
  used: 7.59 GiB (49.2%) Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: 1845
  pm: pacman pkgs: 1826 libs: 431 tools: pamac pm: flatpak pkgs: 11 pm: snap
  pkgs: 8 Shell: Zsh v: 5.9 running-in: konsole inxi: 3.3.23

mhwd -li

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
     video-modesetting            2020.01.13                true            PCI


Warning: No installed USB configs!

cat /etc/X11/xorg.conf.d/90-mhwd.conf

cat: /etc/X11/xorg.conf.d/90-mhwd.conf: No such file or directory

By the way, I also use the Sweet KDE theme and blurred background in the Konsole. The blur effect too doesnā€™t work after this update.

For this you can do two things:

  • uninstall xf86-video-intel and just delete /etc/X11/xorg.conf.d/20-intel.conf
  • or edit the /etc/X11/xorg.conf.d/20-intel.conf and make it like this:
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "uxa"
   Option      "TearFree"    "true"
EndSection

and you can use also Option "TripleBuffer" "true" if you want ā€¦

Since you seem to use video passthrough for the Nvidia GPU

the use of prime-run <application> is out of question to see if tearing persists ā€¦

Was updated 5 days ago, so you might want to check if you also have the update. https://store.kde.org/p/1294174
If not, try to see how it goes with the default theme.

I tried this option. It causes my system to halt at systemd startup log screen.

What is the command to do this? This doesnā€™t even seem to be installed.

If you did not had it installed, then by adding the file /etc/X11/xorg.conf.d/20-intel.conf would create an issue, because the i915 driver is not quite the same as the intel driver that in that config is set to use.
pamac install package - is to install a package
pamac remove package - is to remove a package

But all this can be done from Pamac UI aka Add/Remove Software.

This solves the issue of diagonal tearing, but it does not solve the issue of blur. And looking glass still has diagonal tearing and reduced framerates. This issue does not exist on Wayland.

And I checked - I have the latest version of Sweet KDE.

Is blur effect activated? How is it set?

image

Is the Compositor enabled in Display Settings?

image

I enabled those, but after the installation of the driver and those options enabled, there is a stuttering effect when I drag my windows.

(Edit) P.S. The problem with blur is not my primary concern - the framerate drop and diagonal tearing in my looking-glass output is.

Right, so did you try to check with the 5.15 kernel that is LTS ?

LTS version of kernel forces my monitor to not exceed 60 fps. This is a common bug for my machine that was fixed only in Kernel 5.19 at that time.

Do you really believe your eyesight can go above that?
Anyway ā€¦
But in the end, did you or not rebuild the AUR package as i hinted on your other topic?

From the LookingGlass documentation, it seems it passes trough whatever GPU there is, without the need of a separated dedicated GPU, so, why are you keeping the RTX 3060 via vfio-pci ?

Yes, absolutley and wholeheartedly. I see a very clear difference between 60-70 and 120-160. Itā€™s quite obvious from the cursor movement.

I donā€™t know whether it can work without a dGPU (it probably can), but pretty much everyone using it relies on dGPU passthrough since the primary mission of it is low latency lossless quality video output. Which is a good thing for for gaming.

I donā€™t need my RTX3060 since all the use I have for it is almost exclusively on my vm. I could potentially set it up another way - try and pass it over to vm upon the start and return it to the host later, but this is a bit more technical than I can currently manage.

Btw. After I installed the driver xf86-video-intel and enabled TearFree, it behaves a bit strange when it goes to sleep and then wakes up. I see a black screen upon a wakeup and a mouse cursor. Any action I take does not give me the splash screen, it stays black. Only after I force-shutdown my machine and restart, the thing disappears.

Also, Itā€™s not my eyesight that let me notice that the problem truly existed - I went into the settings ā†’ desktop effects ā†’ show FPS. It was consistently showing 60 fps at the kernel versions below 5.19. Also, looking glass itself wasnā€™t exceeding that (there is a debug option that lets you view your output FPS, it was showing 60 too).

Cool, you have time to watch the cursorā€¦ Definitely we are talking about different things and probably there is a monitorā€™s refresh rate to the mouse poll rate ā€œconnectionā€ ā€¦

What do you mean?

So you are using it for vfio-pci passthrough for a VM, is it for LookingGlass and that one flickers, then why we talk about your intel GPU?

Ah, ok ā€¦ the common XY problem with an addition of ZQ too ā€¦ Well, i hope someone will help you out.

Hell yeah, thatā€™s helpful.

I came here with problem X, which didnā€™t exist before the most recent update. I came here because the creator of the software I was having problems with pointed me in your direction. Then this problem got worse and I came here again. You told me a solution to this problem - this solved X partially and created the problem Y, which I reported, providing further details of what happens to me if I do what you ask - thatā€™s what people do when they want to help other competent people solve the problem, right? You start asking me questions about my time, my sight, and why I need vfio-pci. Yeah, tell me Iā€™m the one creating the XY problem. You know, just a friendly suggestion - maybe you should research just a tad bit about why monitors with 300Hz even exist and why people even do vfio-pci, and how exactly they do that, before giving me advice about these.

Let it be your XY problem now - I put an X over this distro, because Y I even bother if the first advice people at VFIO give when you tell them that you use Manjaro is to switch to Arch/EndeavourOSā€¦

Ban me now. That would be an ultimate help - this is what this forum is about after all, right? Changes nothingā€¦

You mark the solution X and open a topic for problem Y then, and try to solve that. Thatā€™s how this forum works.

Is not like on any Arch based distribution you will not have issue with AUR packages, and you didnā€™t even bother to answer if you indeed rebuild those related packages.

You should get informed, so you donā€™t have to ask for help, then complain about it.

For marketing purposes mostly. Because some people actually believe that human sight is limited only by our available technology. Is not so. Most of us are not even capable to perceive 60 cicles of flashing light, because most of that information is lost between the retine and our brain = Critical Flicker Fusion, and because

There is no disclaimer that states that a solution would be provided no matter what. Nobody is even tied to provide any sort of assistance if they donā€™t want. You should read the Forum Rules - Manjaro
There is no such thing as ultimate help, except your strawman.

Then, because i didnā€™t say it, but somebody else did - Be the change you want to see in the world!

1 Like