Pulseaudio fails to detect sound card, while timidity is installed

Bug #1793640 reported by Walter Garcia-Fontes
290
This bug affects 72 people
Affects Status Importance Assigned to Milestone
timidity (Debian)
Fix Released
Unknown
timidity (Ubuntu)
Triaged
High
Unassigned

Bug Description

After upgrading to the 18.10 development version from 18.04 only "Dummy sound" is shown. The speakers are not recognized, but plugging headphones works. The system was working well in 18.04.

With:

sudo alsa force-reload

the speakers start to be shown in the sound system parameters and sound is reproduced through the speakers normally.

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: pulseaudio 1:12.2-0ubuntu3
ProcVersionSignature: Ubuntu 4.15.0-34.37-generic 4.15.18
Uname: Linux 4.15.0-34-generic x86_64
ApportVersion: 2.20.10-0ubuntu11
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-id', '/dev/snd/pcmC1D1p', '/dev/snd/pcmC1D0c', '/dev/snd/pcmC1D0p', '/dev/snd/controlC1', '/dev/snd/by-path', '/dev/snd/hwC0D2', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D10p', '/dev/snd/pcmC0D9p', '/dev/snd/pcmC0D8p', '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/controlC0', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CurrentDesktop: Unity:Unity7:ubuntu
Date: Fri Sep 21 07:18:03 2018
InstallationDate: Installed on 2018-04-09 (164 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180408)
SourcePackage: pulseaudio
Symptom: audio
Symptom_Card: HDA-Intel - HDA Intel PCH
Symptom_Jack: Speaker, Internal
Title: [XPS 13 9370, Realtek ALC3271, Speaker, Internal] Pulseaudio fails to detect card
UpgradeStatus: Upgraded to cosmic on 2018-09-18 (2 days ago)
dmi.bios.date: 08/09/2018
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.5.1
dmi.board.name: 0F6P3V
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.5.1:bd08/09/2018:svnDellInc.:pnXPS139370:pvr:rvnDellInc.:rn0F6P3V:rvrA00:cvnDellInc.:ct10:cvr:
dmi.product.family: XPS
dmi.product.name: XPS 13 9370
dmi.sys.vendor: Dell Inc.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :
tags: added: regression-update
Steve Langasek (vorlon)
tags: removed: regression-update
Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote : Re: [XPS 13 9370, Intel Corporation Sunrise Point-LP HD Audio (rev 21), Speaker, Internal] Pulseaudio fails to detect card

I've changed the title because according to lspci the audio device is actually Intel Corporation Sunrise Point-LP HD Audio (rev 21)

summary: - [XPS 13 9370, Realtek ALC3271, Speaker, Internal] Pulseaudio fails to
- detect card
+ [XPS 13 9370, Intel Corporation Sunrise Point-LP HD Audio (rev 21),
+ Speaker, Internal] Pulseaudio fails to detect card
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Can you please run this command:

  dpkg -l > dpkgl.txt

and send us the resulting file?

Changed in alsa-driver (Ubuntu):
status: Confirmed → Incomplete
Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

Result of:
dpkg -l > dpkgl.txt

Changed in alsa-driver (Ubuntu):
status: Incomplete → Confirmed
Changed in pulseaudio (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks! The problem is:

ii timidity-daemon 2.14.0-8 all runs TiMidity++ as a system-wide MIDI sequencer

which makes this a duplicate of bug 210472.

Please just uninstall timidity and timidity-daemon.

summary: - [XPS 13 9370, Intel Corporation Sunrise Point-LP HD Audio (rev 21),
- Speaker, Internal] Pulseaudio fails to detect card
+ Pulseaudio fails to detect sound card, while timidity is installed
affects: pulseaudio (Ubuntu) → timidity (Ubuntu)
no longer affects: alsa-driver (Ubuntu)
Revision history for this message
Dennis Shimer (dshimer) wrote :

Same thing on a Lenovo L520 with Intel chipset, attaching some info just in case it helps.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I still have this problem in Ubuntu 19.04 develpment version. Here is a Debian bug about this:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901931

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It doesn't appear Timidity is being maintained upstream anymore. If you can, please just uninstall it.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I do use it, to play midi files and to convert them to other formats. But if it is an abandoned project, I will have to look for alternatives.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

Daniel, why do you say it is unmaintained? I see an active Debian maintainer:

https://tracker.debian.org/pkg/timidity

and in Sourceforge there is a new upstream version from October 2018.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, maybe just not with many releases or much active development. The latest version was released August 2018 and the latest commit was October 2018:

  https://sourceforge.net/p/timidity/git/ci/master/tree/

I was also thrown by the latest news item on the main project page being dated 2004 :)

  http://timidity.sourceforge.net/

But that may not mean anything... A mature project like Timidity might not _need_ any regular changes or releases.

My main concern with respect to this bug is that I can't find any way to report bugs upstream, other than these:

  https://sourceforge.net/projects/timidity/support

Revision history for this message
Lastique (andysem) wrote :

From the discussion in bug 210472 and in the Debian bug, it looks more like a configuration or intergration issue in timidity packages rather than a genuine upstream bug.

Also, forums and mailing lists are a way to report bugs, too. Even though not as convenient as bug trackers.

Changed in timidity (Debian):
status: Unknown → Fix Released
Changed in timidity (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Adrian Mariano (avm4) wrote :

Does "fix release" mean this bug has been fixed?

Revision history for this message
Alex Garel (alex-garel) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think that "Fix Released" status is misleading. Even the Debian bug mentions the problem is in 2.14.0-8 and that's the latest version in Ubuntu and Debian.

It looks like the Debian bug was closed prematurely without a fix being released. I was going to unlink it here but maybe not... Let's just be aware there was no "Fix Released".

Revision history for this message
Lastique (andysem) wrote :

Can the Debian bug be reopened? Otherwise, I'm afraid, we'll never see it fixed.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Try the user/group fix mentioned there first:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901931

If that works then we know what kind of fix to propose to Ubuntu or Debian.

If that doesn't work then please email <email address hidden> pointing out it is not fixed and to reopen the bug.

Revision history for this message
Lastique (andysem) wrote :

A user in that bug already verified that it works. What I'm pointing out is that the user/group fix is not implemented in the Debian or Ubuntu package, and as long as that bug is closed it's not likely become implemented.

Revision history for this message
Lastique (andysem) wrote :

I have tested on Kubuntu 19.04:

1. After installing timidity-daemon, the timidity user is automatically created and added to the audio group. After reboot, the primary audio output device is inaccessible in PulseAudio.
2. After removing timidity user from audio group and rebooting, PulseAudio is able to use all audio output devices, as expected. I don't know how to test whether timidity works.
3. Purging timidity-daemon and timidity packages does *not* remove the timidity user. So, if the packages were installed before, after purging the user stays in the system and in the audio group. You have to manually remove the user (either completely or just from the audio group) using deluser. I think, that the user stays in the system may be a bug on its own.

Revision history for this message
Lastique (andysem) wrote :

Sending email to <email address hidden> bounces because the bug is archived and cannot be modified.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I confirm that timidity works after removing the timidity user. So instead of removing timidity all together, another workaround for this bug is to remove the timidity user and make sure the audio group is empty.

Revision history for this message
Adrian Mariano (avm4) wrote :

I removed timidity (without even purging) and my sound satarted working normally, even though my audio group still contains two users: pulse and timidity. This group is supposed to be empty?

I reinstalled timidity and timidity-daemon and the problem returned. I removed timidity from the audio group and rebooted and the problem was again fixed. The timidity program works. (I don't know what the daemon does.)

Revision history for this message
Alex Garel (alex-garel) wrote :

I have unarchived / reopened and commented debian bug.

Changed in timidity (Debian):
status: Fix Released → New
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

I upgraded from 18.04 to focal and had the same problem. Purging timidity got audio back for me as well.

tags: added: champagne focal
Revision history for this message
JPT (j-p-t) wrote :

In case this helps anybody:
I solved the MIDI issue by installing fluidsynth instead of timidity according to this guide:
https://blog.geierb.de/debian-fluidsynth-als-systemd-service/

What's missing though is the connection of fluidsynth server to pulsaudio DISPLAY.
you have to add DISPLAY=:0 to etc/default/fluidsynth

this was done on Kubuntu LTS 18.4

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

Started happening to me on upgrade from 18.04 LTS to 19.10.

KDE shows only "dummy" device, until

# sudo apt remove timidity-daemon
# pulseaudio -k && sudo alsa force-reload

and suddenly audio is back. I still have timidity itself installed

Revision history for this message
Ⅿⅰⅽhaeⅼ Ⅼutỵnskⅰ (eternal-cheesecake) wrote :

Hit this issue when upgrading from Kubuntu 18.04 to 20.04.

Solution was to "sudo apt purge timidity timidity-daemon" and the audio devices immediately were recognized by the system, didn't need to reboot.

This happened on a bog-standard 2015 era Intel-based laptop, nothing exotic.

Revision history for this message
Stefan Bader (smb) wrote :

On 20.04 at least it seems sufficient to only purge timidity-daemon and still timidity could be used to play midi files.

Revision history for this message
h1bymask (h1bymask) wrote :

Managed to make TiMidity++ work together with PulseAudio just fine on Focal 20.04.1. The idea is just to start both pulseaudio and timidity under the same user. One-liner for the current desktop user:

sudo sed -E "s,^(SERVER_NAME)=(.*)$,\1=$(id --user --name $USER) #\2," -E "s,^(SERVER_GROUP)=(.*)$,\1=$(id --group --name $USER) #\2," -i /etc/default/timidity && sudo sed -E "s,^(\s*chown) timidity (/var/run/timidity)$,\1 "$SERVER_USER" \2," -i /etc/init.d/timidity && sudo systemctl daemon-reload && sudo systemctl stop timidity && sudo killall timidity; sudo systemctl start timidity && ps -o pid=,state=,command= -C timidity; systemctl status timidity; sudo systemctl restart pulseaudio; pacmd list-cards

One can replace $USER with any user name given PulseAudio starts under the same user as well, the user is a member of the respective groups, and it has sufficient permissions for both daemons.

Revision history for this message
h1bymask (h1bymask) wrote :

TL;DR: It is enough to update the config of the timidity daemon instead of purging the timidity-daemon package in order to make pulseaudio work together with timidity daemon.

Revision history for this message
Ariel Faigon (ariel.faigon) wrote :

@h1bymask

Seems cleaner to share the audio group between the two daemon processes rather than trying to merge the two separate uids.

/etc/group already seems to do this (on 18.04):

    $ grep audio /etc/group
    audio:x:29:pulse,timidity

Given that the devices under /dev/snd/ are all read-write by group audio.

Revision history for this message
J.G. (j.gorski) wrote :

sudo setfacl -m u:user:rw /dev/snd/*

solved the problem as solution found on https://www.toolbox.com/tech/operating-systems/question/no-sound-at-all-in-lubuntu-1404-103114/ and somewhere on Ask ubuntu

Changed in timidity (Debian):
status: New → Fix Released
Revision history for this message
Joshua Richards (0x6a7232) wrote (last edit ):

This is still a thing. As mentioned here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901931#58 you just need to remove timidity from the audio group -- go to your /etc/group file and find the line
audio:
and remove timidity. Save & restart.

Submitted new bug report to Debian. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065754
To add anything (correct fix?) send an email to <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.