Slow effects and videos with nvidia

Hello,
unfortunately i have a stupid behaviour in my system when the proprietary nvidia driver is installed.

For example, if I watch a video with mpv or vlc or whatever, and then open the file manager, the video freezes for a second or gets slowed down a lot. This can be reproduced with other applications. Also videos running in the browser will freeze for a short time.

Even if my system wakes up from standby, every window that was open has a small graphic tic and is only with black background and so on when reopened.

If I install non-proprietary drivers, I don't have these problems.

But I definitely want to use the nvidia driver ( Steam, Vmware etc. )

Are there any settings or tricks to avoid these problems?

System:
  Host: zero Kernel: 5.4.2-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
  Console: N/A Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: Micro-Star model: X399 SLI PLUS (MS-7B09) v: 2.0 serial: <filter> 
  UEFI: American Megatrends v: A.70 date: 11/14/2018 
CPU:
  Topology: 12-Core model: AMD Ryzen Threadripper 1920X bits: 64 type: MT MCP arch: Zen 
  rev: 1 L2 cache: 6144 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 168042 
  Speed: 2871 MHz min/max: 2200/3500 MHz Core speeds (MHz): 1: 3831 2: 1853 3: 1975 
  4: 2879 5: 4127 6: 2038 7: 1933 8: 2064 9: 2176 10: 2020 11: 2198 12: 2200 13: 2043 
  14: 2194 15: 2032 16: 2097 17: 2552 18: 2018 19: 2043 20: 1911 21: 2197 22: 2139 
  23: 2161 24: 2095 
Graphics:
  Device-1: NVIDIA GM206 [GeForce GTX 960] driver: nvidia v: 440.36 bus ID: 0b:00.0 
  Display: server: X.Org 1.20.6 driver: nvidia tty: N/A 
  OpenGL: renderer: GeForce GTX 960/PCIe/SSE2 v: 4.6.0 NVIDIA 440.36 direct render: Yes 
Audio:
  Device-1: NVIDIA GM206 High Definition Audio driver: snd_hda_intel v: kernel 
  bus ID: 0b:00.1 
  Device-2: AMD Family 17h HD Audio vendor: Micro-Star MSI driver: snd_hda_intel 
  v: kernel bus ID: 0d:00.3 
  Sound Server: ALSA v: k5.4.2-1-MANJARO 
Network:
  Device-1: Intel I211 Gigabit Network vendor: Micro-Star MSI driver: igb v: 5.6.0-k 
  port: 3000 bus ID: 08:00.0 
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A mac: <filter> 
  IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A mac: <filter> 
Drives:
  Local Storage: total: 1.14 TiB used: 449.72 GiB (38.4%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVPV256HDGL-000H1 size: 238.47 GiB 
  ID-2: /dev/nvme1n1 vendor: Western Digital model: WDS500G2X0C-00L350 size: 465.76 GiB 
  ID-3: /dev/nvme2n1 vendor: Western Digital model: WDS500G2X0C-00L350 size: 465.76 GiB 
  ID-4: /dev/sda vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
  ID-5: /dev/sdb vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
Partition:
  ID-1: / size: 274.18 GiB used: 24.73 GiB (9.0%) fs: ext4 dev: /dev/dm-0 
  ID-2: /boot size: 1.91 GiB used: 156.8 MiB (8.0%) fs: ext4 dev: /dev/sda2 
  ID-3: swap-1 size: 8.00 GiB used: 40.0 MiB (0.5%) fs: swap dev: /dev/sda3 
Sensors:
  System Temperatures: cpu: 47.0 C mobo: N/A gpu: nvidia temp: 33 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 21% 
Info:
  Processes: 537 Uptime: 14h 27m Memory: 31.34 GiB used: 3.72 GiB (11.9%) Init: systemd 
  Compilers: gcc: 9.2.0 Shell: zsh v: 5.7.1 inxi: 3.0.37 

Can you try a different (more modern) graphics card?

I have the same GPU. First check the compositor to be like this:

image

In my case the GPU performs fine with the video-nvidia-440xx and 5.3, 5.4 and 5.5rc kernel. I have this config in /etc/X11/mhwd.d/nvidia.conf

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

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    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      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    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

is the default one created by MHWD. I used to have a custom one, but is no longer needed.
If you did modify something in it, this command should be run after that:

sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf

For that you might want to take a look at some systemd services as mentioned here


Look at the KDE Video Corruption Fixes ones ...

Never seen that before. One thing i noticed is that you have

that means is on

Better use swapfile and also make sure you use the proper schedulers as pointed out here

Is hard to understand if is the latest BIOS. Maybe worth checking
https://www.msi.com/Motherboard/support/X399-SLI-PLUS

:slight_smile: I'm sure the OP could buy all the GPU's on the market and test them all :stuck_out_tongue:

This is not necessary: a GTX 1060 or GTX 1660 will be good choice.
:rofl:

Hi bogdancovaciu,
Thank you very much for your detailed answer.

I just wanted to make one thing clear, I don't have a basic performance problem, on the contrary, this beast is super fast.
I only have small optical problems when I watch videos or when I wake up from suspend.

I don't see any advantages of a swap file over a swap partition ( except maybe the customizability ) and since I have a fully encrypted system, I can handle a swap partition outside my encrypted system better.
Swap is only used for suspend anyway.
The whole system boots under 10 seconds, I don't think there is much to speed up.

I've done the compositor settings as you recommended and I feel it has gotten a bit better.

I used to use this configuration, because old habits:

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"
    # generated from default
    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     "LG Electronics"
    ModelName      "LG Electronics W2253"
    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 960"
    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-I-1: 1920x1080_60 +0+0 {ForceCompositionPipeline=On}, DVI-D-0: 1920x1080_60 +1920+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 "ServerFlags"
    Option "IndirectGLX" "On"
EndSection

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

especially because of KDE Plasma, and i made use of kwin.sh and put it in /etc/profile.d as described here:

And KDE Plasma used to perform better than default. Now is no longer the case, at least for me, so i can use the default as it is and no other tweaks in that regard. One thing i do tho, depending the Browser, is to tweak the config flags to use hardware acceleration.
Of course, if you want to test it, you will have to adapt it for your Monitor in that Section "Monitor" and probably the connectors you use in Section "Screen".

I don't use that, so i can't tell if has any influence.

I do not want to manually intervene in the configuration. As often as I experiment with my system, I will certainly forget about it.
The setting you gave me has already improved the behaviour and I think I can live with that.
Thanks a lot for your time.

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

Forum kindly sponsored by