From roonics
Revision as of 19:12, 23 June 2022 by Jlambert (talk | contribs) (→‎Libreelec,openelec,kodi)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

No audio after resume from standby/suspend and logoff current user on resume

Tested on Intel Nuc i3. I was getting no audio after resuming from suspend, I also wanted the script to logoff the current user as I ran multiple profiles.

1. SSH To Libreelec

2. CD to:

cd .config/sleep.d

3. Create a file:

 vi 99-toggle_rate.power

4. Paste this in the file:

case "$1" in
kodi-send --action=System.LogOff
sleep 2
xrandr -display :0 --output HDMI1 --mode 1920x1080 --rate 59.94
sleep 2
xrandr -display :0 --output HDMI1 --mode 1920x1080 --rate 60

5. Make the file executable

 chmod a+x 99-toggle_rate.power

6. CD to:


7. Create a file:

vi kodiresume.service

8. Paste this in the file:

Description=Kodi actions for resuming from suspend

ExecStart=/bin/sh -c "exec sh /storage/.config/sleep.d/99-toggle_rate.power post"


9. Register the service:

systemctl enable kodiresume.service