unplugging an usb headset makes Rythmbox use a lot of cpu

Hi There,

Not sure if this is a bug I found but I have a strange situation when using my usb headset on GhostBSD where I assume the problem is present in the FreeBSD system Ghost leans on.
First some additional info:
Code:
cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> (play/rec)
pcm1: <Realtek ALC1220 (Front Analog)> (play/rec)
pcm2: <Realtek ALC1220 (Rear Digital)> (play)
pcm3: <NVIDIA (0x0093) (HDMI/DP 8ch)> (play)
pcm4: <NVIDIA (0x0093) (HDMI/DP 8ch)> (play)
pcm5: <NVIDIA (0x0093) (HDMI/DP 8ch)> (play)
pcm6: <NVIDIA (0x0093) (HDMI/DP 8ch)> (play)
pcm7: <USB audio> (play/rec) default
pcm8: <USB audio> (rec)
No devices installed from userspace.

I am using pcm7 as the default for my headset. Pcm 0 is the default where some external boxes are present.


When I unplug the usb headset pcm0 does take over. So far so good.

When I unplug the headset when listening to Rythmbox than it goes bananas. It starts using a lot of cpu and I can only kill the process of rythmbox to stop it.

Dmesg output shows it waits until I kill the pid.
Code:
pcm7: unregister: channel pcm7:virtual:dsp7.vp0 busy (pid 2461)
pcm7: Waiting for sound application to exit!
pcm7: unregister: channel pcm7:virtual:dsp7.vp0 busy (pid 2461)
pcm7: Waiting for sound application to exit!
pcm7: detached
uaudio0: detached

Messages log:

Code:
Mar 15 12:43:07 hans-ghostbsd-pc kernel: ugen0.7: <Logitech Inc Logitech Stereo H650e> at usbus0 (disconnected)
Mar 15 12:43:12 hans-ghostbsd-pc kernel: ugen0.7: <Logitech Inc Logitech Stereo H650e> at usbus0
Mar 15 12:43:12 hans-ghostbsd-pc kernel: uaudio0: <Logitech Inc Logitech Stereo H650e, class 0/0, rev 2.00/1.15, addr 12> on usbus0



When I plugin the headphone it does not switch on (logical) so I made a button in a panel where I simply send the following command to the terminal (as a user):

sysctl hw.snd.default_unit=7

For me that is a doable workaround but I do wonder if I should submit a bug about Rythmbox or one for the usb modules.

Anyone? Or should I add more info?
 
Addiotional info:

I've excluded Rythmbox as a problem. It has the same problems when I use vlc for the audio output.
 
I've experienced the same issue with unplugging a headset.
I didn't have a chance to investigate, the easiest solution (well, a work-around) is to kill the corresponding process ― you see its PID in dmesg output.
 
I've experienced the same issue with unplugging a headset.
I didn't have a chance to investigate, the easiest solution (well, a work-around) is to kill the corresponding process ― you see its PID in dmesg output.
Yes, I am already doing that. Just thought there would be a nicer way to handle it.
 
When I unplug the headset when listening to Rythmbox than it goes bananas.
Yes, you're pulling the rug from underneath the table. It typically ends with a bunch of broken things on the floor that were once on that table.
 
It's a long thread ― several years!
We can blame applications for bugs, but that's a kernel issue at the first place: the USB bus remains frozen until the corresponding process gets killed

Yeah, suppose that is correct. I will have a look that thread.
 
Back
Top