-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have to restart pipewire after login to get goxlr to work #123
Comments
This one is unfortunately a tricky problem to solve, as it's likely more of a pipewire issue than a utility issue. The GoXLR when it's 'freshly' powered on requires a proprietory USB command to be sent to it to activate the interface and it's channels. So what happens is the following:
From there everything functions normally. My best guess is that pipewire is tripping up between 1 and 2, it starts loading the card profile and the card is yanked away before it's fully setup, to the point where even after the reset at 4/5 it's not able to pick the card up again. The best I can really do to attempt to mitigate this would be to add a brief pause before initialisation, and hope that pipewire can get everything ready to handle the impending reset. There's also the possible option of adding the initialisation into the usb-audio driver as a device quirk, which would remove the need for the utility to do any of that, but that's a somewhat more difficult proposition. |
So I've spent some time testing this, and it seems the actual issue is occurring between 3 and 4.. During the teardown after the initialisation packets are handled, I release the interface and reset the device, from what I can tell, during the nanoseconds between the two commands ALSA / pipewire try a re-grab on the device, and the reset is breaking it. From testing, I learned that I can keep hold of the interface until the reset is completed, then when I release it gets handed back to ALSA clean, and pipewire seems to pick it up correctly. Could you grab the relevant artifact from the bottom of this test build, install it, and test it for me please? Let me know if the behaviour is better. Thanks! |
I've just tried out the patched version, but the behavior stayed the same. I tested it 4 times to make sure but the behavior is consistent.
|
Hello, I am also having the same issue in Debian 12 and I have to manually restart pipewire and open the web app for the devices to get initialized and usable by any audio application. Are there any logs or information I could share to help find the issue? |
Might be worth looking at the pipewire logs (I'm not entirely sure how to get them), and see if there's a reason it's not reattaching the device, I don't think there's anything more on the util side I can do. |
I just checked my pipewire logs using
|
Thanks, yeah this seems to indicate what I expected, pipewire isn't handling the disappearance and reappearance of the device properly, by the time it gets to loading the UCM profile, the device is already gone, and it' not retrying when the device reappears. I'm honestly not entirely sure the best way to solve this, outside of submitting a kernel patch to make the detach unnecessary. I'll do some testing and see what I can come up with. Thanks. |
I've opened an issue with the ALSA devs Here as to the best way to approach this. I ask that you please don't comment specifically on that issue unless you have some additional information until some feedback has been provided. The probability is that we're going to need to create a bug report with the Pipewire devs to deal with this scenario correctly, there's no real reason why it shouldn't automatically 'fix' itself when the USB reset happens, and the logs imply it's not correctly dropping then reestablishing the device correctly, but this is a tricky thing to fix. |
As a separate thing, could I ask that you open an issue on the pipewire bug tracker for this? As hard as I try, I'm unable to reproduce the issue on my install (Pipewire 0.3.83, Kernel 6.5.5-1-MANJARO), the device always comes back without fail for me even when power cycled. |
One thing which might work as a solution, given that the majority of these problems occur due to the mini being powered on during system boot, I could introduce a systemd service which runs the Thinking about this more, it might be possible to handle it directly on device hotplug via udev and systemd, so it doesn't reach the ALSA level until the initialisation stage has been handled.. Is anyone here on this thread happy to help with some testing? |
I'd be happy to help. Just need some instructions on what to do. |
Every time i log in i have to restart pipewire with
systemctl --user restart pipewire
to get the devices to function properly. It would be nice to have an automated or built in solution for this.OS: Arch linux (kernel 6.4.12-arch1-1)
Utility Version: 0.12.6
GoXLR Type: Mini
audio: pipewire with wireplumber
The text was updated successfully, but these errors were encountered: