Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] spotify: 1.0.96.181.gf6bc1b6b-12 -> 1.1.5.153.gf614956d-16 #57800

Closed
wants to merge 1 commit into from

Conversation

timokau
Copy link
Member

@timokau timokau commented Mar 17, 2019

Motivation for this change

Currently the updated spotify will segfault once you try to play anything. I'm opening this PR so that others know why spotify is outdated and do not try to update it themselves. Upstream links:

https://community.spotify.com/t5/Desktop-Linux/spotify-client-1-1-0-98-78-gb45d2a6b-10-from-Ubuntu-package/td-p/4675676
https://community.spotify.com/t5/Desktop-Linux/1-0-98-1-1-0-Crash-when-using-ALSA/td-p/4680398

Unfortunately spotify on linux is still not officially supported, so who knows when there will be a fix.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@timokau
Copy link
Member Author

timokau commented May 3, 2019

1.1.5 is out (I feel like they use dice to determine their version numbers). Unfortunately it doesn't fix the issue. There is a workaround using pulseaudio emulation for alsa which we may want to adapt if this remains unfixed much longer.

@timokau timokau changed the title [WIP] spotify: 1.0.96.181.gf6bc1b6b-12 -> 1.1.0.237.g378f6f25-11 [WIP] spotify: 1.0.96.181.gf6bc1b6b-12 -> 1.1.5.153.gf614956d-16 May 3, 2019
@timokau timokau mentioned this pull request Jul 20, 2019
10 tasks
@angristan
Copy link
Member

I can't believe this is still broken 😢

@angristan
Copy link
Member

@timokau
Copy link
Member Author

timokau commented Jul 28, 2019

Probably! I've seen that too, but since I don't particularly miss any new features in the spotify client (its pretty bad, but I doubt it'll get better in the ways I want it to get better) I wasn't motivated enough to try it.

If it works, feel free to do it :) Since you seem pretty interested in the spotify package, maybe even add yourself as a maintainer (no obligation to do so of course).

@angristan
Copy link
Member

With apulse in LD_LIBRARY_PATH, Spotify does not crash anymore when playing music, but the song stays at 0:00 and these errors appears:

1564478349.003 [apulse 10368] Z pa_stream_set_underflow_callback
1564478349.003 [apulse 10368] Z pa_stream_set_started_callback
[apulse] [error] do_connect_pcm: can't get initial hw parameters for playback device "default". Error code 1 (Operation not permitted)
[apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.

I don't know a thing about ALSA/PulseAudio or sound servers in general, so I admit I have no idea what I'm doing 🙂

@angristan
Copy link
Member

I got it working by exporting APULSE_PLAYBACK_DEVICE=plug:dmix before running spotify.

@angristan angristan mentioned this pull request Jul 30, 2019
10 tasks
@angristan
Copy link
Member

angristan commented Jul 30, 2019

I created a new PR since there is a newer version available.

angristan added a commit to angristan/nixpkgs that referenced this pull request Aug 1, 2019
See NixOS#57800 and NixOS#65081 for discussion around fixing the SIGSEV since 1.1.5

Fix taken from
https://gitweb.gentoo.org/repo/gentoo.git/commit/media-sound/spotify?id=d8c8d8abd012c709551cc96802d2615fa69b5212:

Adding apulse libraries to LD_LIBRARY_PATH make spotify work
even if pulseaudio is not installed. If pulseaudio is installed
instead of apulse, this has no effect.

Adding APULSE_PLAYBACK_DEVICE is also necessary otherwise apulse does
not find the device (inspired by the tor-browser-bundle derivation)
@timokau timokau closed this Aug 2, 2019
@timokau timokau deleted the spotify-update branch August 2, 2019 14:50
@timokau timokau mentioned this pull request Nov 3, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants