Void Linux stutters once every few seconds
v.redd.it/vmjmlxne3f291Posted May 29, 2022, 1:36 PM UTC
Posted May 29, 2022, 1:36 PM UTC
I have the same error since I updated, I tried to donwgrade without success, I looked if it was a kernel problem, I reinstalled the system and nothing, curiously in popOS, the same thing happens, then it is a problem of the nvidia drivers. So far I can't solve this problem.
update: after seeing in other forums the possible solutions to this problem, I tried the simplest, change the HDMI cable (or the one you use) and it worked! I no longer have that problem. that's crazy!
I get a similar stutter most of the time. The stutter is seen usually when typing within VIM (eg. sporadic long delay when typing sometimes) and when using aplay will oddly incur delay errors when playing CD 44100hz PCM WAV files.
I never saw such a sporadic delayed/stuttered user input/output when using Gentoo for the past 20-25 years.
I too have a nVidia 670 GTX using proprietary drivers.
POSSIBLE/HELPFUL WORKAROUND
I noticed some of the delay buffer errors when using aplay were slightly reduced when increasing priority. Still not perfect by far, however adding a line to /etc/security/limits.conf for increasing your user nice priority to something like -5 might be highly desireable. (eg. default 19? max -19) I have no idea why Void Linux's default user priority is set so high to something like 19? (Not on my desktop, so typing this from memory, could be default zero nice level for users.)
NVIDIA-UVM
# modprobe nvidia-uvm
nope... still occurring.
Even tried adding to $HOME/.asoundrc within the dmix section for my Asus Xonar C-Media Electronics Inc CMI8788 chip:
file:$HOME/.asoundrc
period_time 0 # Is this required for my soundcard?period_size 1024 # Is this required for my soundcard?buffer_size 4096 # Is this required for my soundcard?
DISABLE ACPI AND PCI POWER MANAGEMENT
Linux Kernel Command-Line Parameter
acpi=off
Reading through the Linux kernel PCI power management documentations, for which my sound card experiencing the intermittent stuttering/buffering problems is PCI based, power management is stated as currently not being implemented through PCI and power management is offloaded to either ACPI or udev rules. A quick check to see if (ACPI) power management is the source of your stuttering/buffering problems, boot with acpi=off. If acpi=off solves/works around the problem, the likely next step is to create a Udev rule for disabling power management on the problem PCI device by creating an initial Udev rule disabling power management for that specific device, prior to the PCI auto power management rule. (eg. Udev rules listed in hierarchy format.)
For finding PCI vendor:device:
# lspci -nn
file: /etc/udev/rules.d/pci_pm.rules
# blacklist for pci runtime power managementSUBSYSTEM=="pci", ATTR{vendor}=="0x1234", ATTR{device}=="0x1234", ATTR{power/control}="on", GOTO="pci_pm_end"SUBSYSTEM=="pci", ATTR{power/control}="auto"LABEL="pci_pm_end"
DISABLE TICKLESS CPU MODE
One reason I may not have seen this stuttering problem with other distributions, I compiled my own kernel with only needed kernel features and drivers.
# cat /proc/config.gz |gzip -d |grep NO_HZ
Add nohz=off to Linux kernel command-line options, disabling dyntick-idle or tickless CPU mode.
X/XORG DPMS
file:/etc/X11/xorg.conf
Check BlankTime, StandbyTime, SuspendTime, OffTime are all sane values. Somehow mine were set to "0", likely causing my stuttering! Another measure to check for a stutter issue being power management related, disable X/Xorg power management using, Option "NoPM" "True".
Sheesh!!!
My hardware:
Intel Core i7-3770K 8x3.5Ghz (3rd Generation)nVidia GTX 67032GB DDR RAM
As with my previous post, check to make sure there are no conflicting power saving functions, such as:
/etc/X11/xorg.confCheck BlankTime, StandbyTime, SuspendTime, OffTime are all sane values. Somehow mine were set to all "0"/zeros.
My nVidia GPU was also set to adaptive by default, and I presumed would be little problems with stuttering. Regardless, I've switched back to maximum performance, and hope power saving falls back on ACPI.
$ nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1"
An update here on 2022.09.27, I've finally switched from using the nVidia proprietary driver to nouveau. Using multiple displays/monitors here, so is no easy task within a productive environment using DWM desktop. Once switched, I noticed most of my VIM stuttering significantly reduced. Buffer underruns using aplay on PCM WAV files are likely mitigated.
ALSA aplay under runs were further mitigated here by testing bypassing dmix default 48kHz mixing:
$ aplay -D plughw:0 music.wav
I now finally see no further under runs, so seems the following line required augmentation:
$HOME/.asoundrc
"defaults.pcm.rate_converter "samplerate_best"
to either of the following less than best settings:
# - samplerate_best Use SRC_SINC_BEST_QUALITY
# - samplerate_medium Use SRC_SINC_MEDIUM_QUALITY
# - samplerate Use SRC_SINC_FASTEST
# - samplerate_order Use SRC_ZERO_ORDER_HOLD
# - samplerate_linear Use SRC_LINEAR
Might also want to experiment with kernel cmdline mitigations=off. (eg mitigations=auto, mitigations=on, mitigations=off) Meltdown Wikipedia tells of as recent/new as eight generation CPU's encumbering significant anomalies! This solves almost all of my aplay buffer underruns and likely all VIM cursor stuttering.
Bottom line here, likely nVidia proprietary driver causing problems, with either setting performance to maximum and hoping for the best and am seeing better results using nouveau driver. Secondary to these problems was likely my $HOME/.asoundrc file with an overly aggressive real time sample rate conversion.
Think I've completely solved my Void Linux operating system stuttering.
Either replacing my nVidia graphics/video PCI-E card with an Intel Arc A750 solved this, or using the following:
/etc/modprobe.d/alsa.conf
options snd-hda-codec-hdmi enable_silent_stream=0
I was using X/Xorg and now using sway/wayland, seems sway/wayland was loosing audio on HDMI video playback immediately subsequently switching virtual desktops. As to whether this was also the cause of the ALSA aplay stuttering, or other kernel upgrades, I do not know but my operating system stuttering is now apparently completely gone. I doubt this had anything to do with X/Xorg or Wayland, as the stuttering with aplay occurred even within the virtual terminals.
Gnome?
Cinnamon on xorg.
linux5.16_20, tried older versions but same issue.
perhaps it is your mouse polling rate
Started getting stuttering issues after the 510.68.0 NVIDIA update.
Got this error linked here and tried reinstalling and xbps-reconfiigure to no avail.
But I'm not sure if it's relevant because the gpu largely works okay (can game, use blender etc.)
Not exactly sure what logs to check for this. Here's my xorg.0.log
Installed socklog but it showed nothing.
Edit:
There is this error
"[ 2804.169] (EE) event22 - SEMITEK USB-HID Gaming Keyboard: client bug: event processing lagging behind by 22ms, your system is too slow"
and searching for the error online, they basically had the similar issues as me and said to update the NVIDIA drivers, which sucks because I'm on the latest drivers. Hope there's another workaround.
I have not used OBS in this way, but what you are doing is like infinitely repeating reflections between two mirrors. Each reflection has to be updated constantly. This has to require unbelievably intensive cpu/gpu usage. My only surprise would be that it did NOT stutter previously. I would assume that this does not happen without active nested screenshot streaming.
I only used obs in this way to quickly demonstrate this problem. It happens pretty much anywhere.
Also might as well post my pc specs just in case.
I see. I am curious, and not sure from your example. If OBS is not running at all (even minimized), does it still happen?
have you tried rolling back your nvidia driver? If you don't clean your cache, there is always an array of older packages that were once downloaded under /var/cache/xbps.
you can instal an older version from there using xdowngrade, a script from xtools package
[deleted]