Delay when changing volume

Solved!
Reply
Highlighted

Delay when changing volume

Newbie

Your device and operating system:
Ubuntu 16.04 (PulseAudio, default settings, no flat volume). The settings occur on both an Alienware 17 and an XPS 13 Developer Edition, along with a few other Linux systems. It seems to be hardware agnostic.
Sound card: PCH [HDA Intel PCH], device 0: ALC3661 Analog [ALC3661 Analog]

Type of Spotify account you have (Free/ Premium):
Premium

The app version of Spotify you’re using:
1.0.48.103.g15edf1ec

Brief description of the issue:
Whenever the system volume level is changed, Spotify does not change the audible volume of the song playing until after a short delay, around a second. Then, the volume is changed as expected.

Steps to reproduce the issue:

  1. Start playing a song in Spotify.
  2. Change the system volume, either with the media keys or with the tray icon.
  3. The volume changes in the song after a delay of around a second.

Other media applications on the system do not have this problem. This also does not occur when changing Spotify's volume directly in the application, but there's no hotkeys for that. A workaround I have currently found: when pavucontrol (Pulse Audio Volume Control) is open, the delay on volume change disappears. Not quite sure why.

I understand this is not a huge problem, with a known workaround, but it definitely is frustrating to always have to have an extra application open for an unknown reason on my laptop where I'm constantly changing the volume on my headphones.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution!

Re: Delay when changing volume - Followup

Casual Listener

I could in fact narrow down the problem to the PulseAudio configuration. A lot of the default settings seem to be getting in the way of how people are used to volume mixers' behaviour, one of them is responsible for the delayed volume changes.

 

For anyone interested in the details, please take a look at the pulse-daemon.conf man page and the section about "DEFAULT DEFERRED VOLUME SETTINGS". Yes indeed, all caps.

 

Essentially, PulseAudio is deliberately delaying global volume changes. This can be changed:

  • get a su terminal and edit /etc/pulse/daemon.conf
  • find the setting "enable-deferred-volume", remove the semicolon at the start of the line if is commented out and set its value to "no"
  • this will enable instant global volume changes
  • get a terminal with your normal user, restart the PulseAudio daemon:
    • # pulseaudio -k && pulseaudio --start
  • done!

The man page warns about sound glitches that might occur when switching off deferred volume changes. If you experience this, switch it back on and adjust the delay settings to lower values until it suits you.

View solution in original post

7 Replies
Highlighted

Re: Delay when changing volume

Music Fan
I think you should DM @spotifycare via twitter. I guess its probably spotify bug at Ubuntu.
Highlighted

Re: Delay when changing volume

Spotify
Spotify

I also run Ubuntu 16.04 on an XPS 13 Developer edition. Late 2016 model (9360).

 

I can not reproduce your problem and this is the first time I heard about it. Looks really like a Spotify bug considering you could replicate it on so many systems.

 

There are hotkeys to change volume in Spotify. Ctrl-up/Ctrl-down.

 

Highlighted

Re: Delay when changing volume

Casual Listener

I've got the same issue on Debian testing with spotify-client 1.0.55.487.g256699aa-16.

 


@kupiakos wrote:
(...)

when pavucontrol (Pulse Audio Volume Control) is open, the delay on volume change disappears.


It also disappears when another application is playing some sound (e.g. VLC).

Highlighted

Re: Delay when changing volume

Casual Listener

Issue still exists in 1.0.57.474.gca9c9538-30 version.

Highlighted

Re: Delay when changing volume

Newbie

Just wanted to confirm the glitch on debian 9 with Spotify version 1.0.49.125.g72ee7853

Highlighted

Re: Delay when changing volume

Casual Listener

The bug is related to PulseAudio, Spotify is only affected by it.

 

How so?

- The volume change delays also occur when using other media players (yes, people still do that)

- Changing the volume with for example alsa-mixer in the console exploits the same delay as when using the virtual PulseAudio controls. Using the controls of a real system sound card, volume changes happen instantly.

 

This is an issue with PulseAudio and has probably something to do with a too large buffer for the virtual sink, lack of realtime priority for the sound server, or #@%! knows.

 

Reproduced on Gentoo Linux after switching from ALSA to PulseAudio.

Highlighted
Solution!

Re: Delay when changing volume - Followup

Casual Listener

I could in fact narrow down the problem to the PulseAudio configuration. A lot of the default settings seem to be getting in the way of how people are used to volume mixers' behaviour, one of them is responsible for the delayed volume changes.

 

For anyone interested in the details, please take a look at the pulse-daemon.conf man page and the section about "DEFAULT DEFERRED VOLUME SETTINGS". Yes indeed, all caps.

 

Essentially, PulseAudio is deliberately delaying global volume changes. This can be changed:

  • get a su terminal and edit /etc/pulse/daemon.conf
  • find the setting "enable-deferred-volume", remove the semicolon at the start of the line if is commented out and set its value to "no"
  • this will enable instant global volume changes
  • get a terminal with your normal user, restart the PulseAudio daemon:
    • # pulseaudio -k && pulseaudio --start
  • done!

The man page warns about sound glitches that might occur when switching off deferred volume changes. If you experience this, switch it back on and adjust the delay settings to lower values until it suits you.

View solution in original post

SUGGESTED POSTS