The sound works fine after a reboot. I didn’t have to install any drivers, it worked out of the box. After a few days, however, the sound from one channel (2-channel stereo setup) becomes distorted. The other channel is fine. The only solution I’ve found is to reboot, after which it’s fine for another few days.
I’ve tried restarting pipewire, wireplumber and pipewire-pulse but no effect:
Just some thoughts:
Maybe it’s a hardware issue? Did you try disconnecting the external sound device and reconnecting again after some (> 30) seconds when the distortion occurs?
Did you use this device before switching to Ubuntu? If so - did it work properly under same conditions? What about the speaker system?
The same hardware (laptop PC, USB sound device and speakers) has worked fine in Windows 10 and 11 for years. The problem seems to be Linux-specific. The speakers are connected to the sound device using SPDIF optical - in fact, that’s why I need the sound device, since my laptop does not provide an optical out for my speakers and I prefer that to analog.
The laptop’s internal speakers always work fine without any distortion.
I haven’t tried unplugging and reconnecting the USB sound device; will do so tonight. Even if that works, however, I’d prefer not having to do that every few days. The fact that it works fine after a reboot makes me think there must be a setting somewhere that I can tweak. I just don’t know enough about sound in Linux to troubleshoot and fix this, unfortunately. Most of my Linux experience to date (before switching over my desktop) has been managing headless servers, where I didn’t care about sound.
It actually makes (a lot) more sense what @g-schick is thinking of when he asked you to try simply disconnecting and reconnecting, instead of rebooting. An electronics engineer will be able to explain the reasons. Hint: What you’re convinced is a Linux-specific can very well be age-specific.
OK, I’ve confirmed that unplugging and reconnecting the USB cable to the sound device resolves the issue temporarily. Not sure where that leaves me in terms of a permanent solution, however. It would be a big coincidence if the hardware started being flaky exactly when I switched my PC from Windows to Linux. Possible, but unlikely, which is why I don’t think it’s the hardware. In fact, it still works fine in Windows across multiple suspend & wake cycles (I dual-boot my PC and still have my Windows partition).
Switching OS you likely also changed how external hardware is handled.
With every information you provide you may get hints that get you closer to a possible solution.
Again some thoughts:
Do you suspend Ubuntu like Windows? Or do you keep Ubuntu on all the time?
How does your Windows handle USB power while suspended? Does Windows cut the USB power while suspended (and restart (and reset) the device on wake)?
If you suspend Ubuntu: How does your Ubuntu handle USB power while suspended? Does Ubuntu cut the USB power while suspended?
I suspend both Ubuntu and Windows. In both cases, power to the USB sound device is interrupted; I can confirm this since the device has a power LED that turns off when the computer suspends.
If you want to check for differences in settings and drivers you should collect data while the system is working properly and while the distortion is occurring. I doubt there will be (significant) differences.
You may try to restart the device using software but I do not know how to do that. I’m sure somebody else can help you with that. If restarting the device does work and solves your problem you probably can add a script that’s run on wake.