Apps running on Xorg stutter or hiccup (but running glxgears stops it!)

willbprog127

Member

Reaction score: 21
Messages: 82

Greetings everyone!

Here's an interesting one... When I run any apps on Xorg, at seemingly random times they stutter or 'hiccup'. This is both with the graphic display and sound (Caja, terminal, Firefox, mpv, etc). Here's the interesting part -- if I run glxgears in a tiny window in the corner of my display, the stuttering or hiccuping vanishes. :-/ ( glxgears does not appear to be in Packages, so I had to hunt it down and compile it after some updating to the older build settings.). I tried this glxgears test because I saw a similar hiccup issue when running OpenIndiana on another machine (with different graphics card) and glxgears stopped it there, too.

I did a non-scientific comparison, playing a YouTube video in Firefox with, and without, glxgears running. Every time I played the video without glxgears running, the video would stutter or hiccup, but when glxgears was running, there were zero issues.

Does anyone have a clue what could be causing this? It almost sounds like some sort of power-savings or CPU frequency stepping, but I haven't enabled any of that explicitly.

Thanks! :)

Here's my info:
- - -
* FreeBSD 12.2-p1 amd64
* AMD Ryzen 5 3600 6-Core Processor
* NVIDIA GeForce 1650 Super
* All binary packages -- nothing from Ports
* Stock kernel

Here's my /boot/loader.conf:
Code:
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
opensolaris_load="YES"
zfs_load="YES"
nvidia-modeset_load="YES"
vboxdrv_load="YES"


Here's the contents of my /etc/rc.conf:
Code:
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="freebsd"
...
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
zfs_enable="YES"
vboxnet_enable="YES"
devfs_system_ruleset="system"
dbus_enable="YES"
 
OP
willbprog127

willbprog127

Member

Reaction score: 21
Messages: 82

just curious: about:config -> layers.acceleration.force-enabled set to true?
Hi Snurg,

This is on Firefox, but also mpv, Caja, terminal, etc. Anything that has a UI is affected by this. To answer your question, though, layers.acceleration.force-enabled is set to false on Firefox.

Thanks! 👍
 

Snurg

Aspiring Daemon

Reaction score: 343
Messages: 821

My personal observation is, enabling+activating acceleration seems also to activate some vsync synchronization/buffer switching, as I observed similar things in the past.
So running 'accelerated graphics' programs seems to affect some other programs too, like Firefox I have no idea why.

Did setting the config value to 'true' (i.e. activating acceleration) improve things?
 

kpedersen

Daemon

Reaction score: 1,262
Messages: 2,189

It could potentially be the CPU freq scaling that is being bumped up so there is less of a delay for other programs. I actually seem to experience similar.

# powerd -v

Should tell you your current frequency and my guess is that glxgears increases it considerably. This could be because it is using LLVMpipe (software rendering) or even the fact that glxgears is still very CPU bound because it uses immediate mode OpenGL rather than retaining the data in vertex buffer objects.
 
OP
willbprog127

willbprog127

Member

Reaction score: 21
Messages: 82

It could potentially be the CPU freq scaling that is being bumped up so there is less of a delay for other programs. I actually seem to experience similar.

# powerd -v

Should tell you your current frequency and my guess is that glxgears increases it considerably. This could be because it is using LLVMpipe (software rendering) or even the fact that glxgears is still very CPU bound because it uses immediate mode OpenGL rather than retaining the data in vertex buffer objects.
Thanks for that! I will play around with this and maybe bump it up to hiadaptive or max. :)
 
Top