ACPI poweroff mit Suse 9.0

  • Hallo,


    bei mir ging's gar nicht, weshalb ich bis zum erscheinen der Suse 9.1 auch zurück zur Suse 8.2 gewechselt bin.


    Viele Grüße


    Jürgen

    ------
    VDR
    Hardware: YeongYang A206, Mainboard Epia ME6000, TechnoTrend DVB-T, Festplatte Samsung 160 GB, ASUS WL-330g, Grafik-LCD-Modul CFAG12864BTMIV
    Software: SuSE 10.0, VDR 1.3.37, vcd-0.0.6c gepatcht, dvd-0.3.5b06, mp3-0.9.2, graphlcd-0.1.0, text2skin-0.0.2, screenshot-0.0.4b, VDRADMIN 0.96

  • Hallo Draganstuff,
    wie sieht es bei dir aus mit Suse 9.1 und ACPI?
    Bei mir klappt es nich mit dem Autostart. Ich brauche Hilfe.


    http://www.vdrportal.de/board/thread.php?threadid=21287&sid=

    TEST FOXCONN 560A "Cool`n`Quiet"
    Software: Gen2VDR V2 + vdr-1.6-ext59 + Nvram-Wakeup + KDE
    Hardware: AMD Athlon 64 X2 Dual Core 4800+, 4GB DDR2RAM, SAMSUNG SATA HD501LJ 500 GB, SAMSUNG SP2514N 250 GB, HD SV1604N 160GB, HL-DT-STDVD-RAM GSA-H58N, Cablestar2, TTDVB-C + Scart-out + ASUS-SPDIF


    Activy 300
    Software: Gen2VDR V2 + vdr-1.4.7-ext40 + STR + FreeVo (Browser, Games, ... )
    Hardware: 256MB SDRAM, HD SV1604N 160GB, DVD SD-M1612, FSDVB-C + Scart-out, Technisat Cablestar2, leise

  • Hallo,


    Mit Acpi kann ich unter Suse 9.1 den Rechner ohne Änderungen mit Powerbutten (Fernbedienung bei mir mit /etc/init.d/activyrc2) herunterfahren. Durch einige Änderungen kann ich ihn zu einer gewünchten Zeit normal wieder hochfahren lassen.


    1. Runleveleditor starten, powersaved deaktivieren, acpid aktivieren
    2. boot.clock deaktivieren oder abändern (gewußt wie?)
    3. echo "2004-08-25 23:40:02" > /proc/acpi/alarm (gewünschte Zeit)
    echo "2004-08-25 23:40:02" > /proc/acpi/alarm (gewünschte Zeit)
    4. poweroff oder herunterfahren


    Der Rechner fährt zur angegebenen Zeit wieder hoch.
    Desktopuhr geht bei mir ohne vdr 2Stunden vor (wegen boot.clock). Ich habe Systemzeit stellen in vdr egp aktiviert.
    Meine cpid_proxy habe ich noch geändert. powerbutten führt nun vdrshutdown aus.


    ...
    # needed commands
    SHUTDOWN=/_config/bin/vdrshutdown
    LOGGER="/bin/logger -t acpid_proxy[$$]"
    ...


    Leider funktionieren die Scripte von Gentoo nicht.


    linux:~ # /_config/bin/vdrshutdown
    Using acpi wakeup[/B]# hwclock --systohc --utc
    /_config/bin/acpiwake.pl ""
    Wrong parameter count
    2004-08-26 00:55:00


    acpiwake.pl, vdrshutdown und clock müßten warscheinlich an Suse angepasst werden. Leider ist das ein paar Stufen zu hoch für mich.


    Hat jemand acpi, Suse und vdr am laufen?

    TEST FOXCONN 560A "Cool`n`Quiet"
    Software: Gen2VDR V2 + vdr-1.6-ext59 + Nvram-Wakeup + KDE
    Hardware: AMD Athlon 64 X2 Dual Core 4800+, 4GB DDR2RAM, SAMSUNG SATA HD501LJ 500 GB, SAMSUNG SP2514N 250 GB, HD SV1604N 160GB, HL-DT-STDVD-RAM GSA-H58N, Cablestar2, TTDVB-C + Scart-out + ASUS-SPDIF


    Activy 300
    Software: Gen2VDR V2 + vdr-1.4.7-ext40 + STR + FreeVo (Browser, Games, ... )
    Hardware: 256MB SDRAM, HD SV1604N 160GB, DVD SD-M1612, FSDVB-C + Scart-out, Technisat Cablestar2, leise

  • Probier mal aus, ob Du statt acpiwakeup.pl mein poweroff.pl benutzen kannst.


    Schau Dir mal die letzen Befehle an, mit denen der Rechner wirklich runterfährt oder Poste mal das acpiwakeup.pl hier, oder besser im Activy-Forum.

    ... that light at the end of the tunnel is the front of an oncoming train.


    System1:
    Reelbox Avantgarde


    System2 (Backup/Spielerei)
    Software: Windows XP mit DVBViewer, Hardware: Asus Pundit, tevii s660, Nova-T USB, Tevii S660

  • Hallo,
    ich habe es Gestern zum laufen bekommen.
    -VDR fährt gewollt oder selbstständig herunter
    -startet zu Aufnahmen im Timer neu
    -timer und Aktivität werden vor herunterfahren berücksichtigt


    Meine Scipte weiter unten.
    Ein Fehler taucht jetzt jedoch auf. Weiß jemand den Grund?


    ...
    Aug 27 16:39:26 linux vdr[5169]: assuming manual start of VDR
    Aug 27 16:39:26 linux vdr[5169]: max. latency time 1 seconds
    Aug 27 16:39:40 linux vdr[5169]: connect from 127.0.0.1, port 1063 - accepted
    Aug 27 16:39:40 linux vdr[5169]: Power button pressed
    Aug 27 16:39:40 linux vdr[5169]: next timer event at Fri Aug 27 18:28:00 2004
    Aug 27 16:39:40 linux vdr[5169]: confirm: Taste drcken um Shutdown abzubrechen
    Aug 27 16:39:40 linux vdr[5194]: Text2Skin: Message display update thread started (pid=5194, tid=131080)
    Aug 27 16:39:40 linux vdr[5169]: closing SVDRP connection
    Aug 27 16:39:46 linux vdr[5194]: Text2Skin: Message display update thread ended (pid=5194, tid=131080)
    Aug 27 16:39:46 linux vdr[5169]: confirmed
    Aug 27 16:39:46 linux vdr[5169]: executing '/usr/local/src/VDRtmp/scripts/shutdown.sh 1093624080 6494 33 "Volleyball (live)" 1'
    Aug 27 16:40:02 linux vdr[5169]: max. latency time 22 seconds
    Aug 27 16:40:02 linux vdr[5169]: connect from 127.0.0.1, port 1064 - accepted
    Aug 27 16:40:02 linux vdr[5169]: ERROR (svdrp.c,362): Broken pipe
    ...


    file:/etc/init.d/boot.clock (stop deaktiviert)


    #! /bin/sh
    #
    # Copyright (c) 2001-2002 SuSE Linux AG, Nuernberg, Germany.
    # All rights reserved.
    #
    # /etc/init.d/boot.clock
    #
    ### BEGIN INIT INFO
    # Provides: boot.clock
    # Required-Start: boot.localfs
    # X-UnitedLinux-Should-Start: boot.crypto boot.swap
    # Required-Stop:
    # Default-Start: B S
    # Default-Stop:
    # Description: set cmos clock
    ### END INIT INFO


    . /etc/rc.status
    . /etc/sysconfig/clock
    rc_reset


    case "$1" in
    start|restart)
    # set and adjust the CMOS clock
    if [ "$HOSTTYPE" = "s390" -o "$HOSTTYPE" = "s390x" ] ; then
    echo -n Setting up the system clock
    # On s390 the hwclock is set outside Linux currently. The kernel
    # always assumes it to be set to UTC. So if it is set to local
    # time, we have to compensate for that. We might achieve this
    # using this special settimeofday(2) linux feature:
    # Under Linux there is some peculiar `warp clock' semantics
    # associated to the settimeofday system call if on the very
    # first call (after booting) that has a non-NULL tz argu-
    # ment, the tv argument is NULL and the tz_minuteswest field
    # is nonzero. In such a case it is assumed that the CMOS
    # clock is on local time, and that it has to be incremented
    # by this amount to get UTC system time. No doubt it is a
    # bad idea to use this feature. (settimeofday(2) man page)
    # But unless someone complains we simply will use date(1) to shift
    # the system time by the difference between UTC and local time, if
    # the system clock is set to local time. This will introduce a
    # minimal shift due to the delay between gettimeofday and
    # settimeofday, and it only works as long as $0 is executed
    # exactly once, at boot.
    if test "$HWCLOCK" != "-u"; then
    date $(date -u +'%m%d%H%M%Y')
    rc_status
    fi
    rc_status -v -r
    else
    #echo -n Setting up the CMOS clock
    test -f /etc/adjtime || echo "0.0 0 0.0" > /etc/adjtime
    /sbin/hwclock --adjust $HWCLOCK
    rc_status
    /sbin/hwclock --hctosys $HWCLOCK
    rc_status
    rc_status -v -r
    fi
    ;;
    stop)
    # if [ "$HOSTTYPE" != "s390" -a "$HOSTTYPE" != "s390x" ] ; then
    # #echo -n "Set Hardware Clock to the current System Time"
    # # write back to hardware clock and calculate adjtime
    # /sbin/hwclock --systohc $HWCLOCK
    # rc_status -v -r
    # fi
    ;;
    status)
    rc_failed 4
    rc_status -v
    ;;
    *)
    echo "Usage: $0 {start|stop|status|restart}"
    exit 1
    ;;
    esac


    rc_exit



    file:/usr/local/src/VDRtmp/scripts/poweroff.pl (5.00 Uhr Start entfernt, Pfade)


    #!/usr/bin/perl


    ##
    # by Thomas Koch <tom@linvdr.org>
    ##
    # modified by SQ


    use POSIX qw(strftime sprintf);
    use Time::Local;


    my $PROC_ALARM = "/proc/acpi/alarm";
    my $STARTUPMARGIN = "300";
    my $DEBUG = 0;


    sub dprint {
    $_ = join("", @_);
    chomp;
    print "$_\n" if($DEBUG);
    }


    sub setTime {
    system("hwclock -w");
    #"hwclock -w" "hwclock --systohc --localtime" eventl. auf "hwclock --systohc --utc"
    }


    sub setAlarm {
    my $Next = shift;
    dprint("Next event at ", strftime("%d.%m.%Y %H:%M:%S", localtime($Next)));
    dprint("Programming wakeup at ", strftime("%d.%m.%Y %H:%M:%S", localtime($Next-$STARTUPMARGIN)));
    system(sprintf("echo \"%s\" > %s", strftime("%Y-%m-%d %H:%M:%S", localtime($Next-$STARTUPMARGIN)), $PROC_ALARM));
    system(sprintf("echo \"%s\" > %s", strftime("%Y-%m-%d %H:%M:%S", localtime($Next-$STARTUPMARGIN)), $PROC_ALARM));
    }


    sub setNoAlarm {
    # turns alarm off, on most mainboards
    setTime();
    print("No timers defined!");
    system(sprintf("echo \"2004-08-17 99:00:00\" > %s", $PROC_ALARM));
    system(sprintf("echo \"2004-08-17 99:00:00\" > %s", $PROC_ALARM));
    }


    sub PowerOff {
    system("/sbin/poweroff") if(!$DEBUG);
    }




    if(scalar(@ARGV)) {
    # called from vdr
    die "Wrong parameter count\n" if(scalar(@ARGV) != 5);
    die "$PROC_ALARM missing" if(!-e $PROC_ALARM);

    my($Next, $Delta, $Channel, $Recording, $UserShutdown) = @ARGV;

    # find out: Next start at 5:00 or at next timer?
    if($Next) {
    setAlarm($Next);
    } else {
    setAlarm($FiveOclock);
    }
    PowerOff();


    } else {
    # called from cmdline
    $next = `svdrpsend.pl next abs`;
    if($next =~ /550 No active timers/) {
    setNoAlarm();
    PowerOff();
    } elsif($next =~ /250 \d+ (\d+)/) {
    # find out: Next start at 5:00 or at next timer?

    setAlarm($1);

    PowerOff();
    } else {
    print "HELP! What to do? ($next)\n";
    }
    }



    file:/usr/local/src/VDRtmp/scripts/shutdown.sh



    #!/bin/bash


    VDR="`/bin/ps -A | grep -w 'vdr' | wc -l`"


    EVENTMSG0="VDR NOT RUNNING , PROCESSES: "
    SHUTDOWNCMD="/usr/local/src/VDRtmp/scripts/poweroff.pl"


    EVENTMSG1="VDR IS RUNNING , TRY TO SEND HITK POWER ,PROCESSES: "
    VDRSHUTDOWNCMD="/usr/local/bin/svdrpsend.pl HITK Power"


    if [ $VDR -eq 0 ] ; then


    echo "$EVENTMSG0 $VDR"
    $SHUTDOWNCMD


    else


    echo "$EVENTMSG1 $VDR"
    $VDRSHUTDOWNCMD


    fi

    TEST FOXCONN 560A "Cool`n`Quiet"
    Software: Gen2VDR V2 + vdr-1.6-ext59 + Nvram-Wakeup + KDE
    Hardware: AMD Athlon 64 X2 Dual Core 4800+, 4GB DDR2RAM, SAMSUNG SATA HD501LJ 500 GB, SAMSUNG SP2514N 250 GB, HD SV1604N 160GB, HL-DT-STDVD-RAM GSA-H58N, Cablestar2, TTDVB-C + Scart-out + ASUS-SPDIF


    Activy 300
    Software: Gen2VDR V2 + vdr-1.4.7-ext40 + STR + FreeVo (Browser, Games, ... )
    Hardware: 256MB SDRAM, HD SV1604N 160GB, DVD SD-M1612, FSDVB-C + Scart-out, Technisat Cablestar2, leise

  • Der VDR gibt den Fehler beim Hochfahren aus. Das sollte aber nix mit den poweroff-Skripten zu tun haben???

    ... that light at the end of the tunnel is the front of an oncoming train.


    System1:
    Reelbox Avantgarde


    System2 (Backup/Spielerei)
    Software: Windows XP mit DVBViewer, Hardware: Asus Pundit, tevii s660, Nova-T USB, Tevii S660

  • Hallo,
    der Fehler kam erst mit dem einbinden von svdrpsend.pl, also beim ausführen von shutdown.sh


    ...
    EVENTMSG1="VDR IS RUNNING , TRY TO SEND HITK POWER ,PROCESSES: "
    VDRSHUTDOWNCMD="/usr/local/bin/svdrpsend.pl HITK Power"
    ...


    ohne das fährt der Rechner zwar mit neuer Aufwachzeit herunter, nimmt aber keine Rücksicht auf Aufnahmen, Timer und Nutzeraktivität.

    TEST FOXCONN 560A "Cool`n`Quiet"
    Software: Gen2VDR V2 + vdr-1.6-ext59 + Nvram-Wakeup + KDE
    Hardware: AMD Athlon 64 X2 Dual Core 4800+, 4GB DDR2RAM, SAMSUNG SATA HD501LJ 500 GB, SAMSUNG SP2514N 250 GB, HD SV1604N 160GB, HL-DT-STDVD-RAM GSA-H58N, Cablestar2, TTDVB-C + Scart-out + ASUS-SPDIF


    Activy 300
    Software: Gen2VDR V2 + vdr-1.4.7-ext40 + STR + FreeVo (Browser, Games, ... )
    Hardware: 256MB SDRAM, HD SV1604N 160GB, DVD SD-M1612, FSDVB-C + Scart-out, Technisat Cablestar2, leise

  • Ich verstehe trotzdem nicht was das mit dem hochfahren zu tun hat???

    ... that light at the end of the tunnel is the front of an oncoming train.


    System1:
    Reelbox Avantgarde


    System2 (Backup/Spielerei)
    Software: Windows XP mit DVBViewer, Hardware: Asus Pundit, tevii s660, Nova-T USB, Tevii S660

  • Hallo,
    war ein Mißverständniss. Ich habe vorher poweroff.pl selber zum herunterfahren benutzt, bricht natürlich VDR abrupt ab, Timer setzt aber korrekt den Autostart.
    shutdown.sh soll dazu führen das Timeraufnahmen(mindest Event Pause) und Nutzeraktivitäten berücksichtigt werden, deshalb habe ich poweroff.pl für das herunterfahren dort eingebunden. Zeit zum nächsten hochfahren wird also gesetzt und Gründe gegen das herunterfahren berücksichtigt.
    Jetzt will ich über den Powerbutten abschalten, es kommt die Meldung: Taste drücken um Shutdown zu verhindern, Meldung verschwindet aber wieder schnell und der Rechner fährt nicht herunter. Das war der Zeitpunkt der Fehlermeldung.


    ...
    Aug 27 16:40:02 linux vdr[5169]: connect from 127.0.0.1, port 1064 - accepted
    Aug 27 16:40:02 linux vdr[5169]: ERROR (svdrp.c,362): Broken pipe
    ...

    TEST FOXCONN 560A "Cool`n`Quiet"
    Software: Gen2VDR V2 + vdr-1.6-ext59 + Nvram-Wakeup + KDE
    Hardware: AMD Athlon 64 X2 Dual Core 4800+, 4GB DDR2RAM, SAMSUNG SATA HD501LJ 500 GB, SAMSUNG SP2514N 250 GB, HD SV1604N 160GB, HL-DT-STDVD-RAM GSA-H58N, Cablestar2, TTDVB-C + Scart-out + ASUS-SPDIF


    Activy 300
    Software: Gen2VDR V2 + vdr-1.4.7-ext40 + STR + FreeVo (Browser, Games, ... )
    Hardware: 256MB SDRAM, HD SV1604N 160GB, DVD SD-M1612, FSDVB-C + Scart-out, Technisat Cablestar2, leise

Jetzt mitmachen!

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