Bug 265121 - system will get stuck when dragonfly DAC plugged in and being used
Summary: system will get stuck when dragonfly DAC plugged in and being used
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2022-07-09 22:34 UTC by Jonathan Vasquez
Modified: 2022-07-10 00:35 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Vasquez 2022-07-09 22:34:34 UTC
Hey all,

I'm running 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64 on a Thinkpad X260. When using a Dragonfly DAC (USB), the audio plays fine and all, but if the device happens to be plugged in and being used in any capacity by any process (Even if the music is paused), doing a suspend (zzz) will cause the system to wait for the process using the audio device to stop. However, this never happens to essentially you end up with a stuck system. I can switch ttys but since the system is in the middle of a suspend, no keyboard input is accepted. The only way out if to hard power off.


ugen0.3: <AudioQuest AudioQuest DragonFly Cobalt v1.0> at usbus0 (disconnected)
uaudio0: at uhub0, port 2, addr 2 (disconnected)

This is the message I get (loops forever):

pcm3: unregister: channel pcm3:virtual:dsp3.vp0 busy (pid 23287)
pcm3: Waiting for sound application to exit!

I think for these situations, it may be fine to have a timeout where the process gets killed. I could see how some people may think that's a dangerous operation however so I'm open to other workarounds, but I don't think it just waiting forever it acceptable.

- Jonathan
Comment 1 Jonathan Vasquez 2022-07-10 00:35:30 UTC
Some minor updates. I was able to figure out some repro steps:

1. Plug DragonFly into the machine.
2. Open up `mixertui`
3. Switch to the /dev/pcm3 device (I only have one audio device plugged in so it gets assigned pcm3. Adjust accordingly if you have other USB audio devices connected like a headset).
4. Suspend the computer (zzz, or some acpiconf -s 3).

The machine should now wait for the mixer to quit forever.

If I closed the mixer and suspend the machine, it would sleep and resume successfully.