PHLAK Posted March 30 Share Posted March 30 I have Armbian up and running on a Rock Pi S with a PoE HAT. To enable the audio jack on the PoE HAT I had to run the following commands as mentioned on the official Rock Pi S PoE Hat wiki. # echo 15 > /sys/class/gpio/export # echo out > /sys/class/gpio/gpio15/direction # echo 1 > /sys/class/gpio/gpio15/value Once enabled, the audio works as needed. However, every time the device is rebooted I have to SSH in and run these commands again to re-enable audio out which is obviously not ideal. How can I persist these changes between reboots? 0 Quote Link to comment Share on other sites More sharing options...
Solution PHLAK Posted April 1 Author Solution Share Posted April 1 I was able to solve this by using systemd-tmpfiles to modify these values on boot. Specifically I created a file `/etc/tmpfiles.d/enable-audio-jack.conf` with the following contents. w /sys/class/gpio/export - - - - 15 w /sys/class/gpio/gpio15/direction - - - - out w /sys/class/gpio/gpio15/value - - - - 1 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.