Autoshutdown: No valid network interface found

  • I tried it, service doesn't start up after suspend:

  • There might be a (major) difference in my setup. I am using nvidia hardware transcoding and therefore I had to install specific nvidia sleep and resume scripts. may be that could help to find the reason ?!





    and /lib/systemd/system-sleep/nvidia:

    case "$1" in
    /usr/bin/ "resume"

    does this make any sense ?

  • Ok from the log is look as it the autoshutdown-restart script is not working at all. I would remove any version of this file that you can find on the system and make sure you reinstall autoshutdown from a fresh (as it was working before). The reason I say this is in the log provided there is not entry in the log from the script firing.

    It you what yo make sure you are back as the 5.1.10 autoshutdown, you should back-up you autoshutdown settings. purge the package using apt purge (not you will loss you setting so make sure you backed them up) and reinstall. Mind I am assuming you have not done the above before hand.

    Once installed make sure that autoshutdown-restart is executable and located at /lib/systemd/system-sleep/. Re-apply you autoshutdown setting. To test the scrip work you do not have to have autoshutdown turn of the server. The script should run and log into /var/log/autoshutdown.log that is closed autoshutdown and restarted it after suspend. Something like:

    INFO: 'autoshutdown-restart(): Autoshutdown stopping' - at suspend

    and on restart:

    INFO: 'autoshutdown-restart(): Autoshutdown starting' - at resume

    if these log entry are not there then there is a system issue. Hope that helps

  • I'll give it a try. But I already removed the plugin as you described, started from scratch - buth without purge. But after removing it again the result is:


    This time it seems to work.... and one more but: meanwhile I've changed my network setup from DHCP to static and also disabled the ipv6 support of my Plex server that is running on my OMV.

    This is the log:

  • I don`t know how to tell....... But after suspend - and now with running autoshutdown - my hardware transcoding isn't working anymore...

    so my guess is, that there IS a conflict with the nvidia scripts from #43 :-( :-( :-(

    nvidia-smi isnt working anymore also. And to get it back working I have to reboot my system :-(

    root@MalibuNAS:~# nvidia-smi
    Unable to determine the device handle for GPU 0000:01:00.0: Unknown Error

    can't we go back to the original version (5.1.7 ?) ?

  • I tried some more things and changed one setting that I have done to overcome issues with nvidia hw transcoding.

    in grub I changed the following kernel parameter:

    GRUB_CMDLINE_LINUX_DEFAULT="text acpi_osi=! \"acpi_osi=Windows 2015\" mem_sleep_default=deep pcie_aspm=off"

    As far as I understand is, that this is telling Linux it is on a windows system.

    After I changed it back to:

    GRUB_CMDLINE_LINUX_DEFAULT="text mem_sleep_default=deep"

    Everything seems to work. Autoshutdown service is active and HW transcoding is operative.....

    Does this make sense to you ?

  • hmm this dose not entirely make sense to me but i have issue with NVidia driver before. I do not think this is an interaction between the scrip however it look more like it an NVidia issue directly. However it look as it we have reached a solution that work so that all good.

    I will go about cleaning up the change and getting it ready for a proper release as the script as it is is a bit of a hack to test everting will work. FYI it will not support DHCP addresses no need for static addresses. So this change will form par of the 5.1.11. @Dagobert57 i will also fix the hybrid-sleep issues which is suspect has always been incorrect.

    Let me know if there is anything else (raise a issue in GItHub if you need or spot a problem I will address this ASAP)

    So I will assume this is resolved for now :)

  • Just wanted to chime in after I noticed my system isn't shutting down anymore. Glad I've found this thread, I'm currently testing the suggestion in post #40 right now. Waiting for the system to go to pm-suspend right now

    edit: Okay, tried the suggestion, but didn't work either, unfortunately

  • Okay, this is weird. I've just reinstalled the plugin and forgot to add "SHUTDOWNCOMMAND="pm-suspend"" to the extra options. The computer shutdown BUT was still able to be woken via WOL which usually didn't work without the extra command.

    I get the red dot only for a few seconds and it seems the freshly installed plugin is working now. I have to check how much power the computer draws in that state and I'll test hibernate instead of suspend because I think it saves a bit more power.

     autoshutdown[16493]: root: INFO: 'main(): Checking network interface: enp5s0 -'

    autoshutdown[16493]: root: INFO: 'main(): 1 cycles until shutdown is issued'

    autoshutdown[16493]: root: INFO: 'main(): ------------------------------------------------------'

    autoshutdown[16493]: root: INFO: 'main(): New supervision cycle started, checking system activity'

    autoshutdown[16493]: root: DEBUG: '_check_system_active(): Running on: enp5s0'

    autoshutdown[16493]: root: DEBUG: '_check_system_active(): Calling: _check_net_status()'

    autoshutdown[16493]: root: INFO: '_check_net_status(): Check connections for: enp5s0'

    autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 3840: Found no active connections'

     autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14101: Found no active connections'

     autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14102: Found no active connections'

     autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14103: Found no active connections'

     autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14104: Found no active connections'

    autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14105: Found no active connections'

     autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14106: Found no active connections'

    autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14107: Found no active connections'

    autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14108: Found no active connections'

    autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14109: Found no active connections'

    autoshutdown[16493]: root: DEBUG: '_check_net_status(): Port 14110: Found no active connections'

    autoshutdown[16493]: root: INFO: '_check_net_status(): Found 0 active socket(s) on enp5s0, from port(s): 3840,14101,14102,14103,14104,14105,14106,14107,14108,14109,14110'

    autoshutdown[16493]: root: DEBUG: '_check_system_active(): Calling: _check_docker_status()'

    autoshutdown[16493]: root: DEBUG: '_check_system_active(): Calling: _check_ul_dl_rate()'

    autoshutdown[16493]: root: INFO: '_check_ul_dl_rate(): Running on interface: enp5s0'

    autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): Actual: TX kB: 72882, RX kB: 11930'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): Previous TX kB: 60583, RX kB: 3391'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): last_checked_sec 301'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): ul_dl_increase: 15050'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): t_rx: 18441'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): diff_rx: 8539'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): t_tx: 75633'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): diff_tx: 12299'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): Check: rx_kb:11930 <= t_rx:18441'

     autoshutdown[16493]: root: DEBUG: '_check_ul_dl_rate(): Check: tx_kb:72882 <= t_tx:75633'

     autoshutdown[16493]: root: INFO: '_check_ul_dl_rate(): Network interface: enp5s0 (last 301s) DL: 28.4 kB/s, UL: 40.9 kB/s under 50 kB/s -> next check'

     autoshutdown[16493]: root: INFO: 'main(): All active checks passed, 0 cycles until shutdown...'

     autoshutdown[16493]: root: INFO: '_shutdown(): Shutdown issued: systemctl suspend'

    autoshutdown[19911]: : INFO: 'autoshutdown-restart(): Autoshutdown starting'


     autoshutdown[20381]: root: INFO: 'main(): Openmediavault-autoshutdown version: 5.1.10'

    autoshutdown[20381]: root: INFO: 'main(): Script md5sum: 797d77704d47042f9c89017df30894f2'

     autoshutdown[20381]: root: INFO: 'main(): /etc/autoshutdown.conf loaded'

     autoshutdown[20381]: root: INFO: 'main(): /etc/autoshutdown.default loaded'

     autoshutdown[20381]: root: INFO: '_check_config(): ------------------------------------------------------'

     autoshutdown[20381]: root: INFO: '_check_config(): Checking config: /etc/autoshutdown.conf'

     autoshutdown[20381]: root: WARNING: '_check_config(): CHECKCLOCKACTIVE set false not validating UPHOURS and OVERRIDEUPHOURS'

     autoshutdown[20381]: root: WARNING: '_check_config(): CHECKPROCNAMES set false not validating LOADPROCNAMES, LPREPEAT, TEMPPROCNAMES and TPREPEAT'

     autoshutdown[20381]: root: WARNING: '_check_config(): IPCHECK set false not validating RANGE'

    autoshutdown[20381]: root: WARNING: '_check_config(): HDDIOCHECK set false not validating HDDIO_RATE'

     autoshutdown[20381]: root: WARNING: '_check_config(): LOADAVERAGECHECK set false not validating LOADAVERAGE'

     autoshutdown[20381]: root: INFO: '_check_config(): Kernel 5.4.78-2-pve supports power management modes:'

     autoshutdown[20381]: root: INFO: '_check_config(): Kernel supports: HIBERNATE (suspend to DISK)'

     autoshutdown[20381]: root: INFO: '_check_config(): Kernel supports: HYBRID (suspend to RAM and DISK)'

     autoshutdown[20381]: root: INFO: '_check_config(): Kernel supports: SUSPEND (suspend to RAM)'

    autoshutdown[20381]: root: INFO: '_check_config(): SHUTDOWNCOMMAND is set to: systemctl suspend'

    autoshutdown[20381]: root: INFO: '_check_networkconfig(): ------------------------------------------------------'

     autoshutdown[20381]: root: INFO: '_check_networkconfig(): Find available network interfaces and their IPv4 addresses'

     autoshutdown[20381]: root: DEBUG: '_check_networkconfig(): Network interfaces: enp5s0'

     autoshutdown[20381]: root: DEBUG: '_check_networkconfig(): Network interfaces status: up'

     autoshutdown[20381]: root: DEBUG: '_check_networkconfig(): Network interfaces IPv4 address:'

     autoshutdown[20381]: root: DEBUG: '_check_networkconfig(): Network interfaces address valid: true'

     autoshutdown[20381]: root: INFO: '_check_networkconfig(): 'enp5s0' has IPv4 address:'

     autoshutdown[20381]: root: DEBUG: 'main(): -----------------------------------------------------'

     autoshutdown[20381]: root: DEBUG: 'main(): CYCLES: 1'

     autoshutdown[20381]: root: DEBUG: 'main(): SLEEP: 60'

     autoshutdown[20381]: root: DEBUG: 'main(): VERBOSE: true'

     autoshutdown[20381]: root: DEBUG: 'main(): FAKE: false'

     autoshutdown[20381]: root: DEBUG: 'main(): SHUTDOWNCOMMAND: systemctl suspend'

     autoshutdown[20381]: root: DEBUG: 'main(): CHECKCLOCKACTIVE: false'

     autoshutdown[20381]: root: DEBUG: 'main(): UPHOURS: 06:00..20:00'

     autoshutdown[20381]: root: DEBUG: 'main(): OVERRIDEUPHOURS: N/A'

     autoshutdown[20381]: root: DEBUG: 'main(): IPCHECK: false'

     autoshutdown[20381]: root: DEBUG: 'main(): RANGE: 2..254'

     autoshutdown[20381]: root: DEBUG: 'main(): CHECKSOCKETS: true'

     autoshutdown[20381]: root: DEBUG: 'main(): NSOCKETNUMBERS: 3840,14101,14102,14103,14104,14105,14106,14107,14108,14109,14110'

     autoshutdown[20381]: root: DEBUG: 'main(): NSOCKETIGNORESELF: false'

     autoshutdown[20381]: root: DEBUG: 'main(): HDDIOCHECK: false'

     autoshutdown[20381]: root: DEBUG: 'main(): HDDIO_RATE: 401'

     autoshutdown[20381]: root: DEBUG: 'main(): SMARTCHECK: false'

     autoshutdown[20381]: root: DEBUG: 'main(): ULDLCHECK: true'

     autoshutdown[20381]: root: DEBUG: 'main(): ULDLRATE: 50'

     autoshutdown[20381]: root: DEBUG: 'main(): LOADAVERAGECHECK: false'

     autoshutdown[20381]: root: DEBUG: 'main(): LOADAVERAGE: 40'

     autoshutdown[20381]: root: DEBUG: 'main(): LOADAVERAGE: 40'

     autoshutdown[20381]: root: DEBUG: 'main(): CHECKPROCNAMES: false'

     autoshutdown[20381]: root: DEBUG: 'main(): LOADPROCNAMES: smbd,nfsd,mt-daapd,forked-daapd'

     autoshutdown[20381]: root: DEBUG: 'main(): TEMPPROCNAMES: in.tftpd'

     autoshutdown[20381]: root: DEBUG: 'main(): PLUGINCHECK: false'

     autoshutdown[20381]: root: DEBUG: 'main(): Available plugins found in: /etc/autoshutdown.d'

     autoshutdown[20381]: root: DEBUG: 'main(): Plugin: /etc/autoshutdown.d/autounrarstatus'

     autoshutdown[20381]: root: DEBUG: 'main(): Plugin: /etc/autoshutdown.d/clamav'

     autoshutdown[20381]: root: INFO: 'main(): --------------- Initialise states --------------------'

     autoshutdown[20381]: root: INFO: '_check_ul_dl_rate(): Running on interface: enp5s0'

     autoshutdown[20381]: root: DEBUG: '_check_ul_dl_rate(): Actual: TX kB: 72926, RX kB: 11954'

     autoshutdown[20381]: root: DEBUG: '_check_ul_dl_rate(): Store new TX, RX and epoch values'

     autoshutdown[20381]: root: INFO: 'main(): ---------------- Script started ----------------------'

     autoshutdown[20381]: root: INFO: 'main(): Waiting 5 minutes until the first check'

  • aha SHUTDOWNCOMMAND="pm-suspend" the script has fully moved to systemd ether set "Suspend" in the GUI or set SHUTDOWNCOMMAND="systemctl suspend". There been a lot of changes to the script and the GUI most setting can be set in the GUI now.

    Hibernate should be similar 'systemctl hibernate' or "hibernate" in the GUI. there still a few issue to fix in the next release

    I wait for you to confirm you are working before I release all the fixed.

    Note: hybrid-sleep (Hybrid in GUI) need a fix in the next release also.

  • The thing is, on my particular system, on OMV4 with the 4.x kernel the systemctl suspend did shut down the network interface so no WOL was possible. pm-suspend on the other hand worked perfectly. I've updated to OMV5 and since the ASD Plugin didn't work I tried the proxmox kernel which is version 5.something and apparently that fixed systemctl suspend.

    I've tried the NAS a few times today and everytime the script takes a few seconds to run but it runs... so I think for me it's fixed now

  • For some reason, since the lastest update, the NAS doesn't shut down but becomes completely unavailable. Only pinging the computer works, but nothing else. I have to hard reset it.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!