I’ve been working on a few Raspberry Pi projects, most of them in a headless configuration.
While connected over SSH It was extremely annoying and slow. I’m running an Edimax wifi adapter and it kept hanging for 10+ seconds at a time.
It seems the Edimax is configured to go into a sleep state after a few seconds of inactivity by default. I was able to discover that this can be disabled pretty easily:
Create a configuration file for the adapter: $ sudo vi /etc/modprobe.d/8192cu.conf
Add the following two lines to the configuration file and save the file:
# Disable power management
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
Reboot your Raspberry Pi: $ sudo reboot
This easily fixed the delay.