Autoshutdown and TVHeadend SleepScript wont work

  • Hello,


    on my NAS i got TVHeadend and autoshutdown plugin.
    When nobody use the NAS it goes sucessfully in suspend-hybrid...


    But when i wake up the NAS TVHeadend wont work.


    So i have this script which works perfectly when i go over Terminal in suspend-hybrid and wake up. But when it goes with autoshutdown in suspend it wont work.


    Here the script:



    Can someone help me why it wont work with ASD??


    The script is in: /etc/pm/sleep.d

  • Sorry that was wrong from me.
    My Version is OMV 3.0.86 which based on Debian 8.


    When i test it with inid or systemctl to stop tvheadend and suspend the modul in Terminal it works.
    When it goes in suspend from autoshutdown plugin in both things it wont stop and start.


    After wake up, TVH is not available.


    In Extra options there is only: TEMPPROCNAMES="-"


    PM is activate on server. Dont know why it only goes in Terminal and not with the plugin

  • Hello everybody,
    I have a similar problem and even with searching the forums I am not able to fix it. I am using TV Headend on OMV 3.0, everything works fine without suspending. Since there were some problems on pm-suspend with tvheadend and the dvr card I had to create a script in /etc/pm/sleep.d and define the suspend modules, I come across this in another Forum (https://forum.kodi.tv/showthread.php?tid=125819).


    After I set everything up, I tested it with pm-suspend in ssh, everything worked. But when it is suspending the Autoshutdown Addon, it is not working. Some of my approaches:


    1. Adding the script as well to /usr/lib/pm-utils/sleep.d


    --> Not working


    2. SHUTDOWNCOMMAND="systemctl suspend"


    --> TV-Headend is still working but somehow the DVR Card is gone.


    Since I read here (autoshutdown-plugin prevents execution of anacron after suspend) that the Autoshutdown Addon is using a different version of pm-suspend, it would help me a lot if I just can make it, take the one I am executing in ssh. I searched for it in all the scripts but I didn't find anything.



    After a long search, it would be very helpful if anyone could help me or give me a hint on that! :)

  • Interesting. I was facing the problem the last days and couldn't find a solution (till today - read the next words). I was trying hibernation, hybrid-hibernation and suspend but no chance to get the service-script to work.
    After suspend tvheadend complies that there's no free adapter available. That means before suspend/hiberantion... the modules for the TV-card are unloaded but not loaded after resume.
    I also tried to use a script unter "pm-utils". This worked but only when you send the server via command line to suspend. So I found out that the "Autoshutdown-Plugin is the reason for that.
    During searching for a solution I found this posting here. So I made this changes under

    Code
    /etc/systemd/system/oscam.service


    and also the changes in


    Code
    usr/share/openmediavault/mkconf/autoshutdown

    and after a reboot everything worked like a charm. Of course I had to make the service under



    Code
    /etc/systemd/system/

    again.



    @RainerUwe


    What kind of tv-card are you using?


    @ryecoaaron


    You posted here that you committed this changes. Unfortunately they're not in the Autoshutdown-Plugin (I use OMV v4 with all the latest updates and the ASP from the omv-extra-Repo). Also the others changes there are not in the ASP. Would you be so kind and update the ASP so that these problems here are gone?


    Thanks in advance

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

  • @Huberer Thank you!



    I made those changes and in the autoshutdown log, I can see, that it is now using 'systemctl suspend' as shutdown command. After I send a wol it woke up and to my surprise this time TV-Headend was running. Before the modification, this was not the case. So I tried to watch something, and then got the following errors:



    2018-02-17 mpegts: 11347V in Astra 19.2 - tuning on Montage Technology M88RS6000 : DVB-S #0
    2018-02-17 diseqc: failed to set voltage (e=No such device or address)
    (My TV-Card is DVBSky S952 V3)



    For pm-utils I had to define "SUSPEND_MODULES" which I found using "lsmod | grep dvb" (which were in my case "dvb-core rc_dvbsky rc_core"). With this modification, I could easily, watch something from TV-Headend, send a pm-suspend(via ssh), send wol, continue watching (i repeated that several times).



    It is strange for me that, after pm-suspend from autoshutdown-plugin, tv-headend was not avaliable and 'lsmod | grep dvb' had an empty output. After the modification, I made TV-Headend is available and 'lsmod | grep dvb' is returning the modules as if they were oke. You mentioned that you had setup scripts under 'pm-utils', is there maybe a different source now for systemctl and I have to suspend the modules in a different way.


    In fact, I tested, after autoshutdowns systemctl suspend I send a wol, tested tv_headend stream (not working with the already mentioned error), executed pm-suspend from terminal, send wol, tested tv_headend stream --> and it worked!



    At the moment I am very confused, it would be very nice if you could help me with that.

  • @RainerUwe


    delete the old stuff in pm-utils and I guess you're speaking german so have a look here. Your error means that tvheadend is loaded but not the modules (smipcie, m88rs6000t, m88ds3103 and deb_core).
    This is what works right now for me after the modification of the autoshutdown.service.
    This is how my dvbsky-sleep.service looks like (I use the DVBSky S952 v3 too - see my signature):





    As you can see I use suspend.target instead of sleep.target (the script in the above link) because I use suspend under ASP.
    With

    Code
    systemctl enable dvbsky-sleep.service

    you can enable the service. Afterwards do a reboot.
    This works right now after (at least) 100.000 failed tests (because of this wrong settings in the autoshutdown.service).

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

  • @Huberer Thank you!


    Somehow the dvbsky-sleep.service wasn't staring at boot, but maybe I will have to search for any old scripts in /pm/.. Anyway when I start the service manual with systemctl status dvbsky-sleep.service everything is working! :)


    Thank you very much for your help!
    Schönen Tag noch. :P

    • Offizieller Beitrag

    Would you be so kind and update the ASP so that these problems here are gone?

    As with all changes to the script in that plugin, I don't have a way to test. So, if you could test and report back, I will update the repo.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • As with all changes to the script in that plugin, I don't have a way to test. So, if you could test and report back, I will update the repo.

    @ryecoaaron


    After some days of testing I can say that with these changes here and here (the others I haven't tested because of time lack) the Autoshutdown-Plugin runs great. Especially the changes from the first link are top because they made it possible to run my own script in /etc/systemd/system.


    I guess that the other posted changes are also good to be updated.


    Would you be so kind and update the plugin with all the commits?


    Thanks in advance

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

    • Offizieller Beitrag

    Would you be so kind and update the plugin with all the commits?

    Done.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!


  • Done.

    Thank you

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

  • @ryecoaaron


    I read in another forum that there're still problems with the ASP under OMV v3 (no updated commits). Did you only updated the plugin under OMV v4? I can't test because my server is running under OMV v4.

    OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 1x 10TB WD Red Pro, 1x 3TB WD Red (both basic setup) - Digibit R1 Sat-IP-Server with SatIP-Axe-Firmware


    OMV-Server-SW: Debian Buster with Proxmox kernel (always up-to-date), OMV v5 (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Docker with PlexMediaServer, TVHeadend, any many more


    BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2

    • Offizieller Beitrag

    I read in another forum that there're still problems with the ASP under OMV v3 (no updated commits). Did you only updated the plugin under OMV v4?

    I did only update the v4 plugin. Because I don't use this plugin, I have no idea when the changes work on OMV 3.x as well. Just because they are both systemd doesn't mean the solution works. I would also think any OMV 3.x version issues would have been mentioned by now? Posts on another forum will never be seen by someone who can make changes.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!