Difference between revisions of "User:Xavier"
(→Wake On LAN) |
m (→Auto shutdown) |
||
(One intermediate revision by the same user not shown) | |||
Line 55: | Line 55: | ||
# $1 is the --settime switch that nvram-wakeup normally expects | # $1 is the --settime switch that nvram-wakeup normally expects | ||
# $2 is the date/time in seconds since 1970 | # $2 is the date/time in seconds since 1970 | ||
− | |||
DATE=`date -d "1970-01-01 $2 sec" "+%F %H:%M:%S" -u` | DATE=`date -d "1970-01-01 $2 sec" "+%F %H:%M:%S" -u` | ||
SECS=`date -d "1970-01-01 $2 sec" "+%s" -u` | SECS=`date -d "1970-01-01 $2 sec" "+%s" -u` | ||
− | + | ||
+ | MOUNTPOINTS="/dex/sda1 /dev/sda3" | ||
+ | |||
+ | #We need an early boot when fsck check drives at boot time | ||
+ | earlyBoot=0 | ||
+ | echo "Next Boot = $DATE" | ||
+ | |||
+ | for MOUNTPOINT in $MOUNTPOINTS; do | ||
+ | echo "mountpoint $MOUNTPOINT" | ||
+ | nextCheck=`sudo tune2fs -l /dev/sda1 | sed -n "s/Next check after:[ ]*\(.*\)/\1/p"` | ||
+ | echo next Check `date -d "$nextCheck" "+%F %H:%M:%S" -u` | ||
+ | nextCheck=`date -d "$nextCheck" +%s` | ||
+ | if [ $SECS -gt $nextCheck ];then | ||
+ | earlyBoot=1 | ||
+ | break | ||
+ | fi | ||
+ | mountCount=`sudo tune2fs -l /dev/sda1 | sed -n "s/Mount count:[ ]*\([0-9]*\)/\1/p"` | ||
+ | maxMountCount=`sudo tune2fs -l /dev/sda1 | sed -n "s/Maximum mount count:[ ]*\([0-9]*\)/\1/p"` | ||
+ | if [ $(( $mountCount + 1 )) -ge $maxMountCount ]; then | ||
+ | echo "Maximum mount count ($maxMountCount) will be reached (current $mountCount)" | ||
+ | earlyBoot=1 | ||
+ | break | ||
+ | fi | ||
+ | done | ||
+ | |||
+ | SECS=$(( $SECS - 20 * 60 )) | ||
+ | DATE=`date -d "1970-01-01 $SECS sec" "+%F %H:%M:%S" -u` | ||
+ | |||
# Save the wakeup time | # Save the wakeup time | ||
echo "$*" > /myth.wakeup.args | echo "$*" > /myth.wakeup.args | ||
Line 73: | Line 99: | ||
echo $DATE > /proc/acpi/alarm | echo $DATE > /proc/acpi/alarm | ||
fi | fi | ||
− | + | I think I found this script on the wiki, I modify it to start 20min earlier if fsck is suppose to run at the next boot. | |
− | |||
− | |||
== TODO == | == TODO == |
Latest revision as of 21:14, 16 August 2008
Few thing I need to write down to remember .... I wished I did it earlier, before I forget half of the problems I had. :(
Hardware
- Zalman HD160XT Plus
- This case is good but a bit big. It took me a while to find a cornet TV Unit wide and deep enough
- Also none of the buttons, remote or touch screen work yet. As far as I know, no driver are available. (Imon inside). I did start to decode the protocol but didn't have enough time to do a driver yet.
- Asus P5KC
- Intel Core Duo
- CPU Fan CNPS7700-Cu
- I am very please with it, It turn at 1200 rpm very silently and still do a very good job. Highly recommanded.
- Hauppauge HVR-1300
- This is a Hybrid Analog(mpeg2 encoder)/Digital card. So far, I didn't manage to make both working at the same time or as shared card. The Freeview tuner works very when I could only use the analog with a mpeg4 software encoder.
lspci
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 02) 00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) 00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) 00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 02) 00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801IB (ICH9) 2 port SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02) 01:00.0 VGA compatible controller: nVidia Corporation GeForce 8500 GT (rev a1) 02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0) 03:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 03) 03:00.1 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 03) 05:02.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05) 05:02.1 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05) 05:02.2 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05) 05:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev c0)
Software
- Ubuntu 7.10
- MythTV trunk Frontend and Backend
Wake On LAN
To activate WOL for my on board NIC, I need to use the driver ftp://ftp.hogchain.net/pub/linux/attansic/kernel_driver/ And add in /etc/rc.local
ethtool -s eth0 wol g
Auto shutdown
Script use to set the ACPI Alarm
#!/bin/sh # $1 is the --settime switch that nvram-wakeup normally expects # $2 is the date/time in seconds since 1970 DATE=`date -d "1970-01-01 $2 sec" "+%F %H:%M:%S" -u` SECS=`date -d "1970-01-01 $2 sec" "+%s" -u` MOUNTPOINTS="/dex/sda1 /dev/sda3" #We need an early boot when fsck check drives at boot time earlyBoot=0 echo "Next Boot = $DATE" for MOUNTPOINT in $MOUNTPOINTS; do echo "mountpoint $MOUNTPOINT" nextCheck=`sudo tune2fs -l /dev/sda1 | sed -n "s/Next check after:[ ]*\(.*\)/\1/p"` echo next Check `date -d "$nextCheck" "+%F %H:%M:%S" -u` nextCheck=`date -d "$nextCheck" +%s` if [ $SECS -gt $nextCheck ];then earlyBoot=1 break fi mountCount=`sudo tune2fs -l /dev/sda1 | sed -n "s/Mount count:[ ]*\([0-9]*\)/\1/p"` maxMountCount=`sudo tune2fs -l /dev/sda1 | sed -n "s/Maximum mount count:[ ]*\([0-9]*\)/\1/p"` if [ $(( $mountCount + 1 )) -ge $maxMountCount ]; then echo "Maximum mount count ($maxMountCount) will be reached (current $mountCount)" earlyBoot=1 break fi done SECS=$(( $SECS - 20 * 60 )) DATE=`date -d "1970-01-01 $SECS sec" "+%F %H:%M:%S" -u` # Save the wakeup time echo "$*" > /myth.wakeup.args echo $DATE > /myth.wakeup.time echo $SECS > /myth.wakeup.secs if [ -e /sys/class/rtc/rtc0/wakealarm ]; then echo 0 > /sys/class/rtc/rtc0/wakealarm echo $SECS > /sys/class/rtc/rtc0/wakealarm fi if [ -e /proc/acpi/alarm ]; then echo "wakeup DATE=$DATE" echo $DATE > /proc/acpi/alarm fi
I think I found this script on the wiki, I modify it to start 20min earlier if fsck is suppose to run at the next boot.
TODO
- Make the dual tuner work as shared card
- Mix EIT and xmltv
- Fix mythwelcome configuration to work with lirc
Talks
(...It seems that it is a Hybrid card with v4l2 driver ? I am trying to set mine up with MythTV (Hauppauge HVR 1300), the dvb-t part seems to work, but I have a very bad signal, so I use the analog part only at the moment (through a STB). Did you manage to make the mpeg2 hardware compression working with it ? I did configure the card as V4l amalog using /dev/video0 (uncompressed) but the quality is not as good than with than the /dev/video1 (compressed). I can't figure out how to configure Myth for this ? The cat /dev/video1 > test.mpeg work very well. I try to use the the MPEG card type in Myth and I modify mpegrecorder.cpp to avoid to open twice the device (as it is not supported by the driver) but most of the time it is failing. Did you have more luck. Sorry to bother you on your discussion page, but I can't find your email. Xavier 14:08, 25 March 2008)
Hi Xavier - I have two Hauppage cards - a Hauppauge PVR 350 (hardware MPEG encoder/decoder) and a Nova S+ (DVB-S card) so I cant talk directly to your experience. However, from my understanding the dual tuner cards can expose two /dev/video devices to expose the MPEG streams?
I will have a look when I am home at the Myth config..
Try looking at http://gentoo-wiki.com/HARDWARE_Hauppauge_HVR_1300
Didn't set my own page as watched :) I will have a look Xavier 19:36, 16 August 2008 (UTC)