Tearing pictures

Hi,

As the title says I am experiencing tearing pictures and they drive me mad. In the last months I have tried so many things to get rid of them, but I simply don’t know what to do.
This is some info about my hardware:
Lenovo Legion 5 laptop with an AMD Ryzen 7-6800 CPU
I have 2 GPU’s:

sudo /usr/sbin/lshw -c video
Output:
*-display
                description: VGA compatible controller
                product: GA106M [GeForce RTX 3060 Mobile / Max-Q]
                vendor: NVIDIA Corporation
                physical id: 0
                bus info: pci@0000:01:00.0
                logical name: /dev/fb0
                version: a1
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress vga_controller bus_master cap_list rom fb
                configuration: depth=32 driver=nvidia latency=0 mode=2560x1600 visual=truecolor xres=2560 yres=1600

*-display
                description: VGA compatible controller
                product: Rembrandt [Radeon 680M]
                vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                physical id: 0
                bus info: pci@0000:34:00.0
                logical name: /dev/fb0
                version: c8
                width: 64 bits
                clock: 33MHz
                capabilities: pm pciexpress msi msix vga_controller bus_master cap_list fb
                configuration: depth=32 driver=amdgpu latency=0 resolution=2560,1600
$ sudo /usr/sbin/modinfo amd
filename:       /usr/lib/modules/6.6.1-1-default/kernel/drivers/net/phy/amd.ko.zst
license:        GPL
author:         Heiko Schocher <hs@denx.de>
description:    AMD PHY driver
suserelease:    openSUSE Tumbleweed
srcversion:     2E2266BA96B0E82BDB4D8E0
alias:          mdio:0000000000100010010101100001????
depends:        libphy
retpoline:      Y
intree:         Y
name:           amd
vermagic:       6.6.1-1-default SMP preempt mod_unload modversions 
sig_id:         PKCS#7
signer:         openSUSE Secure Boot CA
sig_key:        FA:BE:D8:BF:40:9A:5E:65
sig_hashalgo:   sha256
signature:      48:67:31:FA:B5:AE:73:67:52:E7:11:99:9F:22:33:F0:0D:45:E1:20:
                50:DB:74:54:75:F9:AC:AC:68:75:E3:BF:76:38:73:16:8C:4A:F0:3F:
                6D:D0:7B:28:34:FF:B9:3C:C9:6F:F4:E0:20:AD:7D:5C:E5:BE:58:6A:
                81:5F:A6:90:71:44:14:D6:A7:21:44:D7:69:DF:D3:3B:9C:F0:28:B4:
                78:89:34:45:4E:57:F7:F9:E9:FB:DC:AF:44:35:D7:30:23:80:E1:73:
                46:CD:E9:FE:5F:06:5B:07:2A:30:58:4D:24:DE:6A:B0:0E:F6:4A:21:
                E8:1A:A5:ED:54:9B:44:47:16:C6:FA:59:09:C0:0B:D6:3B:E1:D4:6A:
                83:70:E1:1E:87:95:68:8A:8E:E8:AE:54:75:5C:16:16:21:B9:65:6D:
                19:F6:76:CD:76:BB:7A:E2:15:34:40:0E:4F:89:48:AF:A6:DF:CA:64:
                86:F6:9D:13:3C:E0:69:2B:84:83:15:BD:FD:8D:65:07:79:96:CD:CF:
                80:DC:84:F7:13:4B:1F:24:C5:15:DB:E5:E4:3D:9E:91:35:F1:DB:3D:
                C1:24:98:74:DB:58:C5:89:69:01:B7:31:09:2F:64:E7:F2:EC:26:AD:
                8D:69:77:85:2D:5B:69:12:90:90:3A:29:DC:97:7E:A7
$ sudo /usr/sbin/modinfo nvidia
filename:       /usr/lib/modules/6.6.1-1-default/updates/nvidia.ko
alias:          char-major-195-*
version:        545.29.02
supported:      external
license:        NVIDIA
firmware:       nvidia/545.29.02/gsp_tu10x.bin
firmware:       nvidia/545.29.02/gsp_ga10x.bin
suserelease:    openSUSE Tumbleweed
srcversion:     8302209549E8FEAC029EDC0
alias:          pci:v000010DEd*sv*sd*bc06sc80i00*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        
retpoline:      Y
name:           nvidia
vermagic:       6.6.1-1-default SMP preempt mod_unload modversions 
parm:           NvSwitchRegDwords:NvSwitch regkey (charp)
parm:           NvSwitchBlacklist:NvSwitchBlacklist=uuid[,uuid...] (charp)
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_InitializeSystemMemoryAllocations:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_EnablePCIeGen3:int
parm:           NVreg_EnableMSI:int
parm:           NVreg_TCEBypassMode:int
parm:           NVreg_EnableStreamMemOPs:int
parm:           NVreg_RestrictProfilingToAdminUsers:int
parm:           NVreg_PreserveVideoMemoryAllocations:int
parm:           NVreg_EnableS0ixPowerManagement:int
parm:           NVreg_S0ixPowerManagementVideoMemoryThreshold:int
parm:           NVreg_DynamicPowerManagement:int
parm:           NVreg_DynamicPowerManagementVideoMemoryThreshold:int
parm:           NVreg_EnableGpuFirmware:int
parm:           NVreg_EnableGpuFirmwareLogs:int
parm:           NVreg_OpenRmEnableUnsupportedGpus:int
parm:           NVreg_EnableUserNUMAManagement:int
parm:           NVreg_MemoryPoolSize:int
parm:           NVreg_KMallocHeapMaxSize:int
parm:           NVreg_VMallocHeapMaxSize:int
parm:           NVreg_IgnoreMMIOCheck:int
parm:           NVreg_NvLinkDisable:int
parm:           NVreg_EnablePCIERelaxedOrderingMode:int
parm:           NVreg_RegisterPCIDriver:int
parm:           NVreg_EnableResizableBar:int
parm:           NVreg_EnableDbgBreakpoint:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_RegistryDwordsPerDevice:charp
parm:           NVreg_RmMsg:charp
parm:           NVreg_GpuBlacklist:charp
parm:           NVreg_TemporaryFilePath:charp
parm:           NVreg_ExcludedGpus:charp
parm:           NVreg_DmaRemapPeerMmio:int
parm:           NVreg_RmNvlinkBandwidth:charp
parm:           rm_firmware_active:charp
$ lspci -k | grep -EA3 'VGA|3D|Display'
pcilib: Error reading /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
        Subsystem: Lenovo Device 3b07
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia
--
34:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] (rev c8)
        Subsystem: Lenovo Device 3b07
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

This is the contents of the nvidia.conf file in /etc/X11:

Section "ServerLayout"
    Identifier "layout"
    Screen "nvidia"
    Inactive "amd"
    Inactive "modesetting"
EndSection

Section "Screen"
    Identifier "AMD"
    Device "amdgpu"
EndSection

Section "Device"
    Identifier "AMD"
    Driver "amdgpu"
    Option "Tearfree" "true"
EndSection

Section "Screen"
    Identifier "modesetting"
    Device "modesetting"
EndSection

Section "Device"
    Identifier "modesetting"
    Driver "modesetting"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
    Option "AllowIndirectGLXProtocol" "off"
    Option "TripleBuffer" "on"
EndSection

Section "Device"
    Identifier "Nvidia Card"
    Driver "nvidia"
    Vendorname "NVIDIA Corporation"
    Boardname "GeForce RTX 3060"
    BusID "PCI:1:0:0"
    Option "DPI" "96 x 96"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus"
    Option "Tearfree" "true"
EndSection

When I boot into Wayland or into X11 I am automatically using the AMD GPU. This is shown by the command:

$ glxinfo|grep -E "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (rembrandt, LLVM 17.0.3, DRM 3.54, 6.6.1-1-default)

The only difference between the two is that in X11 I get a temp. and frequency reading for the Nvidia GPU in my Conky. In Wayland I don’t see those values.

This is a screenshot of the packages installed when I filter on Nvidia:


This is when I filter on AMD:

Who can help me with this problem, as said it drives me nuts. Do I need an Nvidia.conf file, and if so, what should be in there?
Did I, or better did the installer, install the correct packages? Do I need to install more, or maybe even less?

If I have to show more info about the laptop then please let me know. Thank you very much.

@JanMussche Your xorg.conf file is a mixture of AMD and Nvidia…?

More modern laptops are designed better for Prime Render Offload, I’m guessing your using suse-prime, or bbswitch (which is obsolete/deprecated)?

Have you tried just using the AMD device for normal and Nvidia for Offload?

Hello, the xorg.conf file is something wich was made during installation of Tumbleweed, I did not do that.
No, I don’t use suse-prime, it is not installed. All that I have is in the two pictures I added, one for nvidia and one for AMD.
When I boot into Wayland (best results) I am apparently using only the AMD GPU, and when in X11 both. The system tells me I use the AMD, but the Nvidia is switched on as wel and it is giving me reading for its temperature and clock frequency.

“Have you tried just using the AMD device for normal and Nvidia for Offload?”
Is this what I have in X11, using both GPU’s?

Situation has changed. I just installed suse-prime with the help of this page: SDB:NVIDIA SUSE Prime - openSUSE Wiki
I removed all .conf files in /etc/X11 first, logged out-in and switched to Nvidia with prime-select.

$ echo $XDG_SESSION_TYPE
x11
$ glxinfo|grep -E "OpenGL vendor"
OpenGL vendor string: AMD

This is what I still get, but as before with the temp and frequency reading of the Nvidia GPU. Again, when I use Wayland I don’t get these.

When I watch a video now the tearing is a bit better, although it is difficult to say I guess. (.conf files are removed) but I still see the flashes when a picture has to be drawn completely (i-frame). It’s when the scene completely changes.

I now changed to Wayland and Nvidia but I am still using the AMD GPU. Apparently Wayland and Nvidia don’t go together.

What to do next?

IMHO libnvidia-egl-wayland1 is not needed.
Blacklist nouveau.
https://www.maketecheasier.com/wayland-work-with-nvidia-graphics-cards/

Hi, and thank for answering.
I have looked at the page you mentioned and I have even started to do what it says but I have no /etc/environment file and I also don’t have an /etc/mkinitcpio.conf file. Does openSUSE work with these files? I ask this cause the page mentions Arch, Fedora and Debian/Ubuntu distro’s.
If openSUSE uses these files, and to be honest the names don’t sound too strange to me, then I wonder what went wrong with my installation?

@JanMussche can you boot into a X11 session and paste the output from the following two commands;

xrandr --listproviders
xrandr --listmonitors

TW installation does not create /etc/X11/xorg.conf, unless it changed in recent months, while it does create /etc/X11/xorg.conf.d/, which is an optional directory. It has traditionally created /etc/X11/xorg.conf.install, a relic that is not employed post-installation. Existence of /etc/X11/xorg.conf means something that did not come from FOSS in standard TW repos was used to create it, most often from proprietary NVidia driver installation.

Hello all,
In the mean time I have switched over to Fedora KDE 39, something I was planning to do for some time. I can not give you any more answers because of that.
Thank you for your help.