Sound output starts delayed

I know I'm about to revive an old thread, but I have found a easy working solution that fixes the problem.

From : https://wiki.archlinux.org/index.php/PulseAudio

To disable loading of the module-suspend-on-idle module, comment out the following line in the configuration file in use (~/.config/pulse/default.pa or /etc/pulse/default.pa):

### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

Finally restart PulseAudio to apply the changes.


It sounds like power management is preventing the soundcard from outputting the first snippet of audio. From http://wiki.gentoo.org/wiki/Power_management/Soundcard, the important bits are as follows:

Runtime tuning

You can tune the driver in the sysfs filesystem under /sys/module/snd_hda_intel/parameters

The power_save_controller knob controls, if power-saving mode is enabled. It's preset by the kernel option ... power-saving ....

The power_save knob sets the time-out in seconds. It's preset by the kernel option Default time-out ...

pm-utils

pm-utils contains a script to enable the power-saving mode when on battery and disable when on AC. It overrides the default values of the kernel.

If you use pm-utils, but don't want this kind of regulation, disable the script: root # touch /etc/pm/power.d/intel-audio-powersave

From the above text, the things to try are:

  1. in the terminal, run the following and try playing audio again:

    echo N | sudo tee /sys/module/snd_hda_intel/parameters/power_save_controller
    

    If audio is fine, then you need to make it permanent by adding a new file in /etc/modprobe.d/ with the following content:

    options snd_hda_intel power-saving=N
    
  2. run sudo touch /etc/pm/power.d/intel-audio-powersave and reboot

    if the fix worked then audio should play normally, if not then remove the file again:

    sudo rm /etc/pm/power.d/intel-audio-powersave
    

If neither of these work, then I'm out of ideas :-).


  1. Find PulseAudio config files which contains load-module module-suspend-on-idle lines:

    neatsoft@desktop:~$ grep module-suspend-on-idle /etc/pulse/*
    /etc/pulse/default.pa:load-module module-suspend-on-idle
    /etc/pulse/system.pa:load-module module-suspend-on-idle
    
  2. Comment out that lines.

  3. Restart PulseAudio to apply the changes:

    pulseaudio -k

Just tested on Ubuntu 17.04 and it works fine.