Stuttering and tearing in videos (nvidia - kde)

Yeah, trust me I´ve done every step correctly, as I said I have tried to fix this problem lots of times with no result, and I was wondering if this time I could solve it.
I tried composition with and without full, every possible kde compositor settings combination and some other tricks like that one of the triple buffer.
My current state is with your same config in nvidia-settings and with the same in compositor but the window thumbnails option, and I have been with this configuration for some days until today and with this stuttering problems.
Also yes, I know the sudo thing with nvidia-settings, I do the same like you.

As a last resort have you considered trying to wipe Nvidia from your computer and reinstalling clean? Maybe something went wrong during the update (I see you went from Nvidia 430 to 460 with the configs you posted, supposedly during the big Nvidia change in Manjaro recently) and you have a mystery issue?

Maybe try again to find some configuration but if Bogdancovaciu’s method, and mine fail, then either you’re doing something wrong or something we don’t know on your system interferes, or maybe something is not working as intended with the drivers?

//EDIT: I was comparing our hardware/system from your profile, you’re using very old Kernel maybe drivers don’t work good with Kernel 4.19, maybe try 5.10.

Before the update I had the same problems but worse, I had the composite pipeline disabled, and vsync with kde enabled. I got that config after lots of try and failure and noticing that nvidia-settings composite pipeline was waaaay laggy than what is like now. After the update, since the drivers got updated, I thought that now the problem could be fixed with composite pipeline, and it´s better than before the update, but still no perfect.

oh sorry about that, I´m using 5.4, my profile is outdated.

All right. I don’t know what else you could try, I have similar system and it just works. You shouldn’t have any issue regarding performance.

Here is my proposal, backup your config and use this one:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics LG FULL HD"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1060 6GB"
    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Add to the kwin.sh all this 3 lines:

export KWIN_TRIPLE_BUFFER=1
export __GL_YIELD=USLEEP
export __GL_MaxFramesAllowed=1

Run this command from terminal after that:
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf
Reboot the system.
You can comment out the triple buffer if you will want that, or is not working and also remove the kwin.sh, but with this settings even a GTX 650, i have on another machine performs, well on KDE Plasma …

1 Like

I don´t think that it´s a matter of performance or power, it´s just like some kind of output lag between the video and the display, I don´t know how to explain it, but it´s not like the gpu is overloaded and I need a configuration for an older gpu.
Still I´ll try with that and see if it fixes this.
Should I disable compositor in kde? or just disable vsync? or all enabled?

Also I´m doing the chages to xorg.conf file and they apply correctly since previously the triple buffer activated correctly, and nvidia-settings shows all that I set in that file when reboot, is it necessary to use mhwd.d/nvidia.conf? that file is empty in my system.

You did install the video driver trough mhwd, right? Since Manjaro is using it, then that is the default: /etc/X11/mhwd.d/nvidia.conf
Nothing else.

That is not why i mentioned my older GPU, you twisted what i meant by that, but i will not explain it …

When KDE Plasma 5.20 will hit stable and you will have all this options in Compositor Settings, you might still need to tweak the nvidia.conf

image

1 Like

If you are then it is not a normal Nvidia installation from Manjaro.

Nothing seemed normal for me with the last big explosive update tbh, I reinstalled the drivers the better I could. Still it works, and it uses xorg.conf, so I don´t know why that would be causing a bit of stuttering in videos.

My nvidia.conf file is empty, I suppose that the system uses it only if it has something on it, if not it uses the xorg.conf.

Exactly the same behavior after applying this settings and reboot…

Finally I tried writing your example in both, xorg.conf and nvidia.conf, it applies in nvidia-settings, but still no improvement in performance.

Well thanks for the help, I suppose that I will keep waiting for some update to magically fix whatever happens with my system, since this seems to be related to something very weird, probably the kernel or the drivers or idk, but nothing I can do to fix it myself.

Thought to add it in the third place? :slight_smile: Use one or another, and to be sure is loaded you have to make this command

to point to that place.

Check what drivers you installed.
mhwd -li
Always use mhwd for kernel and drivers.

1 Like

I have video-hybrid-intel-nvidia-prime installed.

Also I just checked with a xfce session and the problem is not there (but when playing videos in xfce another problem exists, if I move a window while playing video the window moves veeeery laggy).

Anyways it seems to be kde´s fault after all.

Also, I do use mhwd when I have to do something related to kernel or drivers, it´s not like I go to some webpage and download them from there. I think that my xorg.conf file is weird because of the last big update.

I guess it is time to start from beginning then as everyone should when opening a support thread, missing critical information leads to waste of time:

You could have tell me what information did I miss…

If you mean the drivers… I had nvidia drivers (not prime) before manjaro update, and as I said, the problem was the same. It´s a problem I´ve been having for a long time with lots of configurations done.

Also the prime installation was done automatically by mhwd as the recommended drivers, and I don´t use the igpu, I don´t have any screen connected to it and all the desktop rendering is done by nvidia.

This topic gets hilarious by the time it reveals more information … So, after KDE plasma now you mention

Your user profile states you have GPU: Nvidia GTX 1060 6GB - and if that information is correct, there was no reason for me to think to hybrid graphics hence no hybrid drivers.

MHWD will not install hybrid drivers if there is no iGPU detected. Start with your BIOS and disable the iGPU, install the proper drivers video-nvidia, then start tweaking …
Mixing KDE Plasma with XFCE on the same user is a very bad idea …

I’ll let others to deal with it. Cheers!

So cruel XDDD

Well I´ll try to extract all the information I can from the whole conversation and try to guess what could be happening.

Thanks for the help anyways.

If you want pure Nvidia setup, as suggested, disable your integrated Intel GPU in Bios so Manjaro can handle it correctly.
If you do not disable your Intel GPU in BIOS then you probably need the hybrid configuration installed properly through MHWD or Manjaro Settings (graphical UI).

Start over, just configure BIOS as you want it, then remove and reinstall properly the appropriate driver through Manjaro tools (I recommend the graphical interface it is easy no need to type commands).

1 Like

Do you think that the problem could be related to hybrid drivers? even if I had the same problem with the other drivers and I don´t have the problem in xfce? and even if when I check the desktop renderer it´s all nvidia?.

Anyways I do want a pure nvidia setup, I´ll try to reconfigure the bios some day (I don´t think I know how to do that now).