How to reboot after a S3 wake-up?

  • Hi.


    How can I configure a complete reboot after waking-up from a S3 state?
    Is it possible to configure by adding some line to an starting script?
    I want to do that to clean the system (RAM).


    Regards.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • jbjbjb


    One way might be, to define a key combination from remote control as initiator for a reboot, e.g. create a file".lircrc" in home of vdr-user, e.g. "/home/vdr/.lircrc":


    Code
    begin
    	prog   = irexec
    	button = Stop
    	button = Stop
    	button = Stop
    	button = Stop
    	config = /sbin/reboot
    end

    Put "/sbin/reboot" into "/etc/sudoers"


    Code
    #/> EDITOR=vi sudo -E visudo
    ...
    vdr ALL=NOPASSWD:/sbin/reboot
    <BLANK LINE>

    Put this to the end of the file and don't forget the very last line has to be a blank one.


    Then define anywhere an automatic start with the environment of vdr-user of, e.g. "/home/vdr/.config/openbox/autostart.sh" if you use Openbox:


    Code
    /usr/bin/irexec -d /home/vdr/.lircrc &

    With this example the VDR box will be reboot after pressing the Stop key 4x. Four times to prevent reboot by accident and the stop key, because it is used rarely and does not disturb the normal VDR operation.


    Regards
    fnu

    HowTo: APT pinning

    3 Mal editiert, zuletzt von fnu ()

  • Zitat

    Originally posted by steffen_b
    Why would you want to do that ? Then you can configure normal shutdown or the fake-S4 in case you need that for remote wakeup.


    Well, you are right, I should try if the computer is able to wake-up from the normal shutdown. I will try.


    Thanks both of you for the answers, a great idea the use of stop key when pressed four times.
    Thanks.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Hi.


    It seems that the automatic wake-up from total shutdown does not work.


    Thanks.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • It seems that is only possible S3 and S4. Thanks.


    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Hi,


    may be you'd like to ask e-tobi - afaik he has a working vdr with s3-acpi-wakeup.


    I tried the same with an AT3N7A and had to give up. The acpi-events worked only with the testscript.
    Using the vdrs shutdown-wrapper no acpi-event rised on wakeup - so there was no trigger to work with.
    After all I changed vdr MB to a gigabyte wich works fine with acpi.


    kind regards


    Gero

    Ich bin verantwortlich für das, was ich schreibe, nicht für das, was Du verstehst!

  • If I copy this script:


    Bash
    #!/bin/sh
    case $1 in
    resume)
    /sbin/reboot
    ;;
    esac


    in /etc/pm/sleep.d/


    Can it work and reboot the system after wake-up from S3?


    Regards
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

    Einmal editiert, zuletzt von jbjbjb ()

  • Zitat

    Original von jbjbjb
    Can it work and reboot the system after wake-up from S3?


    It is possible, but you risk that the next fsck will hit you soon and your recording starts too late. I don't understand why you don't follow steffen_b's advise and try fake-s4?


    Gerald


    HP Proliant MicroServer Gen8, Xeon E3-1230, 12 GB RAM, 3xWD red 2TB im RAID 5, 2xSundtek MediaTV Home DVB-C/T, L4M TWIN-C/T, Ubuntu Server 14.04.1, Plex Media Server
    Samsung UE55H6470

  • Zitat

    Originally posted by gda


    It is possible, but you risk that the next fsck will hit you soon and your recording starts too late. I don't understand why you don't follow steffen_b's advise and try fake-s4?


    Gerald


    Well, I can try but I do not know how. Can I read how to configure in any web page?


    Regards
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

    Einmal editiert, zuletzt von jbjbjb ()

  • Zitat

    Original von gda
    I don't understand why you don't follow steffen_b's advise and try fake-s4?
    Gerald


    Maybe because he has more processes running than you think and does not want to ruin data.
    From my point of view doing a s2disk and afterwards simply booting is highly dangerous for your data not to mention consistency.
    Just imaging a user runs a vm under yavdr - the way yavdr simply drops all processes is almost guaranteed to kill the filesystem on the vm-disk.
    Or think about a local rsync process to backup your data to another harddrive. With working s2ram or s2disk this is no problem, your data will be back upped completely regardless how many suspends the pc does in between while your fake-S4 might simply stop the backup procedure without even telling you.


    And please don't get me wrong, I think that yavdr is a great distribution, but you should make it
    a) more obvious for users that you do not make a real s2disk in the web-menu and warn about the potential dataloss your fake-S4 might include
    b) make a second entry for real S4 so the user has a choice to choose this way


    I can't even see a real speed advantage of not resuming, it takes only 3 more seconds to come back to a working vdr from real S4 than from fake-S4 - and that is on a plain yavdr. As soon as more processes run (like a vm) this dramatically changes to real S4 beeing much faster than fake-S4. And btw, the 3 seconds come from VDR + Frontend starting up after resume, showing a live picture for about half a second and than restarting the frontend - showing the shutdown animation and coming back up again.
    If you ask me I will always trade 3 seconds per vdr resume for data security.

    Server: Athlon II X2 250 - Asus M3N-H HDMI - 2x1GB RAM - 3TB HDDs -
    1 x Digital Devices Cine S2 V6 DVB-S2 (SD Sender im Highband funktionieren mit der Karte nach wie vor unter Linux nicht, unter Windows schon)
    3 x Nova Budget (die ich eigentlich durch die Cine S2 mit Erweiterungsmodul ersetzen wollte, leider aber für die SD Sender immer noch brauche)
    mit yavdr 0.4.0

  • Anyway S4 will not work for him. USB Wakeup is only working in S3 for him. Yes the script mentioned should work. I still dont get why you would wont that, but that doesnt matter, its not my computer its yours , so you can do whatever you want :)


    geronimo: acpi-wakeup is working in yavdr for machines for that its working. We are talking about usb wakeup i believe.


    Egalus: The fake-S4 has been done for crappy hardware which can not be get to work otherwise. So most likely for this hardware the S4 will not work fully. But I DO agree that the web interface should be more obvious on what its doing and that its only last resort.

    VDR User: 87 - LaScala LC14B - LG/Phillipps 6,4" VGA Display | Asrock H61/U3S3 | G630T | 1x 16GB Mobi Mtron 3035 1x WD 750GB 2,5" |1x L4m DVB-S2 Version 5.4

  • Sorry, my knowledge of linux is by far ...far.. lower than yours.


    The problem I have with suspend to disk (selected from web interface) is that I can not start from remote control and when the computer starts it allways make a check disk (I do not know why).


    I only want that, after reboot from S3, the RAM and the processes of the computer, remain as if it was a clean startup, that is why I want start from S3 and reboot inmediately.


    Is it dangerous? If you say that, I will not do that, and I would rather let the computer allways on.


    Regards.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

    2 Mal editiert, zuletzt von jbjbjb ()

  • Zitat

    Original von jbjbjb
    I only want that, after reboot from S3, the RAM and the processes of the computer, remain as if it was a clean startup


    Okay, but why do you want this?


    Gerald


    HP Proliant MicroServer Gen8, Xeon E3-1230, 12 GB RAM, 3xWD red 2TB im RAID 5, 2xSundtek MediaTV Home DVB-C/T, L4M TWIN-C/T, Ubuntu Server 14.04.1, Plex Media Server
    Samsung UE55H6470

  • Zitat

    Originally posted by gda


    Okay, but why do you want this?


    Gerald


    Well, I may be wrong, but I think that the system will work better from a clean startup than from a previous not clean state. Please, tell me if I am saying a nonsense!!!


    Thanks.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

  • Zitat

    Original von jbjbjb


    Well, I may be wrong, but I think that the system will work better from a clean startup than from a previous not clean state. Please, tell me if I am saying a nonsense!!!


    How do you define better? It works, or it works not. If parts of the system do not work after S3 you have to take measures to let them work after resume. This is not Windows, where you have difficulties to see what is happening before suspend and after resume. To reboot without specific reasons is indeed nonsense.


    Gerald


    HP Proliant MicroServer Gen8, Xeon E3-1230, 12 GB RAM, 3xWD red 2TB im RAID 5, 2xSundtek MediaTV Home DVB-C/T, L4M TWIN-C/T, Ubuntu Server 14.04.1, Plex Media Server
    Samsung UE55H6470

    Einmal editiert, zuletzt von gda ()

  • ok, thanks. Then, it is a nonsense because as far as I know, I do not have dificulties. I just want to prevent them (like windows systems).


    Thanks again. I can forget the subject then. Sorry for the inconvenience.


    Regards.
    jbjbjb

    VDR 1: Intel NUC6i5SYK || SSD 128Gb M.2 2242 ADATA PREMIER || External HD: W.D. Elements 5 Tb || RAM: 4 Gb KINGSTON HYPERX IMPACT − DDR4 || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || easyVdr 3.0
    VDR 2: Xtreamer Ultra || HD 2 Tb || RAM: 4 Gb || Remote compatible Microsoft Media Center || 3 tuners pctv nanoStick || yaVdr 0.6
    VDR 3: Siemens Gigaset M740 AV + HD Western Digital "My Book Essential-2, 1Tb" (6 partitions ext2) || VDR-NG-EM 0.6 Pro - Rev 844

Jetzt mitmachen!

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