Before I start my tirade, let me just say this:
TL;DR: Though there's no warranty along with this advice I'm about to give, I will say that I find it unlikely that you have malware installed.
For the record, PulseAudio is supposed to run with a seemingly insanely high priority -- that way, when system scheduling slows down (e.g. when the system starts swapping), your audio doesn't get choppy! (This assumption does not really hold water, BTW, since if the application playing or recording audio has a normal priority, and the application doesn't buffer with PulseAudio very much, then this is pretty much pointless...)
If there aren't other processes with low nicenesses or high priorities, go to the View menu in the System Monitor and make sure All Processes is checked. My Debian Buster system shows a great number of these high-priority "processes", and I guarantee that Ubuntu MATE has way, waaaay more of such processes than my Debian system. (Many of the "processes" listed here are actually kernel threads; my Debian system has a custom, slimmed-down kernel and thus has an unusually low number of kernel threads. On Ubuntu, you'd find other kernel threads like md
for handling RAID arrays and such, and it would have the flag of Moldova as its icon. Don't worry, that's a known bug and not ransomware, as I explained in this other curious article.)
Do these flashing lights and subsequent CPU frequency adjustments only occur if one particular application is open? Not to pick on Web browsers too much, but in particular, I've seen cases where multi-process Web browsers like Firefox and Chromium will run untold, but very quick, background jobs in one process or another. The CPU usage shown for each process is usually zero or close to zero (even when the processes are doing something in the background), but when, say, 3 processes do something at once, the result can be a fairly substantial CPU spike that can trigger CPU frequency scaling. Try closing your browser and see if the frequency spikes keep occurring; I know that Mozilla pushes very quiet updates to Firefox to us much more often than we'd like them, and sometimes a bloated and overcomplicated program is all it takes to make things look like malware. You never know.
Similarly, it might be a Web page you have open. If closing down your browser eliminates the spikes, try re-opening the browser and see if the spikes still don't come back. I've seen plenty of cases of that, too.
The rest of this post looks at things from a very pessimistic, paranoid perspective, and you should only consider heeding this advice if you are truly concerned about malware on your system.
Also, a 200+ MB browser (literally) would be a really, really good place to hide malware. You could hide untold amounts of malicious code in there and nobody would notice even if you bloated the browser by 20 MB. If the spikes go away after you close down Firefox for awhile, and you're really concerned about malware, here's my three suggestions:
-
Back up your important data, if you haven't already.
-
Back up your important data soon. Putting a backup off for a day to have your data corrupted the following day before you have made your backup is pointless. In other words, don't put it off.
-
Once you've done the above, you can try purging Firefox (if that's your browser of choice) and reinstalling it with:
sudo apt-get purge firefox
sudo apt-get install firefox
You can purge your Firefox profile too if you want ( WARNING: You will lose your Firefox preferences and probably your saved logins and passwords too!):
rm -r ~/.mozilla/firefox