# Any X application seems to cause systemwide Stuttering/Hiccups



## giric (Feb 6, 2021)

I currently get a lot of system stuttering/hiccups in X applications and trying to get to the bottom of it. The stuttering lasts less than a second and only happens with X applications, console is fine. I normally just have vim, mutt, firefox/qutebrowser open when in X and my window manager is dwm started via startx. The system isn't under any real load at all. Playing videos via mpv and music via musicpd all pause when the stutter happens and is when its most notable. The stutter is never far away and I would say it's at least once a minute.

*Things I have tried *

- Disabling C6 C-State in the BIOS, I read this maybe an issue. 
- Trying various custom options in Xorg config such as Option "TearFree" "true".
- All settings seem correct and my user is in the video group etc.

*System stats*

Currently using the amdgpu module with *FREEBSD-BETA1* but this has been an issue previous to this release. I am using the drm-kmod. On ALPHA and 13-CURRENT I used drm-devel-kmod) and xf86-video-amdgpu is not installed. My graphics card is a RX 5700XT.

*Command output*

`pciconf -lvbce` : https://pastebin.com/hMdC2tfJ
`devinfo -vr` : https://pastebin.com/ZyG1F6ea
`sysctl hw.model`: hw.model: AMD Ryzen 5 3600 6-Core Processor
`dmesg` : https://pastebin.com/DG6nTSFT
`vmstat -i` : https://pastebin.com/aM8cKawk

At this point I am not really sure where to go to tracking down the issue, does anyone have any pointers on what I can try need to pinpoint the issue? I do reliase this would be classed as an unsupported version of FreeBSD but I am really just looking for more pointers on how I can go about debugging it better. Configs have been attached too. 

Any info would be great.


----------



## Mjölnir (Feb 13, 2021)

OT, bit it's easier to read when you post short files inline as [CODE]text of [FILE]loader.conf[/FILE] here[/CODE], for one-liners you can use ICODE.  Click on _Help_ @bottom to see all formatting codes (BB codes)


----------



## Snurg (Feb 13, 2021)

Turn off swap, it can cause this. (Don't forget to turn it on again... not good to run out of memory.)


----------



## delphinoob (Feb 14, 2021)

try this and let me know if it works for you 
kern.sched.preempt_thresh=200 
also try the value 224 and see if eithe works for you
it goes in /etc/sysctl.conf


----------

