Screen Stuttering/Lag after long uptimes on Nvidia proprietary drivers

I’ve been having this issue where after a certain amount of uptime (usually a few hours) the screen will have a stutter every few milliseconds, it is especially noticeable when moving the mouse, watching videos, playing games or moving windows around. If I’m moving the mouse in a circle, it’ll stall for a few milliseconds (along with the rest of the screen) and then start moving again, only to stall about a half second later.

At first I thought it might be a process using up all system resources but looking at gnome-system-monitoring everything is usually under 20% unless a legitimate process is using more resources. Nothing is even close to 100%. Restarting seems to make the issue go away, until it reappears a few hours later.

I think I’ve narrowed it down to these messages I find in Xorg.0.log:

[ 23309.612] (EE) event24 - SINO WEALTH USB KEYBOARD: client bug: event processing lagging behind by 77ms, your system is too slow
[ 23309.612] (EE) event24 - SINO WEALTH USB KEYBOARD: WARNING: log rate limit exceeded (5 msgs per 60s). Discarding future messages.
[ 23512.159] (II) event19 - USB Gaming Mouse: SYN_DROPPED event - some input events have been lost.

All of my USB devices will throw these three messages, and when the screen stuttering gets really bad the lag in these logs will go from the usual 10-70ms to upwards of 250ms, which leads me to believe I’m on to something at the very least. I’ve read around that these come from libinput, not sure what to do with that information.

One of my screens also throws this message once every few seconds:

 [  1410.274] (--) NVIDIA(GPU-0): AOC 2260W (DFP-3): connected
 [  1410.274] (--) NVIDIA(GPU-0): AOC 2260W (DFP-3): Internal TMDS
 [  1410.274] (--) NVIDIA(GPU-0): AOC 2260W (DFP-3): 165.0 MHz maximum pixel clock

Hardware:

  • AMD Ryzen 2700x
  • Nvidia RTX 2070
  • 16gb of RAM
  • Three screens, two DisplayPorts and one HDMI, the main one being 144hz

Current config:

  • Nvidia proprietary drivers, version 440.100
  • Manjaro Budgie
  • Kernel 5.8.16-2

What I tried so far by searching online:

  • Changing nvidia settings around, including forcing full composition pipeline on all screens
  • powertop --calibrate
  • Uninstalling powertop
  • Creating the udev rule below to disable USB autosuspend
$ cat /etc/udev/rules.d/50-usb_power_save.rules

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on"

None of these have made the slightest difference. Let me know if you need any other information from my system.

Thank you!

I’ve tested another USB mouse to see if it would replicate the same messages, here’s what I got in Xorg.0.log:

[ 27375.436] (II) config/udev: Adding input device PixArt HP USB Optical Mouse (/dev/input/mouse0)
[ 27375.436] (II) No input driver specified, ignoring this device.
[ 27375.436] (II) This device may have been added with another device file.
[ 27375.482] (II) config/udev: Adding input device PixArt HP USB Optical Mouse (/dev/input/event18)
[ 27375.482] () PixArt HP USB Optical Mouse: Applying InputClass “evdev pointer catchall”
[ 27375.482] (
) PixArt HP USB Optical Mouse: Applying InputClass “libinput pointer catchall”
[ 27375.482] (II) Using input driver ‘libinput’ for ‘PixArt HP USB Optical Mouse’
[ 27375.482] () PixArt HP USB Optical Mouse: always reports core events
[ 27375.482] (
) Option “Device” “/dev/input/event18”
[ 27375.482] () Option “_source” “server/udev”
[ 27375.484] (II) event18 - PixArt HP USB Optical Mouse: is tagged by udev as: Mouse
[ 27375.484] (II) event18 - PixArt HP USB Optical Mouse: device is a pointer
[ 27375.484] (II) event18 - PixArt HP USB Optical Mouse: device removed
[ 27375.530] (
) Option “config_info” “udev:/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-9/1-9:1.0/0003:03F0:094A.000D/input/input38/event18”
[ 27375.530] (II) XINPUT: Adding extended input device “PixArt HP USB Optical Mouse” (type: MOUSE, id 8)
[ 27375.531] () Option “AccelerationScheme” “none”
[ 27375.532] (
) PixArt HP USB Optical Mouse: (accel) selected scheme none/0
[ 27375.532] () PixArt HP USB Optical Mouse: (accel) acceleration factor: 2.000
[ 27375.532] (
) PixArt HP USB Optical Mouse: (accel) acceleration threshold: 4
[ 27375.533] (II) event18 - PixArt HP USB Optical Mouse: is tagged by udev as: Mouse
[ 27375.533] (II) event18 - PixArt HP USB Optical Mouse: device is a pointer

Here’s the dmesg output:

[27324.203008] usb 1-3: new low-speed USB device number 6 using xhci_hcd
[27324.458726] usb 1-3: New USB device found, idVendor=03f0, idProduct=094a, bcdDevice= 1.00
[27324.458730] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[27324.458732] usb 1-3: Product: HP USB Optical Mouse
[27324.458734] usb 1-3: Manufacturer: PixArt
[27324.475749] input: PixArt HP USB Optical Mouse as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-3/1-3:1.0/0003:03F0:094A.000B/input/input36
[27324.475916] hid-generic 0003:03F0:094A.000B: input,hidraw5: USB HID v1.11 Mouse [PixArt HP USB Optical Mouse] on usb-0000:01:00.0-3/input0
[27330.248011] usb 1-2: USB disconnect, device number 4
[27330.296896] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[27366.227399] usb 1-3: USB disconnect, device number 6
[27368.487403] usb 1-9: new low-speed USB device number 7 using xhci_hcd
[27368.810255] usb 1-9: New USB device found, idVendor=03f0, idProduct=094a, bcdDevice= 1.00
[27368.810259] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[27368.810261] usb 1-9: Product: HP USB Optical Mouse
[27368.810263] usb 1-9: Manufacturer: PixArt
[27368.826294] input: PixArt HP USB Optical Mouse as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-9/1-9:1.0/0003:03F0:094A.000C/input/input37
[27368.826435] hid-generic 0003:03F0:094A.000C: input,hidraw0: USB HID v1.11 Mouse [PixArt HP USB Optical Mouse] on usb-0000:01:00.0-9/input0
[27371.424035] usb 1-9: USB disconnect, device number 7
[27374.590874] usb 1-9: new low-speed USB device number 8 using xhci_hcd
[27374.913135] usb 1-9: New USB device found, idVendor=03f0, idProduct=094a, bcdDevice= 1.00
[27374.913139] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[27374.913141] usb 1-9: Product: HP USB Optical Mouse
[27374.913142] usb 1-9: Manufacturer: PixArt
[27374.929103] input: PixArt HP USB Optical Mouse as /devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-9/1-9:1.0/0003:03F0:094A.000D/input/input38
[27374.929217] hid-generic 0003:03F0:094A.000D: input,hidraw0: USB HID v1.11 Mouse [PixArt HP USB Optical Mouse] on usb-0000:01:00.0-9/input0
[27559.826787] audit: type=1100 audit(1603842695.633:178): pid=51376 uid=1000 auid=1000 ses=3 subj==unconfined msg=‘op=PAM:authentication grantors=pam_faillock,pam_permit,pam_faillock acct=“anon” exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/3 res=success’
[27559.828057] audit: type=1101 audit(1603842695.633:179): pid=51376 uid=1000 auid=1000 ses=3 subj==unconfined msg=‘op=PAM:accounting grantors=pam_permit,pam_time acct=“anon” exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/3 res=success’
[27559.828323] audit: type=1110 audit(1603842695.633:180): pid=51376 uid=0 auid=1000 ses=3 subj==unconfined msg=‘op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct=“root” exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/3 res=success’
[27559.830981] audit: type=1105 audit(1603842695.636:181): pid=51376 uid=0 auid=1000 ses=3 subj==unconfined msg=‘op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct=“root” exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/3 res=success’

Update: Using the following command seems to fix the issue when it does occur:

sudo systemctl restart display-manager

This seems to indicate the problem is not the hardware itself nor hardware performance…