Hallo,
kann mir einer verraten wie's geht?.
ACPI poweroff mit Suse 9.0
- draganstuff
- Geschlossen
-
-
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
-
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=
-
@ netz
Suse 9.1 hab ich net.
Ich will doch selber wissen wie's geht -
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 herunterfahrenDer 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:00acpiwake.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?
-
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.
-
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ücksichtigtMeine 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_resetcase "$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
;;
esacrc_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 SQuse 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"
$SHUTDOWNCMDelse
echo "$EVENTMSG1 $VDR"
$VDRSHUTDOWNCMDfi
-
Der VDR gibt den Fehler beim Hochfahren aus. Das sollte aber nix mit den poweroff-Skripten zu tun haben???
-
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.
-
Ich verstehe trotzdem nicht was das mit dem hochfahren zu tun hat???
-
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
...
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!