Kirjoittaja Aihe: mythwelcome/mythshutdown ja herääminen Mythbuntu 9.04:ssa[RATKAISTU]  (Luettu 2162 kertaa)

samihs72

  • Käyttäjä
  • Viestejä: 841
    • Profiili
Moi,

Olen yrittänyt saada toimimaan RTC Wakeup:ia omalla emollani. Sammutus toimii mythwelcome/mythshutdown:lla OK. Mutta heräämistä en saa toimimaan..  ???

KYSYMYS: Voiko tuon heräämisen rakentaa jotenkin muuten näppärästi kuin RTC:llä, jos sitä ei saa toimimaan? NVRAM Wakeup:lla?

Olen asettanut BIOS:sta RTC Wakeup päälle ja mun emossa (asus m3a78-em) sille pitää määrittää jokin heräämisaika defaulttina.. Onko oikein asettaa tuo RTC Wakeup päälle? Mythtv:n Wikin mukaan kyllä mutta siellä on aika vanhentunutta tietoa paikka paikoin..

Olisin toooodella kiitollinen avusta!

mythbackend.log kirjoittaa seuraavaa:

Koodia: [Valitse]
2009-07-24 21:24:41.902 CheckShutdownServer returned - OK to shutdown
2009-07-24 21:24:41.911 Running the command to set the next scheduled wakeup time :-
                                                sudo -H mythshutdown --setwakeup "2009-07-24 21:46:40"
2009-07-24 21:24:42.073 Running the command to shutdown this computer :-
                                                sudo -H mythshutdown --shutdown
date: invalid date `1248461200  +0300'
date: invalid date `1248461200 '
Running /usr/bin/MythWakeSet to set the wakeup time to 1248461200
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo  > /sys/class/rtc/rtc0/wakealarm
rtc_time        : 18:24:42
rtc_date        : 2009-07-24
alrm_time       : 18:29:42
alrm_date       : ****-**-24
alarm_IRQ       : no
alrm_pending    : no
24hr            : yes
periodic_IRQ    : no
update_IRQ      : no
HPET_emulated   : yes
DST_enable      : no
periodic_freq   : 1024
batt_status     : dead
2009-07-24 21:24:44.247 I'm idle now... shutdown will occur in 120 seconds.

Olen tehnyt seuraavat asiat:

- Tehdään skripti MythWakeSet:
Koodia: [Valitse]
# MythWakeSet
#
# set mythtv wake-up time with UTC-adjusted time
#
# use: MythWakeSet date time
# ex.: MythWakeSet 2008-11-02 20:15:00
# See also 'man date' for date/time-formats.

# TimeZone, use +0100 for GMT+1
#TZ="+0100"
TZ=$(date +%z)

LOG=/var/log/mythtv/mythbackend.log

DATE=$(date -d "$1 $2 $TZ" "+%F %H:%M:%S" -u)
SECS=$(date -d "$1 $2" "+%s")

echo Running $0 to set the wakeup time to $1 $2 >>$LOG

if [ -e /sys/class/rtc/rtc0/wakealarm ]; then
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo $SECS > /sys/class/rtc/rtc0/wakealarm
echo "echo 0 > /sys/class/rtc/rtc0/wakealarm" >>$LOG
echo "echo $SECS > /sys/class/rtc/rtc0/wakealarm" >>$LOG
cat /proc/driver/rtc >>$LOG
else
if [ -e /proc/acpi/alarm ]; then
echo $DATE > /proc/acpi/alarm
echo "echo $DATE > /proc/acpi/alarm" >>$LOG
else
echo "ERROR, Wakeup not set, no /sys/class/rtc/rtc0/wakealarm and no /proc/acpi/alarm found" >>$LOG
fi
fi

- kopioidaan MythWakeSet /usr/bin hakemistoon ja annetaan ajo-oikeudet
Koodia: [Valitse]
$ chmod +x MythWakeSet
$ sudo cp MythWakeSet /usr/bin

- Backend:n sleep/wake parametrit kuntoon:
Koodia: [Valitse]
   
$ sudo /etc/init.d/mythtv-backend stop
$ mythtv-setup
        Parametrit:
        Proceed to general>Shutdown/Wakeup Options
        untick Block shutdown before client connected
        Set idle shutdown timeout (secs): 120
        Set Max. wait for recordings (min): 15
        Set Startup before rec (secs): 200
        Set Wakeup time format: yyyy-MM-dd hh:mm:ss
        Set Command to set Wakeup Time: sudo -H mythshutdown --setwakeup "$time"
        Set Server Halt command: sudo -H mythshutdown --shutdown
        Set pre shutdown check-command: mythshutdown --check

- konfiguroidaan mythwelcome
Koodia: [Valitse]
$mythwelcome --setup
        set nvram-wakeup Command: sudo -H /usr/bin/MythWakeSet "$time"
        set nvram-wakeup Restart Command: JÄTÄ TYHJÄKSI!!
        set Command to reboot: sudo -H shutdown -h -r now
        set Command to shutdown: sudo -H shutdown -h -P now

- asetetaan mythwelcome käynnistymään startin yhteydessä:
Koodia: [Valitse]
   
$sudo cp /etc/mythtv/session-settings /etc/mythtv/session-settings.old
$sudo gedit /etc/mythtv/session-settings
    - poista kommentti tämän rivin edestä: MYTHWELCOME=true

- Estetään mythfrontendiä käynnistymästä automattisesti mythwelcome käynnistymisen yhteydessä:

    - Paina "m" mythwelcome ikkunassa ja valitse "lukitse sammutus pois".
    - Paina "i" mythwelcome ikkunassa ja poista optio "Käynnistä MythTV automaattisesti" päältä.
« Viimeksi muokattu: 12.09.09 - klo:12.35 kirjoittanut samihs72 »
Desktop:HP Pavilion h8-1111sc Core i5-2320/8 GB/1.5 TB/GeForce GT 530 2 GB/Windows 10 64-bit,  Ubuntu 22.04 Jammy Jellyfish
RPi 4B Nextcloudpi

samihs72

  • Käyttäjä
  • Viestejä: 841
    • Profiili
Näin sain toimimaan!

http://forum.ubuntu-fi.org/index.php?topic=28617.msg222730#msg222730


EDIT: Ja kiitos majatalo ja tuke81 avustanne!!!
« Viimeksi muokattu: 12.09.09 - klo:12.43 kirjoittanut samihs72 »
Desktop:HP Pavilion h8-1111sc Core i5-2320/8 GB/1.5 TB/GeForce GT 530 2 GB/Windows 10 64-bit,  Ubuntu 22.04 Jammy Jellyfish
RPi 4B Nextcloudpi