External HDMI display tearing

So I have an external HDMI display, and I can’t solve the tearing problem. I tried to enable V-Sync in Plasma settings and enabeling tripple buffering in KWin, but without any result.
nvidia-bug-report.log.gz (1.6 MB)

System:    Host: localhost.localdomain Kernel: 5.14.14-1-default x86_64 bits: 64 Desktop: KDE Plasma 5.23.2
          Distro: openSUSE Tumbleweed 20211101
Machine:   Type: Laptop System: HP product: HP Pavilion Gaming Laptop 15-ec1xxx v: N/A serial: <superuser required>
          Mobo: HP model: 87B1 v: 31.21 serial: <superuser required> UEFI: AMI v: F.20 date: 11/04/2020
Battery:   ID-1: BAT0 charge: 46.9 Wh (100.0%) condition: 46.9/46.9 Wh (100.0%)
CPU:       Info: 8-Core model: AMD Ryzen 7 4800H with Radeon Graphics bits: 64 type: MT MCP cache: L2: 4 MiB
          Speed: 2973 MHz min/max: 1400/2900 MHz Core speeds (MHz): 1: 2973 2: 2763 3: 2712 4: 2995 5: 1701 6: 1796 7: 2316
          8: 2250 9: 2480 10: 2875 11: 3406 12: 3191 13: 3105 14: 2830 15: 1676 16: 1626
Graphics:  Device-1: NVIDIA TU117M driver: nvidia v: 470.82.00
          Device-2: Advanced Micro Devices [AMD/ATI] Renoir driver: amdgpu v: kernel
          Device-3: Quanta HP TrueVision HD Camera type: USB driver: uvcvideo
          Display: x11 server: X.Org 1.20.13 driver: loaded: amdgpu,ati,nvidia unloaded: fbdev,modesetting,vesa resolution:
          1: 1920x1080~60Hz 2: 1920x1080~60Hz
          OpenGL: renderer: AMD RENOIR (DRM 3.42.0 5.14.14-1-default LLVM 13.0.0) v: 4.6 Mesa 21.2.5
Audio:     Device-1: NVIDIA driver: snd_hda_intel
          Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor driver: N/A
          Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio driver: snd_hda_intel
          Device-4: ESI Audiotechnik U22 XT USB type: USB driver: hid-generic,snd-usb-audio,usbhid
          Sound Server-1: ALSA v: k5.14.14-1-default running: yes
          Sound Server-2: PulseAudio v: 15.0 running: yes
          Sound Server-3: PipeWire v: 0.3.39 running: yes
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
          IF: eno1 state: up speed: 100 Mbps duplex: full mac: 84:2a:fd:09:2d:40
          Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter driver: rtw_8822ce
          IF: wlo1 state: down mac: 26:ea:40:5c:55:15
Bluetooth: Device-1: Realtek Bluetooth Radio type: USB driver: btusb
          Report: bt-adapter ID: hci0 rfk-id: 0 state: down bt-service: enabled,running rfk-block: hardware: no software: no
          address: 70:66:55:FA:5C:FC
Drives:    Local Storage: total: 1.14 TiB used: 797.51 GiB (68.2%)
          ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB256HBHQ-000H1 size: 238.47 GiB
          ID-2: /dev/sda vendor: Western Digital model: WD10SPSX-60A6WT0 size: 931.51 GiB
Partition: ID-1: / size: 75 GiB used: 65.9 GiB (87.9%) fs: btrfs dev: /dev/nvme0n1p2
          ID-2: /boot/efi size: 1022 MiB used: 324 KiB (0.0%) fs: vfat dev: /dev/nvme0n1p1
          ID-3: /home size: 162.47 GiB used: 121.47 GiB (74.8%) fs: btrfs dev: /dev/nvme0n1p3
          ID-4: /opt size: 75 GiB used: 65.9 GiB (87.9%) fs: btrfs dev: /dev/nvme0n1p2
          ID-5: /var size: 75 GiB used: 65.9 GiB (87.9%) fs: btrfs dev: /dev/nvme0n1p2
Swap:      ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%) dev: /dev/sda1
          ID-2: swap-2 type: file size: 8 GiB used: 27.2 MiB (0.3%) file: /swap/swapfile
          ID-3: swap-3 type: file size: 16 GiB used: 25.7 MiB (0.2%) file: /home/swap/swapfile
Sensors:   System Temperatures: cpu: 73.4 C mobo: 71.0 C gpu: amdgpu temp: 47.0 C
          Fan Speeds (RPM): N/A
Info:      Processes: 439 Uptime: 1h 48m Memory: 14.98 GiB used: 7.06 GiB (47.1%) Shell: fish inxi: 3.3.07

Try this:

Fixed the problem. Thanks.
But for some reason I had to turn vsync parameter in Plasma setting to “auto”.

No, I’m wrong. Tearing is still here.

Sorry, I didn’t check your log thoroughly enough, you’re using offload mode with nvidia as secondary. The option only works if nvidia is set as primary.
Please post the output of

sudo cat /sys/module/nvidia_drm/parameters/modeset

should return ‘Y’

Got “Y”.

Then I suspect prime sync is not supported in that configuration. The manual doesn’t give any info about it

How can I enable tripple buffering in NVIDIA driver?
I know how to do this on a regular PC, but not on a laptop with a hybrid graphic.

The nvidia is only the dumb output sink in your setup, so no driver options have any effect.
With nvidia as primary, tripple buffering is enabled per default.

Does this mean that this problem is caused by the AMD GPU/driver?

I don’t know. Since for this to work, both drivers have to work together so it might be either of it.

1 Like

So I fixed the problem, and I just can’t beleve in this.
In generel I just enabled the tripple buffering and forced the full composition pipeline.
Here is my /etc/X11/ folder X11.tar.lzma (3.4 KB).
I know that the 20-nvidia.conf looks dumb, but it works.

Also I added the nvidia-drm.modeset=1 kernel parameter, but it doesn’t seem that it helps becouse sudo cat /sys/module/nvidia_drm/parameters/modeset still returns the same Y output.

generix, do you have any new assumptions or suggestions for me and those who will try to fix this problem by reading this topic?

1 Like

That’s not really a config you should use, a full xorg config in xorg.conf.d
This now works since you simply switched to nvidia as primary gpu so the ForceCompositionPipeline takes effect.
To have the same but in a better, simple way just delete 20-nvidia.conf and modify 99-nvidia-options.conf

Section "OutputClass"
    Identifier "Nvidia Options"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "ForceFullCompositionPipeline" "true"
    Option "Coolbits" "12"

then run
sudo prime-select nvidia
and reboot.
Which is exactly what I told you in the beginning

Sorry, I didn’t check your log thoroughly enough, you’re using offload mode with nvidia as secondary. The option only works if nvidia is set as primary.

I thought tha the main GPU is defined by the laptop hardware, isn’t it?

Yes and no. The initial primary gpu is defined by the bios but can be changed by Xorg. Of course, the internal display will always be driven by the amd gpu.

In this case I get screen tearing on my laptop screen =D.
And it doesn’t seem like there is a way to fix it as the xrandr --output eDP-1-1 --set TearFree on returns an error.
So it’s not a good solution for me.


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