Skip to content

Instantly share code, notes, and snippets.

@ntrrgc
Created January 27, 2016 18:19
Show Gist options
  • Save ntrrgc/c0cc8012aa089e1d21ea to your computer and use it in GitHub Desktop.
Save ntrrgc/c0cc8012aa089e1d21ea to your computer and use it in GitHub Desktop.
Ugliest hack in quite a time... Fixes the volume control lag in Spotify in the weirdest way you can imagine.
#!/bin/bash
# For some reason, volume control lags in Spotify, but not when pavucontrol is
# executing.
#
# Other volume control apps, like gnome-control-center are not enough, it has
# to be pavucontrol.
#
# This is unfortunate, among other reasons, because pavucontrol uses quite a
# few CPU resources while opened.
#
# Funny enough, it does not matter whether pavucontrol is actually doing
# anything at all! I can send a SIGSTOP to pavucontrol and volume control will
# continue to work flawless in Spotify.
#
# So here is what I do: I start pavucontrol in a virtual X11 environment, so
# that it is not visible and then I SIGSTOP it and leave it suspended forever
# in background.
#
# I can still open another pavucontrol instance if I really need to use it, so
# there is no problem.
#
# Love the Linux desktop experience!
xvfb-run pavucontrol
PID=$!
kill -STOP $PID
@Degru
Copy link

Degru commented Mar 11, 2017

Stumbled on this randomly while searching for a fix to this issue.. somehow it still hasn't been fixed in a year. This is the only thing that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment