You are not logged in.

#1 2018-05-08 21:31:37

sirplatypus
Member
Registered: 2017-09-17
Posts: 13

USB Speaker not Being Loaded Properly

So, at first I thought the problem was with pulseaudio, but now I'm not sure.  I have an iHome iBN27 bluetooth speaker that charges using a microusb cord.  The speaker will usually work just by plugging in the charging cable to the desktop, technically leaving the speaker switched off.  I updated one day, and this no longer works.

I cannot find anything useful on the web.  Blacklisting snd-hda-intel does not work, nor does it succeed in actually blacklisting the module.  I have no alsa-base.conf.  Pulseaudio claims that it failed to find a working profile.  When using alsactl restore it only says that it initializes the card with the generic driver.  Both snd-hda-intel and snd-usb-audio are loaded, and the card is properly detected by the system.  It is listed in /proc/asound/cards, but it is not listed by lsusb or by aplay -l.  I can see it in alsamixer, and the only channel is labelled PCM.  Alsa used to complain about error 99, but that went away after I did something (I don't remember what it was).

Does anyone know what might be causing this problem?  It would seem that fixing sound is painful enough to earn a place up there with networking.....


Learning Dvorak was entirely worth it, solely because of the looks on people’s faces when they borrow my computers.

Offline

#2 2018-05-10 19:02:19

langeslag
Member
Registered: 2018-05-10
Posts: 4

Re: USB Speaker not Being Loaded Properly

Same issue here, same timeline. About the time `alsa-lib` etc. were updated to version 1.1.6.1, I would say. But let me spell out the issue in a bit more detail in hopes someone can identify what's wrong.

I run Archlinux with Pulseaudio on top of ALSA. Some weeks ago, my USB speakers (Audioengine HD3) stopped showing up as a card or sink in Pulseaudio (`pactl list cards`, `pactl list sinks`) or as a device in ALSA (`aplay -l`), and they're not in `lsusb` but they still show up as a card  in `/proc/asound/cards` and I can see them in `alsamixer` with just a single PCM channel. They work when plugged into an old Ubuntu machine.

The speakers are properly plugged in. When I switch them on, `dmesg` recognizes the device:

[   62.643390] usb 5-4: new full-speed USB device number 5 using xhci_hcd
[   62.790228] usb 5-4: New USB device found, idVendor=0a12, idProduct=1243
[   62.790235] usb 5-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   62.790240] usb 5-4: Product: Audioengine HD3
[   62.790244] usb 5-4: Manufacturer: Audioengine
[   62.790248] usb 5-4: SerialNumber: AE00000000000000

And the device is listed in `/proc/asound/cards` as noted. `journalctl`, however, warns that Pulseaudio fails to initialize it:

E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="3" name="usb-Audioengine_Audioengine_HD3_AE2015002160" card_name="alsa_card.usb-Audioengine_HD3_AE20150021600001-00" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.

Sometimes it precedes this error message with an ALSA-related one:

systemd-udevd[25861]: Process '/usr/bin/alsactl restore 3' failed with exit code 99.

When I run `alsactl restore 3` manually, it throws the following:

alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists
alsactl: load_state:1683: Cannot open /var/lib/alsa/asound.state for reading: File exists
alsactl: sysfs_init:48: sysfs path '/sys' is invalid

Found hardware: "USB-Audio" "USB Mixer" "USB0a12:1243" "" ""
Hardware is initialized using a generic method

Does the lock error signal a file permissions issue? I've set up an ACL for this file just in case, which makes no difference; if I run the command as root though there is no output at all. The hardware here listed is not the device I am looking for, and the file exists error occurs whether or not I have just deleted `asound.state`.

When I run `alsactl init`, it too gives me the `sysfs` error:

alsactl: sysfs_init:48: sysfs path '/sys' is invalid

Found hardware: "HDA-Intel" "Conexant CX8200" "HDA:14f12008,17aa224f,00100103 HDA:8086280b,80860101,00100000" "0x17aa" "0x224f"
Hardware is initialized using a generic method

That's not the hardware I wanted, either. Deleting `/var/lib/alsa/asound.state` and rebooting does not resolve the issue.

Rolling back `alsa-lib`, `alsa-utils`, and `alsa-plugins` to the previous versions, then deleting `/var/lib/alsa/asound.state` and `~/.config/pulse/` and rebooting does not resolve the issue.

When I run

rm /var/lib/alsa/asound.state
alsactl store
alsactl restore

(with write permissions to `/var/lib/alsa/asound.state`) it now identifies the correct number of devices (I also have a feeling that it was only at this stage that alsamixer began showing the device again), but it still complains that `sysfs path '/sys' is invalid`, the device does not show up in `aplay -l` or Pulseaudio, and accordingly there is no sound.

The most relevant discussion of this issue I've found is here, but it doesn't solve it for me.

Offline

#3 2018-05-10 19:54:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,705

Re: USB Speaker not Being Loaded Properly

Have you tried ruling out a kernel regression? Use linux-lts as a test.

Offline

#4 2018-05-10 20:40:34

sirplatypus
Member
Registered: 2017-09-17
Posts: 13

Re: USB Speaker not Being Loaded Properly

Thank you for clarifying the issue.  That is exactly identical to my problem, although I think mine started more recently, say a week or two.  (My sense of time may just be skewed, I've had exams and such to deal with).  I have tried all of the same solutions, and nothing has worked.  I will try an lts kernel just in case.


Learning Dvorak was entirely worth it, solely because of the looks on people’s faces when they borrow my computers.

Offline

#5 2018-05-10 20:49:07

sirplatypus
Member
Registered: 2017-09-17
Posts: 13

Re: USB Speaker not Being Loaded Properly

Worked with the lts kernel.


Learning Dvorak was entirely worth it, solely because of the looks on people’s faces when they borrow my computers.

Offline

#6 2018-05-11 05:43:12

langeslag
Member
Registered: 2018-05-10
Posts: 4

Re: USB Speaker not Being Loaded Properly

Confirmed: rolling back the kernel resolves the issue for me as well.

Offline

#7 2018-05-11 06:58:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,705

Re: USB Speaker not Being Loaded Properly

Now comes the hard part, if you actively want to see this resolved, you will want to look into bisecting your kernel it would likely be best if you used some newer kernel as the "good" base. Like a 4.15 or if you know that an earlier 4.16 kernel didn't have the issue that would be good, the smaller the timeframe the quicker you'll be able to drill down to a failing commit.

Offline

#8 2018-05-11 07:03:39

langeslag
Member
Registered: 2018-05-10
Posts: 4

Re: USB Speaker not Being Loaded Properly

Thanks, that is helpful. I don't know when I'll have the time to look into this further though.

Offline

#9 2018-05-11 07:05:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,705

Re: USB Speaker not Being Loaded Properly

If you have USB autosuspend enabled you might also simply run into https://bbs.archlinux.org/viewtopic.php?id=236536 which already had some investigations done

Offline

#10 2018-05-11 11:38:05

sirplatypus
Member
Registered: 2017-09-17
Posts: 13

Re: USB Speaker not Being Loaded Properly

All right, I will give it a shot. It may be a week or two before I can get to it. Thank you for your help, I probably would have spent a good extra ten hours chasing my tail with pulseaudio over this.... tongue


Learning Dvorak was entirely worth it, solely because of the looks on people’s faces when they borrow my computers.

Offline

#11 2018-09-10 16:01:22

langeslag
Member
Registered: 2018-05-10
Posts: 4

Re: USB Speaker not Being Loaded Properly

I've finally dared upgrade my kernel again, straight from 4.15.9-1, which predates this issue, to 4.18.6, and the matter seems resolved. If OP agrees, he may want to mark the issue as such.

Offline

Board footer

Powered by FluxBB