Posts by mmcmonster

    You press ENTER to save the file.


    In nano you can save the file at any time with CTRL-o (hold down the Control key and press o). When you do so, it will ask you for the file name, but it will already be prefilled, you can just hit the ENTER key.


    You can then exit with CTRL-x (hold down the Control key and press x).


    Once you exit nano with CTRL-x, exit PuTTY with 'exit'.

    (In Filezilla, make sure the Protocol is set to SFTP, not FTP.)


    Question:

    When you remote it with PuTTY, does entering the following two lines re-enable your audio?

    Code
    xrandr --output HDMI-1 --mode 1920x1080 --rate 59.94
    xrandr --output HDMI-1 --mode 1920x1080 --rate 60.00

    Here's the entire thread I posted back in 2019. Post #32 contains the script that worked for me. Unfortunately, it stopped working a few months later.


    No Audio after wake from suspend

    Thanks for the link. Sounds like I have almost the same solution. 😁

    I think xrandr changed it's options and if you add the hyphen to HDMI-1 it should work again.


    I used my script and suspended and resumed a few times and things are working great for me.


    Thanks again for pointing me in the right direction. 👍

    Using the above, I think I have a solution. When awaking from suspend, I will kill Kodi so that it will restart and rescan the database. I will then change the refresh rate and then change it back a couple seconds later.


    Works so far. 🤞


    /storage/.kodi/addons/00restart/sleep.d/restart.power

    Bash
    #!/bin/sh
    [ "$1" = "post" ] && sleep 5 && kill -9 `pidof kodi.bin` \
    && xrandr --output HDMI-0 --mode 1920x1080 --rate 59.94 && sleep 2 \
    && xrandr --output HDMI-0 --mode 1920x1080 --rate 60.00


    If it doesn't work, I would check if xrandr gives the same results before and after suspending.

    Thanks for the hint. It definitely worked on the UI. I have to give it a try on the commandline. But somehow doing it once on the UI fixed it for me. 🤷‍♂️


    For future reference and for others that are running into the same problem, this is how to change the refresh rate to 59.94 and then back to 60.00 on the command line:

    Code
    xrandr --output HDMI-0 --mode 1920x1080 --rate 59.94
    xrandr --output HDMI-0 --mode 1920x1080 --rate 60.00

    Problem: My nettop box doesn't restart the audio driver when awaking from Suspend. Because the computer doesn't respond to IR when completely powered down, I have to reboot after waking from suspend.


    This is how I currently do it:

    /storage/.kodi/addons/00restart/sleep.d/restart.power:

    Bash
    #!/bin/sh
    [ "$1" = "post" ] && reboot


    Is there a better way to restart the audio driver than rebooting the entire system?


    I tried killing kodi.bin, but that doesn't work. It looks like I have to restart the kernel. Not sure how to do that without ``````"reboot". Or is there a way to restart the audio subsystem? :(