Every so often, at irregular intervals, my computer makes a strange beep. I think its a notification sound for something but I can't tell what its notifying me of, or what is even notifying me. Is there a way to determine which program is making this noise so I can put a stop to this?
Most Ubuntu installations are using PulseAudio, then it is possible to
List all processes which are connected to your pulse audio
run this command
pactl list clients
However, it will give you POSSIBLE sound-making processes, if you really want to:
catch the process making sound then run this command:
watch -n0.5 'pacmd list-sink-inputs | tee -a sound-inputs.log'
and after a while you will see what processes are making sound, they could disappear fast, this is why
tee -a sound-inputs.log command is storing/logging in
sound-inputs.log all information, and you can review which process exactly is making noise now.
you can review it by
less sound-inputs command, an example output is below:
0 sink input(s) available. 0 sink input(s) available. 0 sink input(s) available. 1 sink input(s) available. index: 277 driver: <protocol-native.c> flags: START_CORKED state: RUNNING sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo> volume: front-left: 55420 / 85% / -4.37 dB, front-right: 55420 / 85% / -4.37 dB balance 0.00 muted: no current latency: 35.85 ms requested latency: 7.52 ms sample spec: float32le 2ch 44100Hz channel map: front-left,front-right Stereo resample method: copy module: 10 client: 1884 <Chromium> properties: application.icon_name = "chromium-browser" media.name = "Playback" application.name = "Chromium" native-protocol.peer = "UNIX socket client" native-protocol.version = "33" application.process.id = "2993986" application.process.user = "aneutrino" application.process.host = "xiexie" application.process.binary = "Discord" application.language = "en_US.UTF-8" window.x11.display = ":0" application.process.machine_id = "13335995d81e4f4faf75ac28835b4f8c" module-stream-restore.id = "sink-input-by-application-name:Chromium"
in the example, above it was
Discord chat application using
chrome-browser making noises
PID 2993986 I have entered to settings and disabled sounds in it, but alternatively I could simply kill it