6

A while ago, I made some large update to my 15.10 that caused the sound to not work, such as in the question: No sound after startup, have to alsa force-reload.

The accepted answer links to this page, which recommends typing sudo alsa force-reload and rebooting.

The issue is that I have to type that command at every boot, sometimes multiple times, in order to get sound. I've tried the other recommendations on that page, but to no avail.

Short of a cron job (because it's not ideal to automate), can I fix this issue once and for all?

2
  • This 2 y/o question has no accepted answer. Does the problem persist? Jul 8 '18 at 14:54
  • @WinEunuuchs2Unix None of the current answers were the solution, I'll write an answer and accept it though.
    – cat
    Jul 10 '18 at 16:06
3

If this problem occurs after upgrading from Ubuntu 18.04 to 20.04, it's not a problem in alsa itself but in the timidity converter.

Disable timidity and you won't even need to force reboot alsa on startup

systemctl disable timidity
1
  • What if I like timidity? Is the bug reported against timidity?
    – cat
    Feb 11 at 22:41
2

I am using Ubuntu 16.04 and try connect SOYTO SY733MV Black/Blue (USB-Headphones),

$ lsusb - show next:

...    
Bus 003 Device 007: ID 8086:0808 Intel Corp. 
...

and in /var/log/kern.log show next error [snd-usb-audio: probe of 3-2:1.0 failed with error -16] :

[34545.631107] usb 3-3: Product: USB 2.0 Hub
[34545.632062] hub 3-3:1.0: USB hub found
[34545.632156] hub 3-3:1.0: 4 ports detected
[34545.889431] snd-usb-audio 3-2:1.0: cannot find the slot for index 0 (range 0-0), error: -16
[34545.889437] usb 3-2: cannot create card instance 0
[34545.889443] snd-usb-audio: probe of 3-2:1.0 failed with error -16  

I fixed error above performed next action:

1) updated alsa-base.conf

$ sudo nano/etc/modprobe.d/alsa-base.conf

options snd_usb_audio index=auto
options snd_hda_intel index=2,3

2) unplugged USB headphones and execute next:

$ sudo alsa force-reload  

After plugging USB headphones show next log:

$ dmesg

[ 6366.029686] usb 3-3.2: new full-speed USB device number 19 using xhci_hcd
[ 6366.120030] usb 3-3.2: New USB device found, idVendor=8086, idProduct=0808
[ 6366.120038] usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6366.120043] usb 3-3.2: Product: USB PnP Sound Device
[ 6366.120047] usb 3-3.2: Manufacturer: C-Media Electronics Inc.      
[ 6366.130665] input: C-Media Electronics Inc.       USB PnP Sound Device as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.2/3-3.2:1.3/0003:8086:0808.0012/input/input33
[ 6366.186230] hid-generic 0003:8086:0808.0012: input,hidraw0: USB HID v1.00 Device [C-Media Electronics Inc.       USB PnP Sound Device] on usb-0000:00:14.0-3.2/input3

in Control::Input device

new device: USB Pnp Sound device

3) set next in updated alsa-base.conf

$ sudo nano/etc/modprobe.d/alsa-base.conf

options snd_usb_audio index=1
options snd_hda_intel index=auto

reboot system.

2
  • Thanks for a very detailed answer, but did you notice the date of the original question? It's likely the user worked it out some time in the last 4 years.
    – Kurankat
    Apr 10 '20 at 23:36
  • 2
    Of course, but I think this answer can help to other users which haven't yet Apr 11 '20 at 6:42
1

I only do ubuntu 14.04. But I have found no audio out problems are about the permissions given to /dev/snd and the files there. On my systems the files have permissions for user root and group audio.

Note no world permissions so a user must belong to group audio to have permission.


ls -l /dev/snd to see permissions.

.....@xen2[2145]ls -l /dev/snd
total 0
drwxr-xr-x  2 root root       80 Mar 22 17:42 by-path
crw-rw----+ 1 root audio 116,  2 Mar 22 17:42 controlC0
crw-rw----+ 1 root audio 116,  7 Mar 22 17:42 controlC1
crw-rw----+ 1 root audio 116,  6 Mar 22 17:42 hwC0D0
crw-rw----+ 1 root audio 116, 10 Mar 22 17:42 hwC1D0
crw-rw----+ 1 root audio 116,  4 Mar 22 17:44 pcmC0D0c
crw-rw----+ 1 root audio 116,  3 Mar 22 18:56 pcmC0D0p
crw-rw----+ 1 root audio 116,  5 Mar 22 17:42 pcmC0D2c
crw-rw----+ 1 root audio 116,  8 Mar 22 17:44 pcmC1D3p
crw-rw----+ 1 root audio 116,  9 Mar 22 17:44 pcmC1D7p
crw-rw----+ 1 root audio 116,  1 Mar 22 17:42 seq
crw-rw----+ 1 root audio 116, 33 Mar 22 17:42 timer

If your /dev/snd files have the same permissions 
grep audio /etc/group and see if you are in that group.  

I added my username to group audio with 
sudo usermod -a -G audio "myusername"
do not quote " your user name.

I use fvwm as a window manager and start gnome stuff in an xterm. Or Gnome-Terminial.

my quick test of sound
gnome-control-center sound see if the sound effect output. 
No then do it with sudo gnome-control-center sound and see if sound effects work. 
if it works for sudo or root and not for you then it is permissions.
1
  • 1
    I decided to look at file permissions of /dev/snd. Did some more research and solved my reboot loss of sound by using usermod to add myself to group audio. sudo usermod -a -G audio "myusername"
    – Tom Watson
    Mar 22 '16 at 20:35
1

This was eventually fixed by system upgrade to 16.04, and I have never seen this issue in any later version of the same Ubuntu installation through 17.10.

1
  • I have the problem in 18.04. Short of downgrading, I can't find an answer that works. :(
    – rjb-dev
    May 1 '19 at 7:00
0

Try this method:

sudo apt-get remove --purge alsa-base pulseaudio

Then,

sudo apt-get install alsa-base pulseaudio

After that,

sudo alsa force-reload

Restart, and hope it won't happen again

1
  • I mentioned that "I've tried the other recommendations on that page, but to no avail." This is one of the recommendations; it doesn't work.
    – cat
    Mar 22 '16 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.