Article 5F4M3 Clementine does not prevent system sleep while playing music

Clementine does not prevent system sleep while playing music

by
sinisab89
from LinuxQuestions.org on (#5F4M3)
Hello! I am a Manjaro user and I have a problem with Clemetine music player. This player does not inhibit system suspend while playing music and I don't want to switch to any other music player because Clementine is really perfect except this one issue. I tried to make a service that will check if clementine is playing music before going to suspend:

Code:[Unit]
Description=Inhibit suspend if Clementine is playing music
Before=sleep.target

[Service]
Type=oneshot
ExecStart=/usr/bin/sh -c "! pactl list sink-inputs | grep clementine"

[Install]
RequiredBy=sleep.targetbut it doesn't work. It gives out this error:

Code:pa_context_connect() failed: connection refusedSeems like service is refused by pulseaudio. My knowledge of this stuff is very, very limited so I need your help. Can this be solved?latest?d=yIl2AUoC8zA latest?i=Rslk5pXyNls:49lhl_3edI8:F7zBnMy latest?i=Rslk5pXyNls:49lhl_3edI8:V_sGLiP latest?d=qj6IDK7rITs latest?i=Rslk5pXyNls:49lhl_3edI8:gIN9vFwRslk5pXyNls
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments