All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: PI4 Autostart
PostPosted: Tue Jul 14, 2020 8:46 am 

Joined: Tue Jul 14, 2020 8:35 am
Posts: 2
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


Top
   
 Post subject: Re: PI4 Autostart
PostPosted: Fri Jul 31, 2020 11:06 pm 

Joined: Thu Jan 15, 2015 11:19 am
Posts: 71
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.


Top
   
 Post subject: Re: PI4 Autostart
PostPosted: Tue Aug 04, 2020 1:34 am 

Joined: Tue Jul 14, 2020 8:35 am
Posts: 2
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


Top
   
 Post subject: Re: PI4 Autostart
PostPosted: Thu Aug 06, 2020 3:54 pm 

Joined: Mon Jun 08, 2015 7:28 pm
Posts: 65
Location: Belgium
For my part to start stereotool when PI4 is starting I use the method 2 describe here:
https://learn.sparkfun.com/tutorials/ho ... -autostart


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+02:00


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited