no HDMI sound on resume from standby

  • Dear Community, I ask for your help with this:

    HDMI sound does not work after PC resumes from standby (LibreELEC 7.95.3, Kodi 17, AMD GPU). If I go to settings/system/audio it gets activated automatically again, sound is OK again. Any idea how to get audio activated on resume?

  • I was going to suggest you make a script to call xrandr however this doesnt seem to be installed in LE.

    Something like

    This would be a .sh file (make it executable) placed in sleep.d and called on when you resume the machine. xrandr command as above should resolve the sound issue, but you can test that manually first before bothering to try and script it. You will have to track that down though, not sure if its available as an addon or not.

    reference - HOW-TO:Create a resume script - Official Kodi Wiki

  • stream
    thank you very much! that was what I've been looking for. I played with xrandr yesterday around (for trying to force full RGB picture output) and it is functional in libreelec. But I am not sure if display settings will effect the sound settings as I guess that they are two separate hardware modules for the system. I will ssh today and test it first manually.

  • your scripts work good over putty ssh and cures the problem but do not work over a power script. I do not know why. Using a script to restart Kodi helps too:

    Bash
    #!/bin/sh
    case "$1" in
    pre)
    ;;
    post)
    systemctl restart kodi
    ;;
    esac
  • Seems odd.. have you tried just cleaning up the xrandr reference to see if it behaves differently

    Edited once, last by stream (February 18, 2017 at 3:52 AM).


  • your scripts work good over putty ssh and cures the problem but do not work over a power script. I do not know why. Using a script to restart Kodi helps too:

    Bash
    #!/bin/sh
    case "$1" in
    pre)
    ;;
    post)
    systemctl restart kodi
    ;;
    esac

    I have the same issue (no sound over HDMI after suspend), BUT this script works brilliantly for me, as it fixes the audio issue AND essentially logs out the current logged-on user, which is perfect as i have multiple profiles and don't want to accidentally leave the "parent" profile logged in.

    So thankyou! :)

    Edited once, last by hib1000 (February 22, 2017 at 11:24 AM).

  • this one does the magic on my setup without Kodi restart: xrandr --output HDMI-0 --set "audio" "on"

    (make an text file of it, name it "think-out-a-name.power" and put it to /storage/.config/sleep.d

    Bash
    #!/bin/sh
    case "$1" in
    pre)
    ;;
    post)
    xrandr --output HDMI-0 --set "audio" "on"
    ;;
    esac

    Edited once, last by kszabo (February 26, 2017 at 9:18 PM).

  • I have had to rebuild my box from scratch and i'm trying to implement the reboot after returning from the suspend state again, but i'm having no luck and wondered if anyone could help. The steps I have taken are;

    1) Create a folder in /storage/.config/ called /sleep.d

    2) Created a notepad file in windows called 01-reboot-script.power and added the contents;

    Bash
    #!/bin/sh
    case "$1" in
    pre)
    ;;
    post)
    systemctl restart kodi
    ;;
    esac

    3) Copied the file across to /storage/.config/sleep.d using WinSCP

    4) Made 01-reboot-script.power executable by running

    Code
    chmod +x /storage/.config/sleep.d/01-reboot-script.power

    Thats it.

    BUT when i suspend Kodi and return from the suspend state no reboot happens - i'm losing my mind on this as I didn't have any issues last time!

    Any help is appreciated :)

    Edited once, last by hib1000 (March 11, 2018 at 10:37 PM).

  • Hello all,

    although quite old, this issue is still present on my system (config+specs see below). The problem occurs sporadically and none of the proposed actions seemed to work. So I decided to re-open the discussion and ask for help again.

    Interestingly, I never can re-activate HDMI sound by simply going to ->System->Settings->Audio (as proposed here and in other posts). The only way is to cold reboot LibreElec, after which everything works fine.

    Also, when putting LibreElec into standby manually (via its On/Off menu), HDMI sound is usually fine after resume, but If I let LibreElec go to standby automatically (e.g. after completing a PVR recording), almost ervery time it wakes up with no sound. The only difference I see is that the connected units (Receiver, Projector) are active during manual shutdown, but inactive during PVR operation (manual shutdown).

    Is there ayone out there who can help?

    Thank you very much in advance!


    -----------------

    HTPC System setup:

    CableTV--->(DVB Stick)---USB--->(INTEL NUC)---HDMI--->(Receiver)---HDMI--->(Projector)

    (DVB Stick): Hauppauge win-TV Dual HD

    (INTEL NUC): DN2820FYKH , LibreELEC 9.2.2 + Tvh 4.2.8-36 + addon v9.2.0.121

    (Receiver) : Pioneer VSX S520D

    (Projector): EH-TW6700W