Workaround: Ubuntu Studio +100% single core CPU usage - stop crackling / dropouts

Hi to all that might be affected by the same issues of high CPU usage and/or crackling!

I found an somehow counter-intuitive way of eliminating all crackles in a large patch (see 6. and 7. in list below).

Specs: AMD Ryzen 3700X 8-Core, GeForce RTX 2060 SUPER, 32 GB RAM

OS: Ubuntu Studio 24.04

Just like other Linux users I struggled with the single core usage of VCV under Ubuntu/Debian resulting in bad sound and crackles while high load on a single core. I am also doing visuals on the same machine what only made it worse.

A lot of things had to be tested to make the sound out of VCV flawless and here is my working combination.

  1. In BIOS/UEFI disable your onboard sound card (in case of using another one of course - using USB sound card myself). It messed up my ability to set buffer sizes below 512 in Ubuntu Studios “Audio Configuration” (read further below 8.).

  2. Use PulseAudio in VCV

  3. Follow the instructions of “cosinekitty” in this thread to patch VCV source code and recompile VCV. I tested different buffer sizes (2,4,8 and 16) and my system seems to be happy with 16. THANKS A LOT cosinekitty!

  4. Set CPUpower on all cores to “performance” in terminal with this command (given the fact you have cpupower installed). Attention! You have to do this every time after a restart unless making it permanent on your system!

cpupower frequency-set -g performance # arg -g sets all cores to performance

  1. In VCV let it use only one CPU core (Engine → Threads → 1).

  2. The GAMECHANGER for me: although telling VCV to run on a single core, start VCV from a terminal with the simple “taskset” command on TWO given cores (trying more than two ended again in crackling) and start all other needed apps and processes on different cores (YES! With the following command you can tell which process to run on which core). For inexplicable reasons I had to leave out core “0”.

taskset -c 1,2 ./Rack # or even headless with ./Rack -h

taskset -c 3,4,5 ./otherApp

  1. Go on to “Ubuntu Studio → Audio Configuration Tool” Set proper buffer and frequency, I started with default values “1024 48000” and worked my way up to “32 48000”.

  2. In VCV: set values in your Audio Module accordingly to whatever you setup in 8. (32 48000 in my case)

  3. In VCV: change “View → Frame rate → 10Hz”. I know this is bad when working on a patch but it seriously eliminates some crackles when performing live. Also, if VCV’s GUI is not needed, try to work headless (I do and I like it!) by starting VCV via terminal with ./Rack -h

  4. Optionally: disable unneeded services on your system. Here is a list of evtl. processes. Try to stop them one by one with systemctl stop Such as apache, cups, bluetooth, mysql, any filesharing like samba or nfs, apport.service (Ubuntu error reporting) or even snapd (unless you are using any snap packages/programs while performing). All these free up valuable performance juice.

I hope I can help any of you with this information. For me it was an inconvenient journey that finally is over.

Have a nice day!

6 Likes

hello, ubuntu studio user here!

valuable infos. some points i tested, but recompile and cpupower, task i didn’t. will check them and report here.

thank you. Karl

Hi there,

please do, yes! It was a real time consumer and I’d be glad to help with this post. I am highly interested in results. The patch and recompile really helped a lot, especially when working with live input (mic and bass guitar in my case), cpupower was somewhat noticable (more consistent in eliminating crackles) but starting on two threads with “taskset” was just like working on a different/better machine.

Let me know!