Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Sep 2023 14:50:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 274047] audio/alsa-plugins: large number of underruns and CPU usage with games/veloren-weekly
Message-ID:  <bug-274047-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274047

            Bug ID: 274047
           Summary: audio/alsa-plugins: large number of underruns and CPU
                    usage with games/veloren-weekly
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: scf@FreeBSD.org
                CC: games@FreeBSD.org, jbeich@FreeBSD.org
                CC: games@FreeBSD.org, jbeich@FreeBSD.org

I am uncertain which is at fault (or both), but I noticed that Veloren runs=
 at
a high CPU with many ALSA underruns.  It also caused visual and auditory
stuttering.

The CPU can be observed by running Veloren in a single world game then
suspending it by opening the menu to remove game activities.  On my system,=
 the
CPU usage hovers around 70%.

The process will output many of these messages:

    ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred

The underruns can be verified via /dev/sndstat with hw.snd.verbose=3D2.

To reduce the CPU usage to below 10% (on my system again) and greatly reduce
the underruns, I decreased the value of ALSA_OSS_BUFSZ_MAX in
audio/alsa-plugins/files/patch-oss_pcm__oss.c from 131072 to 16384.  32768
appeared to be the maximum value that could be used without underruns.

I am not sure if this is the best decision or not, but it fixed Veloren for=
 me.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274047-7788>