Maybe I did not get your message correctly, but if you just need to connect an external power LED (e.g. to GPIO 26) to indicate the running state of Zynthian, the easiest solution is probably to add the following configuration to /boot/config.txt (or just into “Display” > “Config” in the webconf):
Thanks for this…, that’s pretty much what I implemented, except I wanted the led to stay on as long as the Zynthian is running (and it works even when the screen is off) and the led to blink during the shutdown phase (I didn’t want to add a NE555 or something to blink the led). So, I created a service with a personal script that makes me blink the LED. Then, the LED turns off as soon as the RPI has exited all these processes. For information and for those who may not know, with systemd, it is possible to define the order of launching the scripts at startup as well as at shutdown of the machines.
For us battery types, this is a useful functionality…
I’ve implemented a hardware battery protect based on a hardware potentiometer but a software signal that could also shut down the supply would be useful and rather more elegant…
Also for the nice handy single shut down the studio button.
I just want to mention that enabling rc.local is the only solution that worked for me to run a script in the background on startup. In my case it is a standalone Python program that interfaces a Stream Deck to a DIY Zynthian running Oram on a Pi5. I developed the program using a SSH login and since python in that situation runs in a virtual environment you have to use /zynthian/venv/bin/python to run the script from rc.local if you had to install anything with pip.
Hello.
My waveshare screen is weird. Can’t make it work. It shows the image on the side. Rotation doesn’t work.
The only way I can fix that is by running : xrandr --display :0 --output DSI-1 --rotate left
How can I run this command at boot, so the image is correct, and so I don’t have to do it manually?
I am still struggling to make my 5" hdmi touch screen to work. The main problem is with touch - it doesn’t work after the boot. But the second i lauch
sudo uhubctl -l 1 -a cycle -d 1
it start’s working.
Have tried your approach with
/zynthian/config/user_config.sh
and the suggested code - no effect. If I use the full recommended code it doesn’t load completely and stuck on the terminal prompt.
Also have tried crontab (both, as user and as root) - still the command is not execuded.
Tried rc.local too as well as executing .sh script with various different ways.
The only thing I did’t try yet is creating the service.
I am asking for the advice from you or anyone from our friendly and supportive community for at least the direction, were to dig further to get this touch screen working right after the boot.
The zynthian I am talking about is rpi5 with Zyndac 1.0 audio interface and zynaptic extention.
I would like to connect an Elgato StreamDeck to a Pi 4B + Pisound Zynthian, in a headless fashion.
Current approach
Install
Launch the application from a terminal in VNC (http://zynthian.local:6081/vnc.html), which launches the application GUI and enables my Stream Deck integration.
Configured buttons to send CUIA commands to local Zynthian, using the built in Run command plugin to call the send_osc.
Result: this works as expected.
Desired approach:
As above except
Application should start at boot time. The GUI needs to start but I don’t need to see it.
Ideally, VNC does not need to be enabled.
I tried this by using the user_config.sh, however the opendeck requires a windowing system to be available.
I contacted the author but the current version has no CLI mode.
Is there a way to launch an application and link it to a real or dummy windowing system (sounds like how some plugins work)?
This installs the dummy X framebuffer and runs it with resolution 800x600, bitdepth 24 presenting its screen 0 as display 99. By prefixing your app with DISPLAY=:99, you direct the screen output from the app to that X display. (You can do the same with :0 for the main zynthian UI and :1 for the VNC desktop if VNC is running.)
I would be quite interested to see your project in action. I own an Elgato StreamDeck which sat on my desk collecting dust for a long time, and now sits in a box to keep the dust off. This would be a great use for it!