Score:1

playing sound hangs on ubuntu (18.04 then 20.04 after upgrade)

in flag

This problem started with Ubuntu 18.04 and persists after upgrade to 20.04 (a solution I found online for similar looking problem had some people having an upgrade fix it).

The audio hangs every few seconds whether it's played on chrome browser, Ubuntu's default video player, VLC or using aplay from terminal, when using aplay when the issue happens, it shows the following error message on screen: underrun!!! (at least 1549.585 ms long) Looking for the issue in aplay.c, I found it here the error seem to be SND_PCM_STATE_XRUN (I don't know what that is or how to fix it).

I tried restarting/reinstalling pulseaudio without success. I also tried the solution suggested here without success.

Sound was working before just fine.

What can I do to either fix the issue or get more information towards fixing the problem?

Hi-Angel avatar
es flag
Perhaps, try a PipeWire to see if that works for you? There's [a PPA](https://launchpad.net/~pipewire-debian/+archive/ubuntu/pipewire-upstream) you can try *(don't try it from the Ubuntu repos, it will be ancient, especially on 20.04. Use a PPA instead)*.
Score:1
in flag

The problem seems fixed for now so I will share what I did that may have fixed it (I'll update if it turns out to be not the case):

I noticed that there was a process taking too much CPU: /sbin/modprobe nvidia-drm

I first found a workaround to stop it:

sudo systemctl stop systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket
sudo systemctl start systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket

But this is just temporary solution, what fixed for me is rolling back to an older stable version of the nvidia driver, to do so open Software & Updates then click on Additional Drivers tab.

From there I selected nvidia-driver-390, instead nvidia-driver-470.

After reboot the problem seems to be solved.

Hi-Angel avatar
es flag
So, that's interesting. Do you get any output running `lsmod | grep nvidia-drm`? If you run `modprobe nvidia-drm` manually, does it hang as well? Does killing the process work? If it does hang upon running manually, can you run a `strace modprobe nvidia-drm` and see what it's executing that takes so much CPU time?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.