Audio has split second lags, sound choppy

Hello,

When I playback music in rhythmbox there is erratic “lag” for the fraction for a second every so often. It does play, but it is not a very pleasant experience, as these “lags” disrupt the flow of the music. This is a problem I have observed before on other machines running linux. As I don’t listen to music that often, it is not a deal breaker, but it is annoying when I do listen to music nonetheless.

To be more precise: It concerns playback of files on my computer. Youtube works fine and I don’t use any music streaming services. I listen through 3,5mm sockets. I don’t use bluetooth or anything like that.

(Thanks for this awesome distro. I’ve been distro hopping a lot the last two years and I am very happy with Ubuntu Mate. It has been running for a several weeks and it is my favorite distro so far. Thank you!)

Here some Info on my computer, in case it helps:

.-/+oossssoo+/-. pilou@drongmo `:+ssssssssssssssssss+:` ------------- -+ssssssssssssssssssyyssss+- OS: Ubuntu 18.10 x86_64 .ossssssssssssssssssdMMMNysssso. Kernel: 4.18.0-13-generic /ssssssssssshdmmNNmmyNMMMMhssssss/ Uptime: 5 hours, 51 mins +ssssssssshmydMMMMMMMNddddyssssssss+ Packages: 2590 (dpkg), 14 (snap) /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Shell: bash 4.4.19 .ssssssssdMMMNhsssssssssshNMMMdssssssss. Resolution: 1920x1080, 1920x1080 +sssshhhyNMMNyssssssssssssyNMMMysssssss+ DE: MATE ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Metacity (Marco) ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM Theme: Ambiant-MATE +sssshhhyNMMNyssssssssssssyNMMMysssssss+ Theme: Ambiant-MATE [GTK2/3] .ssssssssdMMMNhsssssssssshNMMMdssssssss. Icons: Ambiant-MATE [GTK2/3] /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Terminal: tilix +sssssssssdmydMMMMMMMMddddyssssssss+ CPU: AMD FX-4100 (4) @ 3.600GHz /ssssssssssshdmNNNNmyNMMMMhssssss/ GPU: AMD ATI Radeon RX 460/560D .ossssssssssssssssssdMMMNysssso. Memory: 2185MiB / 7923MiB -+sssssssssssssssssyyyssss+- `:+ssssssssssssssssss+:` .-/+oossssoo+/-.

You should not have any lags.

With RythmBox?

I don’t use RythmBox – it has some annoying artifacts in it’s codecs. I’ve never experienced any problems with VLC as a MP3/music player. VLC is a little overkill but it works and sounds good.

With a system like yours I can listen to music or watch videos or even stream live TV while processing realtime audio with a software DSP in another app. It is probably not your system or Linux but a problem with RythmBox app.

djb

Sadly, the same effect occurs with vlc. :frowning:

I suspect it has something to do with how audio works on my system and not with the playback apps.

What are your sound devices? Post output of

cat /proc/asound/cards

What is your motherboard make and model? Post the output of

cat /sys/class/dmi/id/board_vendor /sys/class/dmi/id/board_name /sys/class/dmi/id/board_version

Are you using Jack or PulseAudio? Have you changed any PulseAudio settings?

$ cat /proc/asound/cards
 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfeb00000 irq 16
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfea60000 irq 38
$ cat /sys/class/dmi/id/board_vendor /sys/class/dmi/id/board_name /sys/class/dmi/id/board_version
ASUSTeK COMPUTER INC.
M5A97 PRO
Rev 1.xx

I’m using Pulseaudio. I can’t remember changing anything in there. Should be quite vanilla. Is there a way to check? Anyway, it’s the same with another user on the same machine. :slightly_frowning_face:

Could you be having disk drive trouble? Have you tried playing anything from an USB stick?

What is your system doing when the sound lags? Open another terminal and watch the syslog:

tail -f /var/log/syslog

Look to see if there is anything other than dhcp messages for updating your IP lease.

For example:
I have a disk with 1 offline uncorrectable sector. The bad sector is in an area of the disk that is currently unused. If I try to use that area my system will pause while the disk tries to map in a replacement for that bad sector. Note that this remapping goes on behind the scenes – Linux is not involved. The disk firmware does the remapping for you. You may not even see any error messages in syslog unless you have installed “smart” disk monitoring.

smartd[980]: Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors

I don’t know of any regressions in the 4.18 kernel of UM 18.10 that could cause sound lag. Any issues with your AMD chipset were solved in the Linux kernel years ago.

The latest BIOS version is 1604. Sometimes updating the BIOS can help.

djb

Hello,

Playing from USB didn’t alleviate. Nonetheless, I think we are getting somewhere:

I tried the thing with looking at syslog. There is a recurring pattern happening when there is a “lag”:

Jan 15 16:40:50 drongmo mate-notificati[3041]: Theme parsing error: gtk-widgets.css:3135:13: 'max-width' is not a valid property name
Jan 15 16:40:50 drongmo mate-notificati[3041]: Theme parsing error: gtk-widgets.css:3136:14: 'max-height' is not a valid property name
Jan 15 16:40:51 drongmo dbus-daemon[2026]: [session uid=1001 pid=2026] Successfully activated service 'org.freedesktop.Notifications'
Jan 15 16:41:23 drongmo kernel: [ 2009.018247] [UFW BLOCK] IN=wlx9cefd5fd7303 OUT= MAC=01:00:5e:00:00:01:84:a1:d1:3a:87:a3:08:00 SRC=192.168.1.1 DST=224.0.0.1 LEN=36 TOS=0x00 PREC=0x00 TTL=1 ID=0 DF PROTO=2 
Jan 15 16:41:27 drongmo dbus-daemon[2026]: [session uid=1001 pid=2026] Activating service name='org.freedesktop.Notifications' requested by ':1.42' (uid=1001 pid=2317 comm="/usr/lib/x86_64-linux-gnu/indicator-sound/indicato" label="unconfined")
Jan 15 16:41:28 drongmo mate-notificati[3050]: Theme parsing error: gtk-widgets.css:3135:13: 'max-width' is not a valid property name
Jan 15 16:41:28 drongmo mate-notificati[3050]: Theme parsing error: gtk-widgets.css:3136:14: 'max-height' is not a valid property name
Jan 15 16:41:28 drongmo dbus-daemon[2026]: [session uid=1001 pid=2026] Successfully activated service 'org.freedesktop.Notifications'
Jan 15 16:42:49 drongmo dbus-daemon[2026]: [session uid=1001 pid=2026] Activating service name='org.freedesktop.Notifications' requested by ':1.42' (uid=1001 pid=2317 comm="/usr/lib/x86_64-linux-gnu/indicator-sound/indicato" label="unconfined")
Jan 15 16:42:49 drongmo mate-notificati[3088]: Theme parsing error: gtk-widgets.css:3135:13: 'max-width' is not a valid property name
Jan 15 16:42:49 drongmo mate-notificati[3088]: Theme parsing error: gtk-widgets.css:3136:14: 'max-height' is not a valid property name
Jan 15 16:42:49 drongmo dbus-daemon[2026]: [session uid=1001 pid=2026] Successfully activated service 'org.freedesktop.Notifications'

I have no idea what it means, but every time I have a lag spark, those parsing errors print in syslog.

Ouch! Try switching themes.

indicator-sound has a problem:(

Do you have a notification area on one of your panels? It looks like something is trying to send you a message.

Did you install 18.04 new or as an upgrade to something else?

djb

I tried changing themes and panel layouts (in MATE Tweaks). It didn’t alleviate the problem. But I didn’t restart after changing themes. I don’t know if that could make a difference. What would be the most vanilla choice of themes if I was to try that out?

I do have the following in my panel: Brisk Menu Launcher, Window List, System Monitor, Workspace Switcher, Indicator Applet, Clock. EDIT: I also use Plank.

It’s not 18.04, it’s 18.10. And it’s a fresh install. But I had to manually partition, because I have an SSD on which my system is and an HDD which is mounted as /home.

Sorry, I forgot you said 18.10… The Ambient-MATE theme is a good choice.

According to the launchpad page for indicator-sound, there have not been many (if any) changes since 16.10.

Do you get the rythmbox or vlc controls in the indicator-sound when sound is playing?

There is another error log to look at:

journalctl -f

should show what/why systemd is starting notifications for indicator-sound. The journal log for systemd is like the syslog, run something with sound and see what gets printed.

Hopefully someone else is watching this thread will have some more ideas. I don’t know much about dbus and systemd – I wrote device drivers, kernel code, etc.

The same indicator-sound code is used with the Gnome and xfce desktops and could be used elsewhere.

djb

Hello,
please excuse the late reply. So, I checked my BIOS version, which is 12.something. So it’s the original BIOS that came with the board and I’m too anxious too try to update it.

With the indicator-sound, do you mean the applet in the panel? By default, the VLC controls show up. But there is a Rhythmbox menu entry too.

I tried the journalctl -f. It looks like this:

Jan 29 14:53:44 drongmo mate-notificati[7026]: Theme parsing error: gtk-widgets.css:3135:13: 'max-width' is not a valid property name
Jan 29 14:53:44 drongmo mate-notificati[7026]: Theme parsing error: gtk-widgets.css:3136:14: 'max-height' is not a valid property name
Jan 29 14:53:44 drongmo dbus-daemon[2231]: [session uid=1001 pid=2231] Successfully activated service 'org.freedesktop.Notifications'
Jan 29 14:54:17 drongmo dbus-daemon[2231]: [session uid=1001 pid=2231] Activating service name='org.freedesktop.Notifications' requested by ':1.44' (uid=1001 pid=2544 comm="/usr/lib/x86_64-linux-gnu/indicator-sound/indicato" label="unconfined")
Jan 29 14:54:17 drongmo mate-notificati[7038]: Theme parsing error: gtk-widgets.css:3135:13: 'max-width' is not a valid property name
Jan 29 14:54:17 drongmo mate-notificati[7038]: Theme parsing error: gtk-widgets.css:3136:14: 'max-height' is not a valid property name
Jan 29 14:54:17 drongmo dbus-daemon[2231]: [session uid=1001 pid=2231] Successfully activated service 'org.freedesktop.Notifications'
Jan 29 14:54:57 drongmo dbus-daemon[2231]: [session uid=1001 pid=2231] Activating service name='org.freedesktop.Notifications' requested by ':1.44' (uid=1001 pid=2544 comm="/usr/lib/x86_64-linux-gnu/indicator-sound/indicato" label="unconfined")
Jan 29 14:54:57 drongmo mate-notificati[7052]: Theme parsing error: gtk-widgets.css:3135:13: 'max-width' is not a valid property name
Jan 29 14:54:57 drongmo mate-notificati[7052]: Theme parsing error: gtk-widgets.css:3136:14: 'max-height' is not a valid property name
Jan 29 14:54:57 drongmo dbus-daemon[2231]: [session uid=1001 pid=2231] Successfully activated service 'org.freedesktop.Notifications'

Also, since I tried out different MATE layouts, the desktop is unstable. I had to choose a layout that is more stable from the list in Tweaks (“familiar”). Also, the “lag” has taken a different form: It now sounds like a static sound instead of just a very short break. It happens when I play games also.

I might try out a different desktop environment as the error seems to have something to do with gtk. That would be a pity since I like Ubuntu Mate quite a lot. I was going to install Ubuntu Mate with i3 desktop on my laptop, just to have the same system on both desktop and laptop, though I might try out i3 or maybe Xfce on my desktop too to see if it changes anything concerning this predicament I’m having (or maybe even LXQt, since that would circumvent GTK altogether). But I might do that in a long while, since this error isn’t a major problem for me.

Thanks a lot for your help, Dave!! I really appreciate it a lot and even if it didn’t quite solve the issue, I certainly learned a lot. :relaxed:

Hello, I just wanted to give an update on the issue.

Since my last reply, I switched to Linux Mint Mate Edition to see if it changes anything. It didn't.

I also tried other system (without installing them) and all had the same thing happening. That's why I was considering it to be a hardware problem, and I thought about changing the motherboard or cpu as soon as my budget permits (on a shoestring budget right now).

But then recently I reinstalled Linux Mint and chose Xfce this time. After running it for about tow weeks, it just hit me that the problem is gone!

I don't know why exactly, but I assume it might be a problem with Mate or GTK, as all Desktops I tried out used GTK. Why Xfce is not affected is a mystery to me, though. But then, I don't understand those things very well. Maybe Xfce's old age (hasn't changed in years) has something to do with it?

Anyhow, I think I owed an update on this issue.

Thanks again for the great help and for the great distro that Ubuntu Mate is (it is consistently amongst my recommendations for beginners in Linux and those who just want a system which keeps out of your way)!