Edit (2017-11-19):
Restored to LibreELEC-Generic.x86_64-8.0-devel-20170621.img.gz for the moment, and with this image I don't have an issue stopping Spotify using [ALT]+[ESC].
Edit (2017-11-12):
Found a bit of a workaround.
copied the Estuary skin to storage, and added a menu item to kill spotify, and start pulseaudio again.
I haven't played much with it yet, but found just killing spotify + starting pulseaudio wasn't enough.
See note below.
cp -r /usr/share/kodi/addons/skin.estuary/ /storage/.kodi/addons/
vi /storage/.kodi/addons/skin.estuary/xml/Home.xml
:901
<add below additional menu item>
systemctl stop kodi
systemctl start kodi
Item menu added:
<item>
<label>Stop Spotify</label>
<onclick>XBMC.System.Exec(/storage/.config/stopspotify.sh)</onclick>
<thumb>DefaultAddonMusic.png</thumb>
<property name="id">Stop Spotify</property>
</item>
NOTE: Below script isn't optimal, and I observe that I need to execute it twice to 'hear the click sound' while navigating the menu in Kodi. Killing spotify, and starting something with audio does work already with the first try. Executing the scrip form cli always gives the 'click sound' the first time, but not from within Kodi? (You can test with: sh -x /storage/.config/stopspotify.sh )
Script:
# cat /storage/.config/stopspotify.sh
#!/bin/sh
pkill spotify
sleep 3
#systemctl stop pulseaudio
#kodifreeze.sh freeze muteonly
systemctl start pulseaudio
#kodifreeze.sh unfreeze muteonly
chmod +x /storage/.config/stopspotify.sh
[/Edit]
Edit 2 (2017-11-12):
Just to give a better problem description including the use of above script:
- Staring Spotify normally always works (99%)
- Closing the Spotify window with [ALT]+[ESC] always works (100%), but nearly always (95%) of the time sound keeps going.
- Using above script from CLI always works (100%) to kill Spotify and get sound back to Kodi.
- Using above script from the added Kodi menu always kills Spotify (100%), and always works (100%) to have sound for started items (e.g. LiveTV, video, music), but menu-sound (moving through the menu with a remote gives a click sound) only get restored after a second time (100%).
[/Edit 2]
==================================================================================================================
Now playing with Spotify I do noticed sound keeps running after quitting (ALT+ESC).
Had the same yesterday also.
(LibreELEC-Generic.x86_64-8.2-devel-20171016.tar, cherry trail)
ps shows spotify is still running.
# ps -ef | grep -i spot | grep -v grep
1904 root 0:00 {spotify} /bin/sh /usr/bin/spotify
1916 root 3:58 /storage/.cache/app.spotify/spotify
1918 root 0:00 /storage/.cache/app.spotify/spotify --type=zygote --no-sandbox --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474
1939 root 2:34 /storage/.cache/app.spotify/spotify --type=gpu-process --no-sandbox --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474 --supports-dual-gpus=false --gpu-driver-bug-workarounds=1,7,23,61,74 --disable-gl-extensions=GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent --gpu-vendor-id=0x8086 --gpu-device-id=0x22b0 --gpu-driver-vendor --gpu-driver-version --gpu-driver-date --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474 --service-request-channel-token=8C4AB353FFED75EF748DFAC7321F77CD --v8-natives-passed-by-fd --v8-snapshot-passed-by-fd
1952 root 5:24 /storage/.cache/app.spotify/spotify --type=renderer --disable-pinch --no-sandbox --primordial-pipe-token=282CFD01371A42FB4697754B4D891313 --lang=en-US --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474 --disable-spell-checking --num-raster-threads=2 --enable-main-frame-before-activation --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553 --disable-accelerated-video-decode --service-request-channel-token=282CFD01371A42FB4697754B4D891313 --renderer-client-id=3 --v8-natives-passed-by-fd --v8-snapshot-passed-by-fd
Edit (2017-11-06):
The created spotify log is filling with '(spotify:1916): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed'
# cat /tmp/spotify.log
/storage/.cache/app.spotify/spotify: /usr/lib/libcurl-compat.so: no version information available (required by /storage/.cache/app.spotify/spotify)
/storage/.cache/app.spotify/spotify: /usr/lib/libcurl-compat.so: no version information available (required by /storage/.cache/app.spotify/spotify)
/proc/self/exe: /usr/lib/libcurl-compat.so: no version information available (required by /proc/self/exe)
[1106/205706.559773:ERROR:child_thread_impl.cc(762)] Request for unknown Channel-associated interface: ui::mojom::GpuMain
(spotify:1916): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
:
:
:
(spotify:1916): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
# cat /tmp/spotify.log | grep -i glib | wc -l
240
Display More
Edit2 (2017-11-06):
Tried again, and this time ALT+ESC correctly terminated Spotify.
Spotify log:
# cat /tmp/spotify.log
/storage/.cache/app.spotify/spotify: /usr/lib/libcurl-compat.so: no version information available (required by /storage/.cache/app.spotify/spotify)
/storage/.cache/app.spotify/spotify: /usr/lib/libcurl-compat.so: no version information available (required by /storage/.cache/app.spotify/spotify)
/proc/self/exe: /usr/lib/libcurl-compat.so: no version information available (required by /proc/self/exe)
[1106/221808.748239:ERROR:child_thread_impl.cc(762)] Request for unknown Channel-associated interface: ui::mojom::GpuMain
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(spotify:2386): GLib-GIO-CRITICAL **: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Display More
Ps is still showing the old process running (1916):
# ps -ef | grep -i spot | grep -v grep 1904 root
0:00 {spotify} /bin/sh /usr/bin/spotify
1916 root 6:48 /storage/.cache/app.spotify/spotify
1918 root 0:00 /storage/.cache/app.spotify/spotify --type=zygote --no-sandbox --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474
1939 root 2:34 /storage/.cache/app.spotify/spotify --type=gpu-process --no-sandbox --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474 --supports-dual-gpus=false --gpu-driver-bug-workarounds=1,7,23,61,74 --disable-gl-extensions=GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent --gpu-vendor-id=0x8086 --gpu-device-id=0x22b0 --gpu-driver-vendor --gpu-driver-version --gpu-driver-date --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474 --service-request-channel-token=8C4AB353FFED75EF748DFAC7321F77CD --v8-natives-passed-by-fd --v8-snapshot-passed-by-fd 1952 root 5:47 /storage/.cache/app.spotify/spotify --type=renderer --disable-pinch --no-sandbox --primordial-pipe-token=282CFD01371A42FB4697754B4D891313 --lang=en-US --lang=en-US --log-file=/storage/.cache/app.spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.57.474 --disable-spell-checking --num-raster-threads=2 --enable-main-frame-before-activation --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553 --disable-accelerated-video-decode --service-request-channel-token=282CFD01371A42FB4697754B4D891313 --renderer-client-id=3 --v8-natives-passed-by-fd --v8-snapshot-passed-by-fd
.