Announcements
The Spotify Stars Program: Celebrating Values Week!

Help Wizard

Step 1

NEXT STEP

Wayland support

Wayland support

Hi,

Can you release a linux package with ozone support built so that we can use the client under Wayland? There have been posts requesting this in the past because it is highly anticipated.

 

It shouldn't be that complicated it seems:

https://www.collabora.com/news-and-blog/blog/2019/05/08/cef-on-wayland-upstreamed/

https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/ozone_overview.md

 

Best,

Reply
76 Replies


@iiiian wrote:

Thanks !drop down menu and chinese/japanese input work like a charm now!. I also test with

--enable-features=UseOzonePlatform --ozone-platform=wayland

this eliminate blurry app on fractional scaling, but chinese/japanese input will not work, which is understandable since chromium doesn't implement it. Anyway, thanks for the update.


So by default the app will still use xwayland in a wayland environment? Thats a bit sad to read. 😞

Thanks so much to developers working on this. Its very exciting to see 1.1.99 starting to work in Wayland. Right now I'm noting a couple issues that hopefully won't be terrible to resolve. 1) the window border is pretty strange looking. Guessing based on the fact that its still relying on the "--enable-features=UseOzonePlatform --ozone-platform=wayland" flags this means Spotify is running a pretty old version of Electron, but would be great if we could get the newer version that support native Gnome chrome with the flag "--enable-features=WaylandWindowDecorations". Also the app doesn't seem to set a window class so it doesn't show properly on the dock. Thanks again!

Spotify is not Electron, but Chromium Embedded Framework(CEF) and does use a pretty recent version of it: https://www.spotify.com/us/opensource/ 

 
That said, it should be possible to use the newer flags, except Spotify does use an older version of CEF on linux(?). But I dont know about this nor do I know about what CEF supports on the Wayland side, but it should be pretty close on what Chromium itself supports.

I've tested the 1.1.99 version and I would like to report these 3 issues:

  • I cannot open any drop down menu in the settings, like language selection. Selecting it with the keyboard Tab and selecting with  down/up arrow keys works as a workaround
  • The size of the window is not preserved between app restarts
  • The option "Close button should minimize the Spotify window" does not work. The app closes after clicking the close button

Testing environment: Kubuntu 22.10

The drop down menu works normally in XWayland. But when running with `--enable-features=UseOzonePlatform --ozone-platform=wayland`, the menu is still not working, and I cannot even use the keyboards to open it.

I tested the version 1.1.99.878-g1e4ccc6e. It is working like a charm and the things that are not working are the following:

  1. the size of the window is not preserved between app restarts
  2. I cannot open any drop down menu in the settings
  3. the window decorations are similar to the Windows XP ones.

    Schermata del 2023-02-26 12-04-53.png

I'm running on a Ubuntu 22.04 machine, with the flags

--enable-features=UseOzonePlatform --ozone-platform=wayland

Running with the flags --enable-features=UseOzonePlatform,WaylandWindowDecoration --ozone-platform=wayland still have the same issues.

Just installed version 1.2.8.923.g4f94bf0d from AUR on Arch Linux.

I can say I have the same bugs as @dferraro:

 

I tested the version 1.1.99.878-g1e4ccc6e. It is working like a charm and the things that are not working are the following:

  1. the size of the window is not preserved between app restarts
  2. I cannot open any drop down menu in the settings
  3. the window decorations are similar to the Windows XP ones.

However I can at least experience the new UI:

gnolooo_0-1680721846183.png

 

As of latest version (Spotify version 1.2.8.923.g4f94bf0d, Copyright (c) 2023, Spotify Ltd), Ozone flags are working for me!

Spotify developers, I'm still waiting for native support for Wayland, without X dependencies.

Thanks for your work, Is this by you?

Spotify should take official ownership of the Linux Flatpak package at idea submissions

The current snap version 1.2.11 is running in Wayland for me. Anything special I need to do to enable it?

ok, got it to work with the ozone flags but same as others the client is drawing a very ugly windows like header bar. 

With recent versions, ozone flags work, though without them Spotify still runs through XWayland by default.
Though I can (kinda) justify that – when Spotify is running through Wayland, KDE Plasma's media player detector doesn't detect Spotify, so I can't use my laptop's hardware media keys to control it (Play, Stop, Previous, Next).

Hi StarterX4, this is weird behaviour since media player detector is based on DBUS/MPRIS, which has no relation to X11 or Wayland. Are you sure it isn't a Plasma problem? I am a KDE/Plasma user myself, though not over Wayland. If I have the time, I will try to run Wayland and test it

I checked just now on a KDE Neon setup, installed the Snap version and running bot with and without: 

 

spotify --enable-features=UseOzonePlatform --ozone-platform=wayland

 

Along with confirming with xeyes and xwininfo for when it is running in wayland or xwayland.

 

Can confirm that MPRIS, or at least KDE's Media Player widget, doesn't detect that Spotify is playing anything when it's running on Wayland, but it was able to detect it correctly when running on xwayland (again, confirmed with xeyes and xwininfo).

 

Might be a KDE Neon issue, I don't know, I don't have a Kubuntu setup to test it there.

I run it with Wayland and confirm the problem as described by StarterX4 and Feng_Lengshun. I have to take a look on how KDE's media player work, to know if the problem is not at their side

Using 1.2.11.916.geb595a67 on Ubuntu 23.04, modifying the /usr/share/applications/spotify.desktop to the following:

Exec=spotify --enable-features=UseOzonePlatform --ozone-platform=wayland %U

 

1) It does save window resize on restarts

2) pull down menus in Settings flicker for 1ms and dissappear

3) the window framing is Windows XP-like

Same. Wayland is working fine but I also have this ugly Windows Vista / 7 looking titlebar.

I actually do remember Chrome using this exact same UI for custom themes at some point - regardless of the operating system, whether it being Windows 7, 8, 10 or even Linux. If you had the default interface it was using the default UI window decorations, but as soon as you used a custom Chrome theme it switched to this one. They fixed it at some point to use the native provider but apparently CEF still bundles it.

I also have the same issue with <select> elements.

Using Spotify's flatpak with a modified desktop entry, on GNOME 44.4 with ArchLinux.

Hi all, the media player problem when running in Wayland that was reported by StarterX4 and Feng_Lengshun has been fixed. The next test/experimental versions should contain the fix

Given that a test/experimental build was hinted at, with enough googles I was able to find that there's a testing ppa, thanks Spotify /s
I modified my /etc/apt/sources.list.d/spotify.list from:

deb http://repository.spotify.com stable non-free
to: 
deb http://repository.spotify.com testing non-free
and with update & full-upgrade I upgraded from 1.2.13 to 1.2.18:
Unpacking spotify-client (1:1.2.18.999.g9b38fc27) over (1:1.2.13.661.ga588f749)


Using xeyes I can see it's still not trying wayland, so I had to re-edit the .desktop file to re-add 

Exec=spotify --enable-features=UseOzonePlatform --ozone-platform=wayland %U

since the upgrade reset the .desktop file. 

xeyes now confirms its successfully on wayland again, and the settings menu now works fine for me. I still get the Windows XP wrapper around it and on Gnome 44 I still get an unrecognized icon on launch (I believe this is due to the modification of the .desktop file).

 

  • I see that 1.2.18.999 is still using Chromium 113 from the first week of May, which is very disappointing. 
  • I wish Spotify was rebuilding the client more frequently and pulling in newer stable chromes and the Spotify client  defaults to Wayland and supports Wayland/xwayland/xorg configuration via the UI vs crudely editing a .desktop file.
  • I would be fine switching to a snap if the snap was actually being rebuilt as often as it should be. Right now the stable snap on snapcraft.io is 1.12.11 and edge is 1.12.13. 

While I do appreciate that Spotify is doing a native Linux client and publishing the debians, I'm also paying for a premium family plan, so I'm not some freeloading unwashed internet rando stallman-wannabe trimming my toenails on stage.

Suggested posts