I recently bought a new hard disc for my old laptop and installed ubuntu on that new hard disc. When running ubuntu from the new hard disc, I experience some issues with realtime audio that I didn't experience on the same hardware on the previous install. Specifically, after about a minute, I have regular xruns every approximately 3.030 seconds. Given that I have another installation on a different hard drive that runs flawlessly, I am sure that this is not a limitation of my hard ware but rather an issue with software/configuration. However, I am a little lost for where else to look for differences.
I have connected a controller (Novation Launchpad Mini MK3) that I use to interact with Bitwig Studio 3.1.3. Sometimes (but not reliably), it is possible to get almost no xruns if I avoid hitting any keys on the controller. However, this is not reliable and if I stop hitting keys on the controller, the regular cracking of the xruns continues for another approximately 30 seconds (about 10 cracks).
Running with lower cpu frequency (e.g. on battery power) makes things much worse.
Neither of these behaviours happens on the old system.
Soundcards are listed as
$ lspci | grep Audio
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
I verified that the following are the same on both systems:
- /usr/share/alsa/
and contents
- /usr/share/alsa-base/
and contents
- /usr/share/jackd/
and contents
- /usr/share/pulseaudio/
and contents
There is no local alsa config in my home directory on either of the two systems.
I am using QJackCtl to start jack (and monitor xruns). My settings are
- Sample Rate: 44100
- Frames/Period: 256
- Periods/Buffer: 2
I ticked "realtime" on both systems, however, the old system runs with default priority, which results in the following .jackdrc
:
/usr/bin/jackd -dalsa -dhw:PCH -r44100 -p256 -n2
With these settings, I have many xruns on the new system, so I have tried increasing priority up to 80 (my current limit in /etc/security/limits.conf
) resulting in the following .jackdrc
:
/usr/bin/jackd -P80 -dalsa -dhw:PCH -r44100 -p256 -n2
I played around with these settings on the new system, going up to 2048 Frames/Period and 192k Sample rate but the problem persists and xruns still come very regularly every 3.030 seconds.
Notably, the old system used a generic kernel:
$ uname -a
Linux riemann 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
while the new system uses a lowlatency kernel:
$ uname -a
Linux laplace 5.3.0-40-lowlatency #32~18.04.1-Ubuntu SMP PREEMPT Mon Feb 3 14:53:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
I note that these are different. When I downgrade the new system to the 4.15.0-50-generic kernel, it doesn't find most of the (inbuild) hardware, wifi-adapter, soundcard, ... Given that the 4.15 kernel is no longer supported with updates by the kernel team, I am not eager to downgrade or resolve the driver issues manually.
I'm quite puzzled and don't know where else to look. I feel that the very regular interval between successive xruns might contain some information, but I can't seem to see what it would tell me.
EDIT: I finally resolved the issue by switching to lubuntu. The lower overhead (and probably less background processes) seems to solve the issue.