pi-apps
pi-apps copied to clipboard
Spotify
Spotify Web Player on Chromium or Min has issues (even when using Widevine):
- Skips songs after playing for 0 seconds
- Repeats ^ until it hits an ad, which it plays
- Repeat both of above until your frustration is too much and you defenestrate your Raspberry Pi
Jokes aside, this is very annoying. So maybe a way to run the Ubuntu version of Spotify, or some way of using wine?
It's possible with Exagear (#1051), but Exagear is not yet up on Pi Apps as of its legal issue. You can import Exagear via the import-app tool, and start Exagear, and you can install Spotify like how you do in i686 Linux machines.
If Exagear is merged to pi-apps, I think Spotify will be the first app based on Exagear to be added to pi-apps.
I use the linux Spotify desktop client every day, with the help of ExaGear. It works pretty well, unless your Pi is really being pushed (over 85-90% on all cores, Raspberry Pi 4 4G). It runs admirably well, for being a heavy music streamer/player on an emulated i686 (Intel 32-bit) system, on a Raspberry Pi 4 4G. That means that it's not very fast.. It works though:
When I say it works, it does, but the account menu doesn't work, as well as the Filter bar in playlists. If you are wondering, the yellow rectangle in covering my username.. :+1: If the install scripts aren't working for you, you can try this tutorial to install ExaGear. Once you have ExaGear installed, just follow the installation instructions for Linux on the Spotify website. Keep in mind that using ExaGear is ~~probably~~ illegal, since it was a paid software, and now it is owned by Huawei, and under their terms you can use it for free, but only on Huawei Kunpeng processors...
ExaGear works with that tutorial, but how do I install Spotify in it? It seems to be using my host systems file system, and not a container? I would much appreciate any help on containerising this. Thanks!
Start Exagear, and execute these commands:
wget -O spotify.deb https://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_1.0.72.117.g6bd7cc73-35_i386.deb
sudo apt install ./spotify.deb
I got Spotify running. I couldn't login with Facebook (which my primary account is on), so I had to use my email sign in, which is inconvenient. And the Spotify app fails when trying to use GPU acceleration. And when playing a song, no sound comes out of the speakers, and it doesn't initialize any kind of audio connection to pulse.
I got Spotify running. I couldn't login with Facebook (which my primary account is on), so I had to use my email sign in, which is inconvenient.
Can't test this since I use email as my primary login way.
And when playing a song, no sound comes out of the speakers, and it doesn't initialize any kind of audio connection to pulse.
Weird. I can play music on my pi with sound flawlessly.
And when playing a song, no sound comes out of the speakers, and it doesn't initialize any kind of audio connection to pulse.
I have no idea why yours doesn't output any sound. Mine did automatically, on multiple SD cards running RPiOS. What OS and audio output do you use? I have no idea if this will work, but ExaGear doesn't have pulseaudio installed, so you could try installing pulseaudio inside ExaGear.
I got Spotify running. I couldn't login with Facebook (which my primary account is on), so I had to use my email sign in, which is inconvenient.
ExaGear does not have a web browser installed in the guest image as far as I can tell, and Facebook login requires a browser to open the little Facebook login website window, right? Try installing a light but Facebook capable browser.
And the Spotify app fails when trying to use GPU acceleration.
Yes, it does fail to use GPU acceleration. Like I said, it's a Raspberry Pi running the Spotify desktop cilent though an emulated container. Give it some slack. :) ~~You also can't use multiple Spotify windows because of this (I think. It just hangs after GPU acceleration errors - What you were saying?).~~ NVM multiple windows work..
I have no idea why yours doesn't output any sound. Mine did automatically, on multiple SD cards running RPiOS. What OS and audio output do you use?
Raspberry Pi 32-bit OS, BT audio.
I have no idea if this will work, but ExaGear doesn't have pulseaudio installed, so you could try installing pulseaudio inside ExaGear.
Will try this.
ExaGear does not have a web browser installed in the guest image as far as I can tell, and Facebook login requires a browser to open the little Facebook login website window, right? Try installing a light but Facebook capable browser.
I installed Chromium but nothing happens when I click "Login with FaceBook".
Yes, it does fail to use GPU acceleration. Like I said, it's a Raspberry Pi running the Spotify desktop cilent though an emulated container. Give it some slack. :) You also can't use multiple Spotify windows because of this (I think. It just hangs after GPU acceleration errors - What you were saying?).
Doesn't hang - it just fails to use GPU acceleration. It works, but slow because of this.
Doesn't hang - it just fails to use GPU acceleration. It works, but slow because of this.
Yeah, but for me, if you try to open two simultaneous Spotify windows, it just hangs after the GPU acceleration errors.
EDIT: Nevermind. It works just fine, if a little slower..
I installed Pulseaudio and it works fine now. I'm trying to find a way to get GPU acceleration working.
There is a tutorial on how to enable hardware acceleration (I don't know if GPU acceleration is same with hardware acceleration) in /opt/exagear/share/doc/user-guide.pdf
. You can try it out.
Cool, thanks. I'll try it!
I think this is kind of weird...
The ExaGear Hardware acceleration page in teh user guide says to use full kms, and to set it via raspi-config
, but my raspi-config
doesn't have an option for Full KMS. I have seen it before in raspi-config, so I don't know why it's not there now..
I tried to set it by just changing the config.txt
file GL driver line to
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-kms-v3d
max_framebuffers=2
But everything appears to be the same...
I can't see Full KMS inraspi-config
too.
After some googling I found the full KMS for Pi 4 is still beta, but for Pi 2 and 3 is already live, as see in this forum post.
Also, I found the user guide said:
On Raspberry Pi 2 and Raspberry Pi 3 ExaGear supports hardware graphics acceleration. This feature significantly increases performance of x86 applications that use OpenGL up to version 2.1.
So maybe that's only support Pi 2 and Pi 3...
Yeah, that makes sense.
@Pythonic456 @cycool29 Do either of you have a Pi 3 you could try it on? Mine is lacking a power supply at the moment.
Yeah, that makes sense.
@Pythonic456 @cycool29 Do either of you have a Pi 3 you could try it on? Mine is lacking a power supply at the moment.
No, I don't have a Pi 3.
I have a 2B, although it is very slow compared to my 4.
@Pythonic456 Well, I think you could still try it.
Open-source spotify clients are also an option...
I've been using this application called Spot for a while: https://github.com/xou816/spot
It has almost all the functions of Spotify, except for downloading songs
I wish it had an armhf build...
Open-source spotify clients are also an option...
I've been using this application called Spot for a while: https://github.com/xou816/spot
It has almost all the functions of Spotify, except for downloading songs
It only works with premium accounts.
Yeah, and I really use offline mode...
https://github.com/dtcooper/raspotify What about using this?
https://github.com/dtcooper/raspotify What about using this?
That is Spotify Connect, not Spotify client.
I've used that, and it's good, as a Spotify Connect client. But, it's not a GUI, and you can't control it from your Raspberry.
Pi-ware has a working spotify app, maybe adapt its script?
I just looked at Pi-Ware's github repo, and couldn't find a Spotify/anything that might be a Spotify client. Could you please link to the install script you mean?
@leha-code I assume that this is the repository you mentioned: https://github.com/piware14/pi-ware So where is the "Spotify" app?
I have Pi-Ware installed, and I don't see any Spotify
..
Looks like they used to have Spotify? I searched the repository and found this commit deleting Spotify.
Ah, thanks @Botspot. I guess it didn't work?
For anyone interested: RPiOS Bullseye comes with Full KMS enabled, and Spotify with ExaGear has hardware acceleration. It's still not fast, but is really not awful. @Pythonic456 Try signing in with facebook again.. I think the hardware acceleration might fix that.. All the menus and search bars work now.
I will have to flash a MicroSD with Bullseye and try this. :)
@Pythonic456 Just curious, have you tried it yet?
@Crilum Not yet, will try to do it today and let you know how it goes.
I have flashed a SD card with rpios bullseye, and have installed exagear with debian 8. I encountered a annoying thing: You don't seem to be able to become root in the exagear image. Fortunately, if you are root when you run exagear, you are root in the exagear image. Spotify has installed, but when running, it has no hardware acceleration. Here is the output:
libGL error: MESA-LOADER: malformed or no PCI ID
libGL error: unable to load driver: vc4_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: vc4
libGL error: MESA-LOADER: malformed or no PCI ID
libGL error: unable to load driver: vc4_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: vc4
[0130/132218.238110:ERROR:sandbox_linux.cc(344)] InitializeSandbox() called with multiple threads in process gpu-process.
pi@raspberrypi:~ $
(Btw, it doesn't crash - I just closed it.) Seems to want vc4_dri, but I can't find anything in the APT repos or online on how to go about setting it up/installing it. Any help would be appreciated.
And you can't login with Facebook still. I installed Firefox in Exagear and can launch it, I then set it as the default browser. When I click "Login with Facebook" in Spotify, the firefox-esr
process doesn't appear on the top list at all. Seems Spotify might fail somehow when trying to find a browser, am using strace
to figure out what exactly is happening. I logged in with my email Spotify account, which works, and can play music just fine. Unfortunately, no graphics acceleration.
@Crilum any ideas?
For anyone interested: RPiOS Bullseye comes with Full KMS enabled, and Spotify with ExaGear has hardware acceleration. It's still not fast, but is really not awful. @Pythonic456 Try signing in with facebook again.. I think the hardware acceleration might fix that.. All the menus and search bars work now.
I have installed it on Bullseye however no hardware acceleration still.
@Crilum so did you manage to get hardware accel working?
No, I didn't.. :cry: But, Spotify is definitely faster and more usable on Bullseye...
Anyone that's interested might take a look at @MCRaspRBX's Spotify Web app:
This might be a good app to put on Pi-Apps. It has all the functionality of the Desktop App (offline songs excluded, of course), but is much lighter than the full Desktop Client, the Web app appears to run at about 5% CPU load on my Pi 4, whereas the Desktop Client uses a full core when using the UI. It also appears to have hardware acceleration, since it's just chromium..
@Botspot what would you think about adding this if I made some scripts?
Anyone that's interested might take a look at @MCRaspRBX's Spotify Web app
It looks like it's just a Chromium desktop shortcut that goes to open.spotify.com...
Yeah, it is.. But it's slightly different, It doesn't have the Spotify logo in the corner, and it doesn't have a Download the App
button..
I guess it really is just the web player, but it feels a lot better to have it on the desktop. I don't like using Spotify in a web browser, but this webapp makes it feel like I'm using the full Desktop Client, even though it's just the web player.
But it's slightly different, It doesn't have the Spotify logo in the corner, and it doesn't have a
Download the App
button.
That could be due to the custom user-agent.
--user-agent="Mozilla/5.0 (X11; CrOS armv7l 11895.95.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.125 Safari/537.36"
I tried installing that repo, but unfortunately I still have the problem where I play a song, it skips after ~1 second, then continues to do that song after song until it manages to play the first ten seconds of a song, at which point the audio stops playing, then the whole Spotify UI becomes unresponsive. I tried uninstalling Chromium and Chromium Widevine, then reinstalling both from Pi-Apps, still doesn't work. Oh and by the way, when you click play for the first song since opening Spotify, it doesn't do anything for about 5 seconds.
https://user-images.githubusercontent.com/56113118/158015259-aebbf205-ba4f-4e7e-b671-7988b9cf3beb.mp4
Any ideas?
What RPiOS/Debian version are you running? I'm on Bullseye, that might have something to do with it...
Buster 32bit userspace, 64bit kernel.
Yeah, in Buster, DRM is still broken I think, but it works in Bullseye!
So I tried to make a qemu-powered x86 chroot, with this tutorial, and the chroot worked, and the Spotify window opened, but then it just seg-faulted...
$ spotify
(process:3337): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: Failed to load module "canberra-gtk-module"
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=gpu-process'
[0412/222343.730152:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[0412/222411.416909:ERROR:service_manager_context.cc(171)] Attempting to run unsupported native service: /usr/share/spotify/content_renderer.service
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
@Pythonic456 So, I just saw this, maybe it would work for you? https://community.spotify.com/t5/Accounts/Can-t-Login-via-Facebook-anymore/td-p/1210679
It might be possible to use qemu-user with flatpak (only on 64 bit systems, though, cause the Spotify flatpak is x86_64 only).. https://www.reddit.com/r/linux/comments/n6x63p/til_that_flatpak_apps_can_emulate_nonnative_apps/
well i am using spotify on my arm64 raspbain using chromium:arm32
well i am using spotify on my arm64 raspbain using chromium:arm32
Yes, Spotify Web Player works with Chromium and Bullseye.. I assume you're using Bullseye?
Also, you shouldn't need to use chromium:armhf
, the arm64 version should work fine..