Open Zeioth opened 2 years ago
Temporal workaround I wrote a service that kills spotifyd when spotify-tui (or the app your choose) is not running.
~/.local/share/systemd/spotifyd-autokill.service
[Unit]
Description=spotifyd auto-killer (when spotify-tui is not running)
[Service]
# Full path here is required
ExecStart="/home/zeioth/.local/share/systemd/user/daemons/spotifyd-autokill.sh"
[Install]
WantedBy=multi-user.target
~/.local/share/systemd/user/daemons/spotifyd-autokill.sh
#!/bin/bash
while true; do
if `ps -ef | grep "alacritty --title spotify-tui" | awk {'print $2" "$8'} | grep -v grep > /dev/null`; then
echo "Spotify-tui is running: No actions taken."
else
echo "Spotify-tui is not running: Closing spotifyd."
killall -9 "spotifyd" 2> /dev/null
fi
sleep 120
done
~/.local/bin/spotify-tui
spotifyd
alacritty --title 'spotify-tui' --config-file ~/.config/alacritty/monokai.yml -e zsh -c 'source ~/.zshrc && cd ~/workspaces/git-forks/spotify-tui && cargo run' &
This of course implies that the bug is still present, and the computer won't go into sleep mode while spotify-tui is open, even if the audio is stopped.
Tested with 0.3.3 and still happens.
On my Macbook (MacOs 12.4) when spotifyd is running and I close my lid, after sleep my hostname changed!
FeekApp.local
becomes FeekApp-1.local
.
@Zeioth From what I can see, this is (more or less) working on my system, at least when I use either the alsa
or the pulseaudio
backend.[^1] When I pause playback, spotifyd
disappears from the pactl list sink-inputs
output. After resuming it again, it reappears there. Although it does not set any corked
attribute that you described above, I assume that this would also work for you?
What spotifyd
audio backend are you using, and what audio server?
[^1]: I'm using PipeWire (0.3.51) as my audio server.
@feekApp Is your issue related to the one described here, or would it be better suited for a new issue? Apart from that, how does a changed hostname influence spotifyd
s ability to play music?
@eladyn I'am using portaudio
as is recommended in the wiki config file for macOS. Can I better try pulseaudio
?
On Changing host-name, spotifyd
seems still playing, but no sound on my Mac. Need to restart brew services for spotifyd
.
@feekApp Unfortunately, I have no MacBook to test this myself, but it seems like you're rather describing something like this? (Correct me, if I'm wrong.)
As for portaudio
vs. pulseaudio
: There is probably a reason, why the brew formula only packages portaudio
by default. Thus, I doubt that my findings above would also help you on macOS.
@eladyn indeed seems similar.
Description Spotifyd sink in never corked, even if no audio is playing. This prevents audio based idle monitoring from working.
To Reproduce
Expected behavior When no audio is reproducing, corked shows true.
Logs
Installed from: manjaro official repositories
Versions (please complete the following information):