Ubuntu – kazam no sound and no rectangular red border during screencast in ubuntu 20.04

kazamsound

kazam worked fine on ubuntu 19.04, recording audio and video, and showing the red rectangular border during screencast recording;

after installing ubuntu 20.04, kazam (from the repository) records video with no sound and does not show the red border as a visual cue so you know which part of screen is recorded

I looked at pavucontrol and nothing is muted, the sound is fine, it is just that kazam is not recording the sound

Also, going to File-Preferences in Kazam, in the General tab, the speaker sound is set to off. I can set it on, to max even, but there is no OK or Apply button, so as soon as I close this dialog, upon returning, the speaker sound shows again off as before. And recording with this dialog open and the sound set to max in the dialog, still has no effect, video is recorded muted.

I tried editing the

~/.config/kazam/kazam.conf 

file manually and set audio_toggled = True and restarted kazam but there was no effect

this is probably not related, but sure doesn't help, that in ubuntu 18.04, installing alsa-utils made available the really nifty and useful text-based commandline audio control/config tool

alsamixer

where you could use arrow keys to adjust the volume of the speakers, headphone etc. The alsamixer from alsa-utils in 20.04 seems to have taken all those options away and seems to have no way of visualizing or adjusting any volumes. Wish I could have the alsamixer from 18.04 that was so much more useful. Here is what alsamixer used to look like:

alsamixer

Best Answer

Probable solution to audio problem at #8, #12 of https://bugs.launchpad.net/kazam/+bug/1875530

the fix is to modify this file:

/usr/lib/python3/dist-packages/kazam/pulseaudio/pulseaudio.py

and replace

time.clock()

with

time.perf_counter()

in all 8 places