Ubuntu Tips

Bluetooth Lockups

On my Macbook Air, recent versions of Ubuntu (since 14.10) exhibit a Bluetooth lockup. After a few minutes of using a mouse or keyboard, Bluetooth just stops working until the next reboot.

The problem appears to be caused by USB autosuspend.

To fix, ensure tlp is installed and edit /etc/default/tlp to add a line like:

USB_BLACKLIST="05ac:828f"

Reboot to test. Note that the bluetooth id "05ac:828f" will probably be different for your hardware. Use "lsusb -v" to find the id of your bluetooth controller.

VPN MTU Problems

IPSec based VPNs (such as those you connect to with vpnc) can exhibit nasty MTU problems.

Normally, path MTU discovery (PMTUD) lets network endpoints learn what the maximum MTU along the intervening path is. However, poorly configured firewalls and the presence of NAT functionality along the path can make PMTUD unreliable.

To address PMTUD problems, links with lower than usual (1500 octet) MTUs often perform a hack called TCP MSS clamping. This tries to to ensure that TCP connections will always use a small enough MTU. However, this hack cannot operate on encrypted VPN packets.

The only solution left is to drop the MTU of your VPN tunnel to something low enough to transit properly.

If you are using NetworkManager, this can be done with the following script:

INTERFACE=$1
STATUS=$2

if [ "$STATUS" = "vpn-up" ]; then
    ip link set "$INTERFACE" mtu 1280
fi

Install this script as /etc/NetworkManager/dispatcher.d/90mtu and chmod it to mode 755.

Why an MTU of 1280? Because that is the minimum IPv6 MTU permitted. If you are not using IPv6, you can drop it as low as 576.

PaddonWiki: UbuntuTips (last edited 2015-03-11 02:39:09 by mwp)