Input noise cancellation

Enable by default

# Microphone Realtime background noise reduction script
# author Luigi Maselli - https://grigio.org licence: AS-IS
# credits: http://askubuntu.com/questions/18958/realtime-noise-removal-with-pulseaudio
# run as: sudo && pulseaudio -k

sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.bak
sudo cat <<EOT >> /etc/pulse/default.pa
load-module module-echo-cancel source_name=noechosource sink_name=noechosink
set-default-source noechosource
set-default-sink noechosink
EOT

Bluetooth headset not connecting on startup

https://askubuntu.com/questions/481951/bluetooth-headset-connects-but-not-showing-in-sound-settings

 

nano /etc/pulse/default.pa

Comment out the following lines:

#.ifexists module-bluetooth-discover.so
#load-module module-bluetooth-discover
#.endif

nano /usr/bin/start-pulseaudio-x11

Find the following lines and add after them:


Applications like TS3 switching bluetooth audio profile

I don't want my audio profile EVER to be on HSP/HFP and instead to be on A2DP.

https://forum.teamspeak.com/threads/134341-TS3-and-bluetooth-headset-profiles

While running:

pactl unload-module module-bluetooth-policy

and switch profile in the Sound section of Gnome.

 

To save, edit: 

/etc/pulse/default.pa

Comment out

load-module module-bluetooth-policy

 


Samba cifs mounting

Posting this here not to forget as a useful snippet.

If you don't get write permissions in your samba fs mount, it's because you forgot `gid` in your options.

sudo mount -t cifs //x.x.x.x/sambadirectory /mnt/localdirectory -o username=sambauser,password=sambapass,uid=localuser,gid=localuser

 

Automount on startup:

nano /etc/fstab


USB ports stop working (Hub) a few hours after reboot

Obviously the cause may not be the same for everyone, but the symptoms are probably similar.

This may solve your problem: https://unix.stackexchange.com/questions/91027/how-to-disable-usb-autosuspend-on-kernel-3-7-10-or-above

 

If you still have problems:

Run `dmesg`

If you see something like the following problem:


Linux Spotify mutes randomly (terminal blips, Teamspeak 3, etc.)

 

Spotify mutes when terminal issues a bip

https://community.spotify.com/t5/Desktop-Linux/Spotify-mutes-when-terminal-issues-a-bip/m-p/4495147#M16486

 

Solution:

In /etc/pulse/default.pa, comment out the line

load-module module-role-cork

This will save the setting for restart.
To see it working immediately as well, use pactl unload-module module-role-cork