How can I fix having to type alsa force-reload after each startup?
Solution 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.
Solution 2
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
Solution 3
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.
Solution 4
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.
Related videos on Youtube
cat
Updated on September 18, 2022Comments
-
cat over 1 year
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?-
WinEunuuchs2Unix almost 6 yearsThis 2 y/o question has no accepted answer. Does the problem persist?
-
cat almost 6 years@WinEunuuchs2Unix None of the current answers were the solution, I'll write an answer and accept it though.
-
-
cat about 8 yearsI 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.
-
Tom Watson about 8 yearsI 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"
-
rjb-dev about 5 yearsI have the problem in 18.04. Short of downgrading, I can't find an answer that works. :(
-
Kurankat about 4 yearsThanks 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.
-
Denys Zotov about 4 yearsOf course, but I think this answer can help to other users which haven't yet
-
cat over 3 yearsWhat if I like timidity? Is the bug reported against timidity?