Stereo Tool
https://forums.stereotool.com/

PI4 Autostart
https://forums.stereotool.com/viewtopic.php?f=2&t=28761
Page 1 of 1

Author:  NewUser [ Tue Jul 14, 2020 8:46 am ]
Post subject:  PI4 Autostart

Hello,

I have a PI4 8GB HiFi Berry sound card.
Latest full raspberian version +updates installed.

I can't find a way to have ST start automatically after boot.
I tried all different things from crontab to init.d and upstart job.

Nothing worked.

I can start ST from the terminal.

But again the Autostart will just not
work. I did gave permissions.

If anyone has an idea, it's much appreciated!

Thanks

Author:  Minetti [ Fri Jul 31, 2020 11:06 pm ]
Post subject:  Re: PI4 Autostart

Hint: upstart and init.d run before the graphical session is ready. Stereotool needs a running X-server to render the GUI.

Nowadays, you' dbetter use systemd to start the process. You can add a systemd userservice in
~/.config/systemd/user/

try with something like (this is for the jack-version, alsa won't need the jack.service references)

stereotool.service:

[Unit]
Description=Stereotool
After=jack.service
BindsTo=jack.service
After=graphical-session.target
BindsTo=graphical-session.target

[Service]
LimitRTPRIO=infinity
LimitMEMLOCK=infinity
Environment="DISPLAY=:0"
Environment="XAUTHORITY=/home/pi/.Xauthority"
ExecStart=/your/path/to/stereo_tool_gui_jack_64
Restart=always
RestartSec=2

[Install]
WantedBy=default.target

and then something like systemctl --user enable stereotool

This is very brief, you may need some additional steps.

Author:  NewUser [ Tue Aug 04, 2020 1:34 am ]
Post subject:  Re: PI4 Autostart

Dear Minetti,

Thank you very much for your help!
With your code and some modifications I was finally able to get it running.
For some reason those lines gave me trouble. (It could not be found)
So I had to take those out.

This is the code for SystemD that works for me:
Enabled from /etc/systemd/system/st.service

st.service:

[Unit]
Description=Stereotool
After=multi-user.target


[Service]
LimitRTPRIO=infinity
LimitMEMLOCK=infinity
Environment="DISPLAY=:0"
Environment="XAUTHORITY=/home/pi/.Xauthority"
ExecStart=/your/path/to/stereo_tool_gui_jack_64
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

Thanks again,

Cheers

Author:  stef007 [ Thu Aug 06, 2020 3:54 pm ]
Post subject:  Re: PI4 Autostart

For my part to start stereotool when PI4 is starting I use the method 2 describe here:
https://learn.sparkfun.com/tutorials/ho ... -autostart

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/