Digital noise with Ubuntu

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: Digital noise with Ubuntu

Post by asbak »

"Were changes made to pulseaudio client & server configs?"

I don't remember, but since I replaced Pulseaudio with Pipewire, I thought pulseaudio played no role anymore? Well, there's probably a lot about these clients and servers I don't understand right.

Did you remember to stop and disable the native pulseaudio service when you installed pipewire?

Maybe I should upgrade from US 20.04 to 22.04. I haven't because 22.04 was criticized a lot. It had many drawbacks and bugs, but perhaps updates have improved it since then.

I haven't kept up with what those problems were but apart from a few weird differences compared to my older system 22.04 (I'm on Mint 21.1) seems to work OK for me so far. But it is early days and I haven't transferred everything across to it yet.

You mention you use Ubuntu Studio? Is there any particular reason why? I don't know much about it but it never seemed to be that well maintained or thought out to me, and DIY solutions seemed better? It's more work obviously to go through the long process of tuning everything and installing certain packages but once it's done (and make notes!) you'd be OK.

I'm using Mint and used to compile most packages myself but nowadays a lot (not all) of it can just be installed via KXStudio repo and for the rest I just block packages I don't want to use from there because they are really old (guitarix, linuxsampler etc) in apt preferences and compile those myself.

I could imagine the source of the problem is some combination of wrong software settings and perhaps incompatible, dated hardware. Maybe I should just bite the bullit and replace it all

Perhaps it's worth re-installing because the standard is now 22.04 anyway and chasing after the problem may not be worth the effort. Your old soundcard and PC should probably still be OK? I have lots of old hardware here which - after some tinkering - works well enough for my purposes. I recently also had a noise issue - funnily enough only on the headphone socket of a sound interface. I now suspect this was caused by interference generated by a faulty powerline ethernet adapter because since replacing that unit the noise issue magically disappeared.

What I would do is to just buy another drive (SSD or NVMe if your motherboard supports it) and remove the old drive and do a new installation with the rest of the hardware kept the same.

Then replace pulseaudio with pipewire (I cannot think of any reason to require pulseaudio any longer) and test again. Of course, you can also have jack installed and switch from pipewire to jack as well when you need to.

Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Digital noise with Ubuntu

Post by merlyn »

Ubuntu Studio and AV Linux are supposed to work out-of-the-box. In other words they're supposed to work without any tweaking. Select your soundcard and appropriate settings, and ideally that would be it.

When you said that sound works with JACK and not with Pulse -- on AV Linux JACK is running all the time and Pulse is bridged to JACK.

I think the problem that Ubuntu Studio is reporting may be due to installing Pipewire.

If you're using your M-Audio 2496, then why does this control panel mention USB? U192k is a Behringer USB interface.

Image

Again, I think that could be a Pipewire thing. Pipewire can work, apparently, but Ubuntu Studio has not been set up that way, and the point of Ubuntu Studio is to minimise tweaking.

I wouldn't normally recommend a re-install, but if it would be easy without losing data, then it could be worth a try to have a known starting point.

User avatar
Mister Mint
Established Member
Posts: 152
Joined: Wed Nov 11, 2015 10:17 am
Has thanked: 5 times
Been thanked: 1 time

Re: Digital noise with Ubuntu

Post by Mister Mint »

asbak wrote: Sat Apr 01, 2023 7:55 am

Did you remember to stop and disable the native pulseaudio service when you installed pipewire?

Yes. I followed this guide: https://linuxconfig.org/how-to-install- ... untu-linux

asbak wrote: Sat Apr 01, 2023 7:55 am

You mention you use Ubuntu Studio? Is there any particular reason why?

I chose it because it's fine tuned for audio, and a friend had praised it, but as you say, maybe a DIY solution is just as good or better, at least if you know exactly what to do. Actually I also used Mint until maybe a year ago when my version was no longer updated. Then I came across US and just wanted to try it. Not because I was disatisfied with Mint. Like you I also tweaked it, with a lowlatency kernel, KXStudio, etc. But I found US just as good as Mint, also for general purposes, so I just stuck with it.

asbak wrote: Sat Apr 01, 2023 7:55 am

Perhaps it's worth re-installing because the standard is now 22.04 anyway and chasing after the problem may not be worth the effort. Your old soundcard and PC should probably still be OK?

Yes, perhaps upgrading to 22.04 is better, although it probably won't remove the noise, since it's also on AV Linux when JACK is stopped. I think the soundcard and PC are OK, but one never knows, so yes testing with another hard drive is a good idea. I'll try to find one.

merlyn wrote: Sun Apr 02, 2023 3:00 pm

When you said that sound works with JACK and not with Pulse -- on AV Linux JACK is running all the time and Pulse is bridged to JACK.

Ok, I didn't know that. The noise on AV Linux comes when I stop JACK in Qjackctl and play a sound file, and it's the same noise as on US.

merlyn wrote: Sun Apr 02, 2023 3:00 pm

I think the problem that Ubuntu Studio is reporting may be due to installing Pipewire.

That sounds plausible. I'll un-install et soon and see what happens.

merlyn wrote: Sun Apr 02, 2023 3:00 pm

If you're using your M-Audio 2496, then why does this control panel mention USB? U192k is a Behringer USB interface.

This control panel picture I took from the Internet (because it has disappeared from my menu), so the specific settings shown may not be the same as mine.

merlyn wrote: Sun Apr 02, 2023 3:00 pm

I wouldn't normally recommend a re-install, but if it would be easy without losing data, then it could be worth a try to have a known starting point.

Maybe I'll just upgrade to 22.04, but of course, I guess the risk of losing data is the same for an upgrade of an OS as for a re-installation of it.

Certainly there is something wrong, because while I can still play sound files located on my computer, now I can't stream anything from the Internet anymore, whether sound or video :?

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Digital noise with Ubuntu

Post by merlyn »

Mister Mint wrote: Sun Apr 02, 2023 6:15 pm

Ok, I didn't know that. The noise on AV Linux comes when I stop JACK in Qjackctl and play a sound file, and it's the same noise as on US.

Have you tried not stopping JACK and playing back a soundfile? It should be set up correctly to do that. It remains to be seen if there is still noise.

User avatar
Mister Mint
Established Member
Posts: 152
Joined: Wed Nov 11, 2015 10:17 am
Has thanked: 5 times
Been thanked: 1 time

Re: Digital noise with Ubuntu

Post by Mister Mint »

Yes, then there's no noise. But I prefer Ubuntu Studio over AV Linux for general use, that's why it's a problem. I could easily live with AVL making noise when JACK is stopped. That would be strange, but not a problem :)

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Digital noise with Ubuntu

Post by merlyn »

Ubuntu Studio is set up the same way. The idea is that JACK is always running. Pulse is bridged to JACK. In the Ubuntu Studio control panel above you can see that there is a tab called 'Pulse Bridging'. That should work in the same way as the bridging on AV Linux.

User avatar
sunrat
Established Member
Posts: 907
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 238 times

Re: Digital noise with Ubuntu

Post by sunrat »

merlyn wrote: Sun Apr 02, 2023 7:58 pm

Ubuntu Studio is set up the same way. The idea is that JACK is always running.

^ This.

This topic reminds me of an old joke:
Patient: "Doctor, it hurts when I do this"
Doctor: "Don't do this then"!
:lol:

To be fair,audio should still work when JACK is stopped. I do it regularly in my Debian Bullseye system, with M2496, when I record from a USB turntable as I haven't bothered to work out how to make it seen in JACK yet.
The instant I stop JACK it switches automatically to PulseAudio in which sound still works fine. Also works fine if I also stop PA with, say, "pasuspender audacity" to just run straight to ALSA.

User avatar
Mister Mint
Established Member
Posts: 152
Joined: Wed Nov 11, 2015 10:17 am
Has thanked: 5 times
Been thanked: 1 time

Re: Digital noise with Ubuntu

Post by Mister Mint »

Same here. Except that when I stop JACK there's noise. (when sound is played)

merlyn wrote: Sun Apr 02, 2023 7:58 pm

Ubuntu Studio is set up the same way. The idea is that JACK is always running. Pulse is bridged to JACK. In the Ubuntu Studio control panel above you can see that there is a tab called 'Pulse Bridging'. That should work in the same way as the bridging on AV Linux.

Ah okay, I see. Maybe that tab isn't checked on my AV Linux then. I'll take a look.

I've tried to revert the Pipewire changes, following the last 5 steps here https://linuxconfig.org/how-to-install- ... untu-linux but got an error message at step 4, saying "Failed to enable unit: Unit file /home/thomas/.config/systemd/user/pulseaudio.service is masked." And 'pactl info' still says "Server Name: PulseAudio (on PipeWire 0.3.66)". Otherwise nothing has changed except that now I have no connection to the Pulseaudio server.

Volume control for PulseAudio.png
Volume control for PulseAudio.png (10.73 KiB) Viewed 1765 times

And I can stream files from the Internet now (Youtube, etc), but without sound. Unlike the files on my computer, which I can still play (with the lovely noise)

Here's the output:

Code: Select all

thomas@thomas-P5Q-SE:~$ sudo apt remove pipewire pipewire-audio-client-libraries
[sudo] password for thomas:
Loading the packing lists... Done
Builds dependency tree
Reading state information... Done
The following packages were installed automatically and are no longer needed:
   gir1.2-goa-1.0 libxmlb1
Use "sudo apt autoremove" to remove them.
The following packages will be UNINSTALLED:
   gstreamer1.0-pipewire pipewire pipewire-alsa pipewire-audio-client-libraries
   pipewire-bin pipewire-jack pipewire-locales pipewire-media-session
   pipewire-pulse pipewire tests
0 is upgrading, 0 is reinstalling, 10 is uninstalling and 0 is not upgrading.
After this action, 7,003 kB of disk space will be freed.
Do you want to continue? [Y/n] J
(Reading database ... 481149 files and directories currently installed.)
Uninstalling gstreamer1.0-pipewire:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire-media-session (0.4.1.r11.ga870086-2~ubuntu20.04) ...
Uninstalling pipewire tests (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire-audio-client-libraries (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire-alsa:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire-jack:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire-locales (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire-pulse (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling pipewire-bin (0.3.66-8~ubuntu20.04) ...
Handling triggers for man-db (2.9.1-1) ...
Handling triggers for libc-bin (2.31-0ubuntu9.9) ...

thomas@thomas-P5Q-SE:~$ sudo apt remove gstreamer1.0-pipewire libpipewire-0.3-{0,dev,modules} libspa-0.2-{bluetooth,dev,jack,modules} pipewire{,-{audio-client -libraries,pulse,media-session,bin,locales,tests}}
Loading the packing lists... Done
Builds dependency tree
Reading state information... Done
The package "gstreamer1.0-pipewire" is not installed, so was not removed
The package "pipewire" is not installed, so was not removed
The package "pipewire-audio-client-libraries" is not installed, so was not removed
The package "pipewire-bin" is not installed, so was not removed
The package "pipewire-locales" is not installed, so was not removed
The package "pipewire-media-session" is not installed, so was not removed
The "pipewire-pulse" package is not installed, so was not removed
The "pipewire-tests" package is not installed, so was not removed
The following packages were installed automatically and are no longer needed:
   gir1.2-goa-1.0 libfdk-aac2 libfreeaptx0 liblc3-0 libldacbt-abr2
   libldacbt-enc2 libopenfec libroc libxmlb1
Use "sudo apt autoremove" to remove them.
The following packages will be UNINSTALLED:
   libpipewire-0.3-0 libpipewire-0.3-dev libpipewire-0.3-modules
   libspa-0.2-bluetooth libspa-0.2-dev libspa-0.2-jack libspa-0.2-modules
0 is upgrading, 0 is reinstalling, 7 is uninstalling and 0 is not upgrading.
After this action, 9,016 kB of disk space will be freed.
Do you want to continue? [Y/n] J
(Reading database ... 480754 files and directories currently installed.)
Uninstalling libpipewire-0.3-modules:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling libpipewire-0.3-dev:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling libpipewire-0.3-0:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling libspa-0.2-bluetooth:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling libspa-0.2-dev:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling libspa-0.2-jack:amd64 (0.3.66-8~ubuntu20.04) ...
Uninstalling libspa-0.2-modules:amd64 (0.3.66-8~ubuntu20.04) ...
Handling triggers for libc-bin (2.31-0ubuntu9.9) ...

thomas@thomas-P5Q-SE:~$ systemctl --user daemon-reload

thomas@thomas-P5Q-SE:~$ systemctl --user --now enable pulseaudio.service pulseaudio.socket
Failed to enable unit: Unit file /home/thomas/.config/systemd/user/pulseaudio.service is masked.

thomas@thomas-P5Q-SE:~$ pactl info
Server string: /run/user/1000/pulse/native
Version for library protocol: 33
Server protocol version: 35
Is local: yes
Client index: 108
Tile size: 65472
Username: thomas
Hostname: thomas-P5Q-SE
Server Name: PulseAudio (on PipeWire 0.3.66)
Server version: 15.0.0
Standard sample specification: float32le 2 channel 48000 Hz
Standard channel map: front-left,front-right
Default sink: alsa_output.pci-0000_02_00.0.analog-stereo
Default source: alsa_input.pci-0000_02_00.0.analog-stereo
Cookie: a4a4:1213

(Google-translated from Danish)

Better upgrade to 22.04 soon. Just lazy :oops:

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: Digital noise with Ubuntu

Post by j_e_f_f_g »

Run Synaptic, and uninstall (full) both PulseAudio and Pipewire. Then install PulseAudio, as well as the PulseAudio to Jack bridge.

As others have mentioned, when Jack is running, it cuts off audio from apps that use PulseAudio. But just run QJackCtl to stop jack, and pulse will suddenly work.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
Impostor
Established Member
Posts: 1298
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 134 times
Been thanked: 334 times

Re: Digital noise with Ubuntu

Post by Impostor »

j_e_f_f_g wrote: Mon Apr 03, 2023 3:31 pm

As others have mentioned, when Jack is running, it cuts off audio from apps that use PulseAudio.

Attachments
WhoIsJack.png
WhoIsJack.png (88.62 KiB) Viewed 1738 times
User avatar
Mister Mint
Established Member
Posts: 152
Joined: Wed Nov 11, 2015 10:17 am
Has thanked: 5 times
Been thanked: 1 time

Re: Digital noise with Ubuntu

Post by Mister Mint »

j_e_f_f_g wrote: Mon Apr 03, 2023 3:31 pm

Run Synaptic, and uninstall (full) both PulseAudio and Pipewire. Then install PulseAudio, as well as the PulseAudio to Jack bridge.

I didn't have Synaptic, only Snap Store and a another software manager almost identical to it, where neithter PulseAudio nor Pipewire are to be found, only "Volume control for PulseAudio" (Pavucontrol).

PA Snap1.png
PA Snap1.png (110.29 KiB) Viewed 1700 times

So I installed Synaptic, found PulseAudio, uninstalled it, rebooted, installed it together with "pulse-audio-jack" (which I guess is PulseAudio to Jack Bridgde?)

Synaptic PA install.png
Synaptic PA install.png (142.24 KiB) Viewed 1700 times

rebooted again, but now I'm back at this stage:

Mister Mint wrote: Mon Apr 03, 2023 10:26 am

And I can stream files from the Internet now (Youtube, etc), but without sound. Unlike the files on my computer, which I can still play (with the lovely noise)

Pipewire was not marked as installed anywhere.

Sorry for giving you all headache with this never endning story. My Ubuntu Studio 20.04 seems to be a big mess, so maybe tomorrow I'll upgrade. Or perhaps make AV Linux my standard distro. The only reason I haven't yet, is because many of the apps I use are not in its depository, but I guess that's not a big problem?

User avatar
sunrat
Established Member
Posts: 907
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 238 times

Re: Digital noise with Ubuntu

Post by sunrat »

module-jack-sink needs to be loaded to pass PA sound to JACK. Check if it's loaded:

Code: Select all

pactl list modules short

Load it if it's not:

Code: Select all

pactl load-module module-jack-sink channels=2

I guess the buntu studio control thingy is supposed to do this but seeing as you made so many changes...

What are the "many apps you use" that AVL doesn't have? There are probably ways to get them. Pretty much anything in Ubuntu Studio would be able to be found for AVL.

Last edited by sunrat on Tue Apr 04, 2023 12:13 pm, edited 1 time in total.
User avatar
Impostor
Established Member
Posts: 1298
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 134 times
Been thanked: 334 times

Re: Digital noise with Ubuntu

Post by Impostor »

Mister Mint wrote: Tue Apr 04, 2023 11:47 am

[ The only reason I haven't yet, is because many of the apps I use are not in its depository, but I guess that's not a big problem?

You can add the kx repo, or just download installers from kx.studio. What cannot be found on kx, can often be found on github. Binaries are often precompiled for debian/ubuntu/mint. But building from source need not be too much of a problem either, if you can folllow instructions.

What apps are you talking about, specifically?

Post Reply