fails as the alsa mixer does not find the master control:
amixer: Unable to find simple control 'Master',0
while this definitely does not happen when ran "by hand". A fix that I found was to add the keyword argument shell=True to the check_output() function:
This way, it seems that the subprocess call is made just like from an actual shell, so it works well.
Also, selecting the 'Master' control seems preferable to me, as alsamixer automatically resolves it to 'Master',0 when called, but I'm not too sure on that one.
The current systemd service I use indeed stopped to work (for another reason), so I plan to tackle the issue soon. I'll look Alsamixer too. Thank you for tge insight !
When the jukebox is called in the shell "by hand" to be executed by python3.6, it runs just fine. But when setting up a systemd service as such:
then it seems to have a hard time getting the sound card's master control. The 41th line of the main.py script in jukebox/src/, which is:
fails as the alsa mixer does not find the master control:
while this definitely does not happen when ran "by hand". A fix that I found was to add the keyword argument shell=True to the check_output() function:
This way, it seems that the subprocess call is made just like from an actual shell, so it works well.
Also, selecting the 'Master' control seems preferable to me, as alsamixer automatically resolves it to 'Master',0 when called, but I'm not too sure on that one.